[Haskell-beginners] Re: Problems with ghc

Paul Johnston Paul.A.Johnston at manchester.ac.uk
Wed Oct 15 10:35:03 EDT 2008


Christian Maeder wrote:
> Paul Johnston wrote:
>   
>> paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$ ghc
>> -L=/usr/local/lib/ -o Haq --make Haq.hs
>> [1 of 1] Compiling Main             ( Haq.hs, Haq.o )
>> Linking Haq ...
>> paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$ ./Haq "Bother"
>> "Haq! BotherOr not!"
>> paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$
>>
>> Tried putting /usr/local/lib in $LD_LIBRARY_PATH but that didn't seem to
>> work, pity.
>> Anyway many, many thanks
>>     
>
> I think setting LIBRARY_PATH would work.
>
> Cheers Christian
>   
Tried setting both LD_LIBRARY_PATH and LIBRARY_PATH

paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$ env | grep LIBRARY
LIBRARY_PATH=/usr/lib:/opt/csw/lib:/opt/csw/lib/engines:/usr/local/lib
LD_LIBRARY_PATH=/usr/lib:/opt/csw/lib:/opt/csw/lib/engines:/usr/local/lib
paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$


Still same issue

paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$ touch Haq.hs
paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$ ghc -o Haq Haq.hs
Undefined                       first referenced
 symbol                             in file
__gmpz_tdiv_q                       
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_tdiv_r                       
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpn_cmp                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_add                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_and                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_gcd                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_ior                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_com                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_mul                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_xor                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_sub                          
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpn_gcd_1                        
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_init                         
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_fdiv_qr                      
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmp_set_memory_functions          
/usr/local/lib/ghc-6.8.3/libHSrts.a(Storage.o)
__gmpz_divexact                     
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
__gmpz_tdiv_qr                      
/usr/local/lib/ghc-6.8.3/libHSrts.a(PrimOps.o)
ld: fatal: Symbol referencing errors. No output written to Haq
collect2: ld returned 1 exit status
paulj at hb-0021209.humanities.manchester:~/haskell/aht/3$


Cheers Paul


More information about the Beginners mailing list