Skip to content

Bootstrap of v9.6.4 Fails to Install Built libffi libs, Uses Build Directories, Not DESTDIR Directory

Summary

A standard bootstrap build of ghc (MacPorts update attempt to version 9.6.4) shows that the installed libraries do not correctly link to libffi, but rather the nonexistent build directory:

otool -L /opt/local/lib/ghc-9.6.4/lib/x86_64-osx-ghc-9.6.4/libHSrts-1.0.2-ghc9.6.4.dylib
/opt/local/lib/ghc-9.6.4/lib/x86_64-osx-ghc-9.6.4/libHSrts-1.0.2-ghc9.6.4.dylib:
	@rpath/libHSrts-1.0.2-ghc9.6.4.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.61.1)
	/opt/local/var/macports/build/_opt_local_ports_lang_ghc/ghc/work/ghc-9.6.4/_build/stage1/libffi/build/inst/lib/libffi.8.dylib (compatibility version 10.0.0, current version 10.2.0)

Note that a build of ghc version 9.6.3 following the exact same procedure does not have this issue:

otool -L /opt/local/lib/ghc-9.6.3/lib/x86_64-osx-ghc-9.6.3/libHSrts-1.0.2-ghc9.6.3.dylib
/opt/local/lib/ghc-9.6.3/lib/x86_64-osx-ghc-9.6.3/libHSrts-1.0.2-ghc9.6.3.dylib:
	@rpath/libHSrts-1.0.2-ghc9.6.3.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)
	@rpath/libffi.dylib (compatibility version 10.0.0, current version 10.2.0)

Steps to reproduce

Follow the build instructions at https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian.

Expected behavior

Correct linking of libffi.

Environment

  • GHC version used: 9.6.4

Optional:

  • Operating System: macOS
Edited by Steve Smith
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information