[GHC] #15990: Dynamically built GHC crashes on MacOS

#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

#15990: Dynamically built GHC crashes on MacOS -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: | Keywords: Operating System: MacOS X | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5409 Wiki Page: | -------------------------------------+------------------------------------- Changes (by harpocrates): * status: new => patch * differential: => Phab:D5409 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15990#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15990: Dynamically built GHC crashes on MacOS -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: | Keywords: Operating System: MacOS X | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by harpocrates): * differential: Phab:D5409 => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15990#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15990: Dynamically built GHC crashes on MacOS
-------------------------------------+-------------------------------------
Reporter: harpocrates | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.8.1
Component: Build System | Version: 8.7
(Hadrian) |
Resolution: | Keywords:
Operating System: MacOS X | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#15990: Dynamically built GHC crashes on MacOS -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: I believe this should now be fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15990#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15990: Dynamically built GHC crashes on MacOS -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.8.1 Component: Build System | Version: 8.7 (Hadrian) | Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by harpocrates): Wait, when did this get fully fixed? Weren't there still some outstanding `libffi` issues? My patch was definitely //not// enough. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15990#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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) | Resolution: | Keywords: Operating System: MacOS X | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: closed => new * resolution: fixed => Comment: Alright, in that case my belief was incorrect :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15990#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC