[Bug 278895] lang/ghc: fails to build when base built WITH_LLVM_BINUTILS

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 10 May 2024 14:54:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278895

            Bug ID: 278895
           Summary: lang/ghc: fails to build when base built
                    WITH_LLVM_BINUTILS
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: haskell@FreeBSD.org
          Reporter: emaste@freebsd.org
             Flags: maintainer-feedback?(haskell@FreeBSD.org)
          Assignee: haskell@FreeBSD.org

I expect to switch to LLVM binutils for FreeBSD 15, and ports that fail to
build will need to either be fixed, or depend on the binutils package.

See build log in
https://pkg-status.freebsd.org/gohan04/data/mainamd64PR258872-default-foo/2024-04-01_17h03m03s/logs/errors/ghc-9.6.4_1.log

Command line: _build/stage0/bin/ghc -Wall -Wcompat -hisuf dyn_hi -osuf dyn_o
-hcsuf dyn_hc -fPIC -dynamic -hide-all-packages -no-user-package-db
'-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id
runghc-9.6.4' '-package-id base-4.18.2.0' '-package-id directory-1.3.8.1'
'-package-id filepath-1.4.200.1' '-package-id process-1.6.17.0' '-package-id
unix-2.8.4.0' -i
-i/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/utils/runghc/build
-i/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/utils/runghc/build/runghc/autogen
-i/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/utils/runghc -Irts/include
-I_build/stage1/utils/runghc/build
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/process/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/process/build/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/directory
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/directory/build
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/unix/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/unix/build/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/time/lib/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/time/build/lib/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/bytestring/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/bytestring/build/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/base/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/base/build/include
-I/usr/local/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/ghc-bignum/include/
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/ghc-bignum/build/include/
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/libraries/ghc-bignum/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/libraries/ghc-bignum/build/include
-I/usr/local/include -I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/rts/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/rts/build/include
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/rts/@FFIIncludeDir@
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/rts/build/@FFIIncludeDir@
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/rts/@LibdwIncludeDir@
-I/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/rts/build/@LibdwIncludeDir@
-optP-include
-optP_build/stage1/utils/runghc/build/runghc/autogen/cabal_macros.h
-optc--target=x86_64-portbld-freebsd -outputdir
_build/stage1/utils/runghc/build -dynamic
-optl-Wl,-rpath,$ORIGIN/../lib/x86_64-freebsd-ghc-9.6.4
-optl-Wl,-rpath,$ORIGIN/../../../lib/x86_64-freebsd-ghc-9.6.4 -optl-Wl,-zorigin
-fno-use-rpaths -no-auto-link-packages -rtsopts -Wnoncanonical-monad-instances
-optc-Wno-unknown-pragmas -optP-Wno-nonportable-include-path
_build/stage1/utils/runghc/build/Main.dyn_o -o _build/stage1/bin/runghc -O2
-H32m -XHaskell2010 -no-global-package-db
-package-db=/wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/package.conf.d
-ghcversion-file=rts/include/ghcversion.h
-ghcversion-file=rts/include/ghcversion.h
===> Command failed with error code: 1
ld.lld: error: undefined symbol:
unixzm2zi8zi4zi0_SystemziPosixziFilesziPosixString_removeLink1_info
>>> referenced by _build/stage1/utils/runghc/build/Main.dyn_o:(.text+0x2730)
>>> referenced by _build/stage1/utils/runghc/build/Main.dyn_o:(.text+0x2878)
>>> referenced by _build/stage1/utils/runghc/build/Main.dyn_o:(.text+0x2B10)
>>> referenced 3 more times

ld.lld: error: undefined symbol:
unixzm2zi8zi4zi0_SystemziPosixziFilesziPosixString_removeLink1_closure
>>> referenced by _build/stage1/utils/runghc/build/Main.dyn_o:(.data+0x710)

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziProcessziCommon_getProcessID1_info
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziSignals_zdwinstallHandler_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziSignals_keyboardSignal1_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziSignals_zdwinstallHandler_info
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziSignals_keyboardTermination1_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziSignals_Ignore_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziSignals_signalProcessGroup2_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziProcessziCommon_getProcessGroupIDOf2_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/process/build/libHSprocess-1.6.17.0-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziFilesziPosixString_readSymbolicLink1_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziFilesziPosixString_readSymbolicLink1_info
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziDirectoryziPosixPath_changeWorkingDirectory1_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziDirectoryziPosixPath_changeWorkingDirectory1_info
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziFilesziPosixString_removeLink1_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziFilesziPosixString_removeLink1_info
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziDirectoryziPosixPath_removeDirectory1_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziDirectoryziPosixPath_removeDirectory1_info
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziDirectoryziPosixPath_createDirectory1_closure
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined:
unixzm2zi8zi4zi0_SystemziPosixziDirectoryziPosixPath_createDirectory1_info
>>> referenced by /wrkdirs/usr/ports/lang/ghc/work/ghc-9.6.4/_build/stage1/inplace/../libraries/directory/build/libHSdirectory-1.3.8.1-ghc9.6.4.so

ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to
see all errors)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`clang' failed in phase `Linker'. (Exit code: 1)
Command failed
Build failed.
*** Error code 1

It's a bit difficult to understand what is failing because searching for
"error: " in the build log returns > 1000 matches.

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