[Bug 273091] lang/ghc 9.4.6 fails to build without the addition of iconv configure flags

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 13 Aug 2023 22:11:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273091

--- Comment #6 from Kevin Reinholz <kreinholz@gmail.com> ---
(In reply to Gleb Popov from comment #3)

I created a build log using script, which I then split in half in order to
attach to this bug report.

Reviewing the log, you are absolutely right that ghc is attempting to build
using GCC rather than the system LLVM. As far as I can tell, the configure
script checks for the presence of GCC, and if found, selects that as the
compiler, rather than defaulting to system LLVM.

Even if built using GCC12, I was still able to successfully build and install
ghc-9.4.6 so long as I specified the location of iconv headers and libs:

--with-iconv-libraries=${LOCALBASE}/lib 
--with-iconv-includes=${LOCALBASE}/include

This resolved the problem for me. However, it seems a potentially larger
problem is the defaulting to third party installed GCC compiler instead of
system LLVM if GCC is present in /usr/local/bin.

-- 
You are receiving this mail because:
You are the assignee for the bug.