[MacPorts] #65157: ghc @9.2.2 error on 10.6.8: dyld: Symbol not found: _environ, expected in: /opt/x86_64/lib/libMacportsLegacySystem.B.dylib
MacPorts
noreply at macports.org
Wed May 11 14:57:06 UTC 2022
#65157: ghc @9.2.2 error on 10.6.8: dyld: Symbol not found: _environ, expected in:
/opt/x86_64/lib/libMacportsLegacySystem.B.dylib
---------------------------+---------------------------------
Reporter: barracuda156 | Owner: essandess
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords: x86_64, snowleopard
Port: ghc |
---------------------------+---------------------------------
Comment (by kencu):
ghc is set up to build one and two newer versions of itself.
So ghc 9.0.2 would be expected to build ghc 9.2.x and 9.4.x, but not 9.6.x
when it comes along.
Therefore, you should be able to build ghc 9.2.2 using the ghc 9.0.x I
fixed for SnowLeopard here:
https://github.com/kencu/ghc-for-older-darwin-
systems/releases/download/9.0.1/ghc-9.0.1-x86_64-apple-darwin10.tar.xz
and it does not require __environ to be added or any other modifications
to work.
It will not (presently) work in MacPorts as the Portfiles have not been
modified to use it. You would just have to install it manually like you
would do with any old ghc you download from haskell.org, and you will find
it works nicely.
ghc is pretty much useless without stack and cabal, and I have fixed
recent versions of both of those to work on SnowLeopard as well. stack is
a bit hard, as it is it's own little "mini-MacPorts" and will download
compilers etc from haskell.org and other places. Those compilers will not
work on SnowLeopard though, as they are all broken for SnowLeopard, so one
must override the stack defaults and force it to do other things, like use
a compiler you want it to use instead of the one it is designed to want to
download and use.
That is a little bit hard. All in, you might reasonably expect to spend 2
to 4 weeks of consistent time getting to the point where you can fairly
easily use ghc on SnowLeopard. There will be lots of googling issues
involved, figuring out stack.yaml, figuring out how to change the default
behaviour of stack and cabal to bend them to your will.
You might easily find 1000 issues that seem relevant for tickets -- please
don't. Nobody will fix them, it's not MacPort's problem to fix. If you or
me or Marcus or somebody one day does all the work needed, we can make one
big PR for macports.
But to be honest, the only couple of things I needed ghc for on
SnowLeopard anyway was pandoc and shellcheck, and once I built current
versions of those, I just changed my copies of the pandoc and shellcheck
portfiles to install my binaries on my SnowLeopard systems, and moved on.
Life is just too short!
--
Ticket URL: <https://trac.macports.org/ticket/65157#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list