Link error under solaris 8

Christian Maeder maeder at tzi.de
Thu Oct 26 04:21:57 EDT 2006


Hi,

I get a link error under sparc sun Solaris 8, when linking my stage2
compiler. I have "undefined reference to" a couple of mathematical
function like powf, tanhf, coshf, sinhf, atanf, acosf, asinf, tanf,
cosf, sinf, sqrtf, logf, and expf

Is libm version 2 needed? The stage1 compiler was content with libm
version 1.

Cheers Christian

-bash-3.00$ uname -a
SunOS euklid 5.8 Generic_117350-41 sun4u sparc SUNW,Ultra-4
-bash-3.00$ ldd compiler/stage1/ghc-6.6
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libgmp.so.3 =>   /usr/local/lib/libgmp.so.3
        libc.so.1 =>     /usr/lib/libc.so.1
        /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1

../compiler/stage1/ghc-inplace -o stage2/ghc-6.6 -H16m -O
-optc-mcpu=ultrasparc -opta-mcpu=ultrasparc -package ghc -Istage2 -cpp
-fglasgow-exts -fno-generics -Rghc-timing -I. -IcodeGen -InativeGen
-Iparser -Rghc-timing  -DGHCI -DBREAKPOINT -threaded
stage2/main/Main.o
/home/maeder/haskell/solaris/ghc-6.6/libraries/base/libHSbase.a(Float__151.o):
In function `s9W7_info':
ghc29001_0.hc:(.text+0x290): undefined reference to `powf'
/home/maeder/haskell/solaris/ghc-6.6/libraries/base/libHSbase.a(Float__152.o):
In function `s9Wv_info':
ghc29001_0.hc:(.text+0x28c): undefined reference to `tanhf'
/home/maeder/haskell/solaris/ghc-6.6/libraries/base/libHSbase.a(Float__153.o):
In function `s9WK_info':
ghc29001_0.hc:(.text+0x288): undefined reference to `coshf'
/home/maeder/haskell/solaris/ghc-6.6/libraries/base/libHSbase.a(Float__154.o):
In function `s9WZ_info':
ghc29001_0.hc:(.text+0x288): undefined reference to `sinhf'
[...]
/home/maeder/haskell/solaris/ghc-6.6/libraries/base/libHSbase.a(Float__237.o):
In function `s85X_info':
ghc29001_0.hc:(.text+0x974): undefined reference to `atanf'
collect2: ld returned 1 exit status
<<ghc: 19353284 bytes, 3 GCs, 100700/100700 avg/max bytes residency (1
samples), 15M in use,
0.01 INIT (0.00 elapsed), 0.33 MUT (34.47 elapsed), 0.03 GC (0.09
elapsed) :ghc>>
gmake[3]: *** [stage2/ghc-6.6] Error 1
gmake[3]: Leaving directory `/home/maeder/haskell/solaris/ghc-6.6/compiler'
gmake[2]: *** [stage2/ghc-6.6] Error 2
gmake[2]: Leaving directory `/home/maeder/haskell/solaris/ghc-6.6/compiler'
gmake[1]: *** [stage2] Error 2
gmake[1]: Leaving directory `/home/maeder/haskell/solaris/ghc-6.6'
gmake: *** [bootstrap2] Error 2


More information about the Glasgow-haskell-users mailing list