Date: Mon, 14 Aug 2023 21:19:39 +0000 From: bugzilla-noreply@freebsd.org To: haskell@FreeBSD.org Subject: [Bug 273091] lang/ghc 9.4.6 fails to build without the addition of iconv configure flags Message-ID: <bug-273091-16154-KKg46abm6C@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-273091-16154@https.bugs.freebsd.org/bugzilla/> References: <bug-273091-16154@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273091 --- Comment #20 from Kevin Reinholz <kreinholz@gmail.com> --- (In reply to Kevin Reinholz from comment #11) OK, now I think we're getting somewhere! I deleted all instances of GCC fro= m my system in order to force use of the base system LLVM. ghc-9.4.6 builds perfectly fine from the vanilla Port files, no edits to the Makefile or fee= ding of extra configure options required. Glancing at the logs, I think this is the issue: with lang/gcc12 installed,= the following check occurs on line 1996 of "ghc_build_failure_part01.log" (the first attachment to this bug report): 1996 checking for gcc... /usr/local/bin/gcc^M 1997 checking for g++... /usr/local/bin/g++^M Contrast this with line 1990 of "ghc_llvm_build_log-part1.log" (first part = of the most recent series of 4 attachments): 1990 checking for gcc... clang^M 1991 checking for g++... clang++^M It seems that if GCC is installed, ghc's configure script finds it and sele= cts it as the compiler. If GCC is not installed, it reverts of LLVM/clang as a backup. I have no flags set in /etc/make.conf that should cause Ports to prefer GCC over LLVM: DEFAULT_VERSIONS+=3Dssl=3Dbase MAKE_JOBS_UNSAFE=3Dyes DISABLE_VULNERABILITIES=3Dyes NO_SENDMAIL=3Dtrue OPTIONS_FILE_UNSET+=3DGTK2 OPTIONS_FILE_SET+=3DGTK3 DEFAULT_VERSIONS+=3Dperl5=3D5.34 WITHOUT_WARNS=3Dyes Maybe ghc should check for the presence of clang, rather than gcc, and sele= ct that as its compiler if found? STEPS TO REPRODUCE REPORTED BUG: sudo pkg install gcc12 After which attempt to build ghc-9.4.6 from Ports. It will erroneously sele= ct GCC as the compiler over base system LLVM, and then fail to find inconv in /usr/include and /usr/lib. (But can still build successfully if told to look for iconv in /usr/local/include and /usr/local/lib). I suspect GCC's issue might be the inconsistent naming of the base system i= conv libs vice those found in /usr/local/lib: % ls /usr/include | grep iconv=20 iconv.h % ls /usr/lib | grep iconv libkiconv_p.a libkiconv.a libkiconv.so % ls /usr/local/include | grep iconv iconv.h uniconv.h % ls /usr/local/lib | grep iconv=20=20=20 libiconv.a libiconv.so libiconv.so.2 libiconv.so.2.6.1 libsiconv.a libsiconv.so libsiconv.so.1.0 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273091-16154-KKg46abm6C>