Building GHC on Mac OS X or Fixing readline
Gregory Wright
gwright at comcast.net
Fri Oct 31 15:27:25 EST 2003
On Oct 31, 2003, at 2:15 PM, Kennis Koldewyn wrote:
> On Friday, Oct 31, 2003, at 08:56, Gregory Wright wrote:
>> I've just made the GHC-6.0.1 port under darwinports work, so I know
>> what the problem is.
>> (Actually, I know what the problem is because Wolfgang told me :-) )
>>
>> You're using gcc-3.3 and need to either compile HEAD from cvs or
>> force the build to
>> use gcc-3.1. Try running configure as
>>
>> ./configure --with-gcc=gcc3 --with-ghc='ghc -pgmP "gcc3 -E
>> -traditional"'
>
> Well, it's been cranking along now for four or five hours, and is
> still compiling away, so that seems to be working.
>
Yes, it does take a long time---about 5 hours on my powerbook G4 800
MHz.
>> Regarding the second problem, whose dlcompat library are you using?
>
> [/Users/kennis/] cd
> /Library/Receipts/dlcompat-10505X.pkg/Contents/Resources/
> [...505X.pkg/Contents/Resources] cat dlcompat-10505X.info
> Title dlcompat
> Version 20010505
> ...
>
> What would I need to do if I got a more recent version (say 2003-06-29
> from opendarwin.org)?
>
The problem with dlcompat is probably not the version, but that there
are two different conventions
regarding stripping leading underscores. GHC uses the 'fink' style
convention, not the
opendarwin convention. This will just drive you nuts. The best thing to
do is to update
ghc/rts/Linker.c. Look at the version in the cvs, and look where dlsym
is called. Wolfgang
has modified it in HEAD to use the native OS X dynamic symbol lookup
procedure. Change
just those few lines, otherwise you'll have to do more extensive
upgrading to get the build
to work again.
Before you go to all this trouble, you might want to rebuild dlcompat
with debugging
turned on. If the symbol dlcompat says it is trying to find differs by
an underscore from
the one that GHCi complains about, you know the problem is there.
Greg
> Thanks for your help,
>
> - Kennis
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
More information about the Glasgow-haskell-users
mailing list