[GHC] #15990: Dynamically built GHC crashes on MacOS
GHC
ghc-devs at haskell.org
Mon Dec 3 03:34:29 UTC 2018
#15990: Dynamically built GHC crashes on MacOS
-------------------------------------+-------------------------------------
Reporter: harpocrates | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Build System | Version: 8.7
(Hadrian) |
Keywords: | Operating System: MacOS X
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Since 79d5427e1f9de02c0b171bf5db46b6b49c6f85e3 (which add support for
dynamically linking GHC), the default `./hadrian/build.sh` is broken for
MacOS. In particular, the `ghc` built always crashes with a "Symbol not
found" error. Example:
{{{
$ ./hadrian/build.sh -j -c
# << fails shortly after building first ghc >>
$ _build/stage1/bin/ghc
dyld: Symbol not found: _ffi_type_double
Referenced from: _build/stage1/lib/../lib/x86_64-osx-
ghc-8.7.20181202/libHSghci-8.7-ghc8.7.20181202.dylib
Expected in: flat namespace
in _build/stage1/lib/../lib/x86_64-osx-
ghc-8.7.20181202/libHSghci-8.7-ghc8.7.20181202.dylib
[1] 52701 abort _build/stage1/bin/ghc
}}}
See
https://phabricator.haskell.org/rGHC79d5427e1f9de02c0b171bf5db46b6b49c6f85e3
for more discussion. The core of the issue seems to be that
`-Wl,-dead_strip_dylibs` accidentally strips some essential libraries
(`libffi` is one of these).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15990>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list