[MacPorts] #72143: ghc @9.6.6_0: build fails on 10.14.6 with 'error: C preprocessor "/usr/bin/cpp" fails sanity check'

MacPorts noreply at macports.org
Wed Mar 5 23:09:28 UTC 2025


#72143: ghc @9.6.6_0: build fails on 10.14.6 with 'error: C preprocessor
"/usr/bin/cpp" fails sanity check'
--------------------+-----------------------
 Reporter:  larryv  |      Owner:  essandess
     Type:  defect  |     Status:  assigned
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  ghc
--------------------+-----------------------
 Full log attached; this excerpt begins at line 3274:
 {{{
 :info:build Running: /bin/sh
 //opt/local/var/macports/build/_Users_larryv_src_MacPorts_ports_lang_ghc/ghc/work/ghc-9.12.1/libraries/unix/configure
 '--with-compiler=ghc' '--prefix=${pkgroot}/..' 'CFLAGS=--target=x86_64
 -apple-darwin -Qunused-arguments -iquote
 /opt/local/var/macports/build/_Users_larryv_src_MacPorts_ports_lang_ghc/ghc/work/ghc-9.12.1/libraries/unix
 --target=x86_64-apple-darwin -Qunused-arguments' 'LDFLAGS=--target=x86_64
 -apple-darwin' '--with-iconv-includes=/opt/local/include' '--with-iconv-
 libraries=/opt/local/lib' '--with-gmp-includes=/opt/local/include'
 '--with-gmp-libraries=/opt/local/lib' '--host=x86_64-apple-darwin'
 '--with-cc=/usr/bin/clang' 'CC=/usr/bin/clang'
 :info:build configure: WARNING: unrecognized options: --with-compiler,
 --with-iconv-includes, --with-iconv-libraries, --with-gmp-includes,
 --with-gmp-libraries, --with-cc
 :info:build checking for x86_64-apple-darwin-gcc... /usr/bin/clang
 :info:build checking whether the C compiler works... yes
 :info:build checking for C compiler default output file name... a.out

 [...]

 :info:build checking for struct statx... no
 :info:build checking for statx.stx_mnt_id... no
 :info:build checking for F_GETLK from fcntl.h... checking how to run the C
 preprocessor... /usr/bin/cpp
 :info:build configure: error: in
 '/opt/local/var/macports/build/_Users_larryv_src_MacPorts_ports_lang_ghc/ghc/work/ghc-9.12.1/_build/stage0/libraries/unix/build':
 :info:build configure: error: C preprocessor "/usr/bin/cpp" fails sanity
 check
 :info:build See 'config.log' for more details
 :info:build Error when running Shake build system:
 :info:build   at want, called at src/Main.hs:126:44 in
 hdrn-0.1.0.0-50200fc9:Main
 :info:build * Depends on: binary-dist-dir
 :info:build   at apply1, called at
 src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in
 shk-0.19.8-7174ead2:Development.Shake.Internal.Rules.Oracle
 :info:build * Depends on: OracleQ (ContextDataKey (Context {stage =
 Stage1, package = Package {pkgType = Library, pkgName = "rts", pkgPath =
 "rts"}, way = v, iplace = Final}))
 :info:build   at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:54:9
 in hdrn-0.1.0.0-50200fc9:Hadrian.Oracles.Cabal.Rules
 :info:build * Depends on: _build/stage1/rts/setup-config
 :info:build   at need, called at src/Hadrian/Builder.hs:77:5 in
 hdrn-0.1.0.0-50200fc9:Hadrian.Builder
 :info:build * Depends on: _build/stage0/bin/ghc-pkg
 :info:build   at apply1, called at
 src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in
 shk-0.19.8-7174ead2:Development.Shake.Internal.Rules.Oracle
 :info:build * Depends on: OracleQ (ContextDataKey (Context {stage = Stage0
 InTreeLibs, package = Package {pkgType = Library, pkgName = "Cabal",
 pkgPath = "libraries/Cabal/Cabal"}, way = v, iplace = Final}))
 :info:build   at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:54:9
 in hdrn-0.1.0.0-50200fc9:Hadrian.Oracles.Cabal.Rules
 :info:build * Depends on: _build/stage0/libraries/Cabal/Cabal/setup-config
 :info:build   at need, called at src/Hadrian/Haskell/Cabal/Parse.hs:173:5
 in hdrn-0.1.0.0-50200fc9:Hadrian.Haskell.Cabal.Parse
 :info:build * Depends on:
 _build/stage0/inplace/package.conf.d/unix-2.8.6.0-inplace.conf
 :info:build   at apply1, called at
 src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in
 shk-0.19.8-7174ead2:Development.Shake.Internal.Rules.Oracle
 :info:build * Depends on: OracleQ (ContextDataKey (Context {stage = Stage0
 InTreeLibs, package = Package {pkgType = Library, pkgName = "unix",
 pkgPath = "libraries/unix"}, way = v, iplace = Inplace}))
 :info:build   at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:54:9
 in hdrn-0.1.0.0-50200fc9:Hadrian.Oracles.Cabal.Rules
 :info:build * Depends on: _build/stage0/libraries/unix/setup-config
 :info:build * Raised the exception:
 :info:build ExitFailure 1
 :info:build Build failed.
 :info:build Command failed:  cd
 "/opt/local/var/macports/build/_Users_larryv_src_MacPorts_ports_lang_ghc/ghc/work/ghc-9.12.1"
 && hadrian binary-dist-dir -VVVVV -j8
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/72143>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list