I am trying to fix the lang/ghc98 package on Darwin, because it breaks a large number of downstream packages. The bulk build tracker reports a configure error, which can be easily fixed by passing the right -stdlib argument to the compiler; Darwin needs -stdlib=libc++ rather than the default -stdlib=libstdc++. See the attached patch, which solves this configure error and allows the build to continue well into the build stage. However, the build stops with the following error (see the attached file for the full build log with PKG_DEBUG_LEVEL=1): => _build/stage0/libraries/time/build/Data/Time/Clock/Internal/CTimespec.hs Command line: _build/stageBoot/bin/hsc2hs --cc=clang --ld=clang --cross-safe -I/Users/brook/Pkgsrc/pkg-current/include --cflag=--target=x86_64-apple-darwin --cflag=-O2 --cflag=-D__STDC_NO_ATOMICS__ --cflag=-I/Users/brook/Pkgsrc/pkg-current/include --cflag=-I/Users/brook/Pkgsrc/pkg-current/include/ncurses --cflag=-Qunused-arguments --cflag=-I_build/stage0/libraries/time/build --cflag=-I_build/stage0/libraries/time/build/lib/include --cflag=-Ilibraries/time/lib/include --cflag=-I/usr/include --cflag=-I/Users/brook/Pkgsrc/pkgsrc-current/lang/ghc98/work/.tools/lib/ghc-9.4.7/lib/x86_64-osx-ghc-9.4.7/base-4.17.2.0/include --cflag=-I/opt/pkg/include --cflag=-I/Users/brook/Pkgsrc/pkgsrc-current/lang/ghc98/work/.tools/lib/ghc-9.4.7/lib/x86_64-osx-ghc-9.4.7/rts-1.0.2/include --cflag=-Wall --cflag=-Wno-unknown-pragmas --cflag=-include --cflag=_build/stage0/libraries/time/build/autogen/cabal_macros.h --lflag=--target=x86_64-apple-darwin --lflag=-Wl,-no_fixup_chains --lflag=-Wl,-no_warn_duplicate_libraries --cflag=-Dx86_64_HOST_ARCH=1 --cflag=-Ddarwin_HOST_OS=1 --cflag=-D__GLASGOW_HASKELL__=904 --template=/Users/brook/Pkgsrc/pkgsrc-current/lang/ghc98/work/ghc-9.8.2/_build/stageBoot/lib/template-hsc.h libraries/time/lib/Data/Time/Clock/Internal/CTimespec.hsc -o _build/stage0/libraries/time/build/Data/Time/Clock/Internal/CTimespec.hs ===> Command failed with error code: 1 compiling _build/stage0/libraries/time/build/Data/Time/Clock/Internal/CTimespec_hsc_make.c failed (exit code 255) rsp file was: "_build/stage0/libraries/time/build/Data/Time/Clock/Internal/hsc2hscall53907-0.rsp" command was: clang -c _build/stage0/libraries/time/build/Data/Time/Clock/Internal/CTimespec_hsc_make.c -o _build/stage0/libraries/time/build/Data/Time/Clock/Internal/CTimespec_hsc_make.o -I/Users/brook/Pkgsrc/pkg-current/include --target=x86_64-apple-darwin -O2 -D__STDC_NO_ATOMICS__ -I/Users/brook/Pkgsrc/pkg-current/include -I/Users/brook/Pkgsrc/pkg-current/include/ncurses -Qunused-arguments -I_build/stage0/libraries/time/build -I_build/stage0/libraries/time/build/lib/include -Ilibraries/time/lib/include -I/usr/include -I/Users/brook/Pkgsrc/pkgsrc-current/lang/ghc98/work/.tools/lib/ghc-9.4.7/lib/x86_64-osx-ghc-9.4.7/base-4.17.2.0/include -I/opt/pkg/include -I/Users/brook/Pkgsrc/pkgsrc-current/lang/ghc98/work/.tools/lib/ghc-9.4.7/lib/x86_64-osx-ghc-9.4.7/rts-1.0.2/include -Wall -Wno-unknown-pragmas -include _build/stage0/libraries/time/build/autogen/cabal_macros.h -Dx86_64_HOST_ARCH=1 -Ddarwin_HOST_OS=1 -D__GLASGOW_HASKELL__=904 error: clang: CWRAPPERS_CONFIG_DIR is missing from environment Error when running Shake build system: at action, called at src/Rules.hs:39:19 in main:Rules at need, called at src/Rules.hs:61:5 in main:Rules * Depends on: _build/stage0/lib/package.conf.d/time-1.12.2-inplace.conf at need, called at src/Rules/Register.hs:146:5 in main:Rules.Register * Depends on: _build/stage0/libraries/time/build/stamp-time-1.12.2-inplace at need, called at src/Rules/Library.hs:144:3 in main:Rules.Library * Depends on: _build/stage0/libraries/time/build/Data/Time/Clock/Internal/CTimespec.hs at cmd', called at src/Builder.hs:394:23 in main:Builder at cmdArgs, called at src/Builder.hs:566:8 in main:Builder at cmdArgs, called at src/Builder.hs:590:18 in main:Builder at cmdArgs, called at src/Builder.hs:590:18 in main:Builder at error, called at src/Builder.hs:635:13 in main:Builder * Raised the exception: Command failed Build failed. *** Error code 1 Does this mean that cwrappers stuff is not being passed into the haskell build environment? I’m not sure how cwrappers works, so help is greatly appreciated. Thanks a lot. Cheers, Brook
Attachment:
ghc98.patch
Description: Binary data
Attachment:
ghc98.log
Description: Binary data