GHC 6.4.2 on OS X

Peter Gammie peteg42 at gmail.com
Tue May 23 10:02:48 EDT 2006


Hello,

OK, if GHCi's linker can't cope with the extra symbols, then perhaps  
we can get rid of them.

Following the advice here:

http://lists.apple.com/archives/scitech/2005/Sep/msg00019.html

I  built my GHCi .o file like so:

GHCI_LD_OPTS += -L/usr/lib/ -lSystemStubs
...
$(LD) $(GHCI_LD_OPTS) -o h$$lib.o $(CUDD_LIB)/$$lib/lib$$lib.a;\

err... you get the idea: add that bit of linker magic to whatever  
you're already doing and those nasty symbols go away. I don't know if  
this is a general fix but it works for me.

cheers
peter

On 26/04/2006, at 10:00 PM, Peter Gammie wrote:

> Hello,
>
> I am wondering if the following patch (or equivalent) made it into  
> GHC 6.4.2. I was hoping it would fix my problem:
>
>> mjollnir ~/src/ghc/ghc-6.4.2$ ghci `hbdd-config --cudd-libs`
>>    ___         ___ _
>>   / _ \ /\  /\/ __(_)
>> / /_\// /_/ / /  | |      GHC Interactive, version 6.4.2, for  
>> Haskell 98.
>> / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
>> \____/\/ /_/\____/|_|      Type :? for help.
>>
>> Loading package base-1.0 ... linking ... done.
>> Loading package haskell98-1.0 ... linking ... done.
>> Loading package boolean-0.3.0 ... linking ... done.
>> Loading package unix-1.0 ... linking ... done.
>> Loading package cudd-0.3.0 ... linking ... ghc-6.4.2:
>> /Users/peteg/lib/hbdd-0.3.0/ghc-6.4.2/cudd//hutil.o: unknown  
>> symbol `_fprintf$LDBLStub'
>> ghc-6.4.2: unable to load package `cudd-0.3.0'
>
> It is a problem with GCC 4.0 and GHCi - GHC works fine.
>
>> mjollnir ~/src/ghc/ghc-6.4.2$ gcc --version
>> powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.  
>> build 5247)
>> Copyright (C) 2005 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.   
>> There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
>> PURPOSE.
>
> Can you give me some idea how to fix it? (The use of fprintf is  
> inessential for my purposes but I'd prefer not to hack the C  
> library too much.)
>
> cheers
> peter
>
> Begin forwarded message:
>
>> From: Wolfgang Thaller <wolfgang at haskell.org>
>> Date: 15 July 2005 12:00:16 PM
>> To: cvs-fptools at haskell.org, cvs-ghc at haskell.org
>> Subject: cvs commit: fptools configure.ac fptools/ghc/rts Linker.c
>>
>> wolfgang    2005/07/14 19:00:15 PDT
>>
>>   Modified files:
>>     .                    configure.ac
>>     ghc/rts              Linker.c
>>   Log:
>>   Mac OS X/PowerPC: Make GHCi deal with the additional statically  
>> linked
>>   symbols from libSystemStub.a on Tiger (printf$LDBLStub and  
>> friends).
>>
>>   MERGE TO STABLE
>>
>>   Revision  Changes    Path
>>   1.114     +15 -0     fptools/configure.ac
>>   1.201     +51 -0     fptools/ghc/rts/Linker.c
>> _______________________________________________
>> Cvs-ghc mailing list
>> Cvs-ghc at haskell.org
>> http://www.haskell.org/mailman/listinfo/cvs-ghc
>



More information about the Glasgow-haskell-users mailing list