Link error under solaris 8

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
<

Christian Maeder schrieb:
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.
The stage2 compiler could only be linked with libm.so.2 (although "nm" listed the above functions also in libm.so.1.) Christian
participants (1)
-
Christian Maeder