`dlopen` cannot find `libgmp.dylib` while starting ghci
Summary
I get the following warning when I run ghci on HEAD
$ ./_build/ghc-stage2 --interactive
GHCi, version 9.9.20230923: https://www.haskell.org/ghc/ :? for help
<no location info>: warning: [-Wmissed-extra-shared-lib]
dlopen(libgmp.dylib, 0x0005): tried: 'libgmp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgmp.dylib' (no such file), '/Users/aningle/workspace/ghc-head/ghc/_build/stage1/lib/x86_64-osx-ghc-9.9.20230923/libgmp.dylib' (no such file), '/Users/aningle/workspace/ghc-head/ghc/_build/stage1/bin/../lib/x86_64-osx-ghc-9.9.20230923/libgmp.dylib' (no such file), '$ORIGIN/../../../lib/x86_64-osx-ghc-9.9.20230923/libgmp.dylib' (no such file), '/usr/lib/libgmp.dylib' (no such file, not in dyld cache), 'libgmp.dylib' (no such file)
It's OK if you don't want to use symbols from it directly.
(the package DLL is loaded by the system linker
which manages dependencies by itself).
ghci>
This isn't fatal, but makes meaningfully running and debugging ghci tests locally impossible.
libgmp.dylib
does exist is its usual place:
$ ls /usr/local/lib/libgmp.dylib
/usr/local/lib/libgmp.dylib
I suspect some configure script changes isn't setting the right path somewhere?
Steps to reproduce
Build HEAD (b8e4fe23)
$ ./configure && ./hadrian/build -j stage2:exe:ghc-bin
start ghci
$ ./_build/ghc-stage2 --interactive
Expected behavior
Not get any warnings before opening the ghci repl prompt
Environment
- GHC version used: Boot strapping GHC:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.4.5
Optional:
- Operating System: MacOS (Ventura Version 13.5.2 (22G91)) Darwin 22.6.0
- System Architecture: x86_64 i386