[GHC] #14444: Linker limit on OS X Sierra breaks builds for big projects
GHC
ghc-devs at haskell.org
Mon Nov 13 01:54:00 UTC 2017
#14444: Linker limit on OS X Sierra breaks builds for big projects
-------------------------------------+-------------------------------------
Reporter: dredozubov | Owner: angerman
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
(Linking) |
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 chak):
* cc: chak (added)
Comment:
> bgamari: I've been asking people to open tickets with Apple
> bgamari: As they are really the only ones that can really fix this issue
I am quite sure I know what Apple will respond: "You are holding it
wrong."
Insider jokes aside, the core problem (as I mentioned before on one of the
other tickets) is that GHC tries to use the macOS linker like a Linux
linker and it was never meant to be used like that. Hence, Apple will only
tell you to use it how it was designed to be used. (This is why I haven't
filled a Radar —Apple speak for bug report— against this issue myself.)
As @angerman und @shlevy explained, there are alternatives to GHC's
current scheme, which are closer to how library paths are usually managed
on macOS. In addition, there is a reason why library names on macOS can
include directory paths. In combination with @loader_path and
@executable_path that always allowed to drastically shorten GHC's load
command size. Haskell for Mac has done this for a long time (and I also
mentioned this on a previous ticket) — see
https://github.com/haskellformac/GHCframework/blob/master/GHCBuild/BuildGHC.sh
for a messy shell script that is part of how the Haskell for Mac build
handles this. (The other parts are in that repo as well.)
What I am trying to say here is that Apple will not change this, as they
do not consider it a problem caused by macOS, but as a problem caused by
GHC's abuse of the MACH-O linker format. Hence, I am afraid, we will have
to fix this on our side.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14444#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list