ghc-6.6 under sparc-sun-solaris
Winfried Kung
kung111 at gmx.de
Fri Jan 26 10:49:43 EST 2007
With libm.so.2 added to my Solaris 9 machine, ghc from the binary distribution finally works.
One additional information:
For compiling the source distribution it was necessary to make a wrapping in rts/posix/OSMem.c, as I have no stdint.h:
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
I also had to set explicitely
SRC_HC_OPTS = -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc
as Duncan Coutts already pointed out.
Thanks for the help!
Winfried
-------- Original-Nachricht --------
Datum: Fri, 26 Jan 2007 11:21:12 +0100
Von: Christian Maeder <maeder at tzi.de>
An: Winfried Kung <kung111 at gmx.de>
Betreff: Re: ghc-6.6 under sparc-sun-solaris
> Winfried Kung schrieb:
> > Hello Christian,
> >
> > I tried out the binary distribution, on Solaris 9. But I cannot execute
> ghc.
> >
> > It says:
> >
> > ld.so.1: ghc-6.6: fatal: libm.so.2: open failed: No such file or
> directory
> > Killed
> >
> > On my machine, there is no libm.so.2, only a libm.so.1
> >
> > Some people say, libm.so.2 is only available from Solaris 10 but not
> earlier.
> > So I suppose I cannot avoid building ghc from the sources.
>
> At least for ghci libm.so.2 was needed (only the stage 1 compiler was
> content with libm.so.1). We had libm.so.2 under Solaris 9. It should be
> no problem to add a libm.so.2 to Solaris 9. You may need to set
> LD_LIBRARY_PATH to point to its place. (I could send you our libm.so.2
> in a separate mail)
>
> Indeed linking of the stage2 compiler failed for me under Solaris 8 due
> to a missing libm.so.2. I somehow managed linking then (by setting
> LD_LIBRARY_PATH or under Solaris 10), I can't remember. But it runs
> under Solaris 8! (see below)
>
> I see that ghc-6.4.1 was content with libm.so.1, though.
>
> > Can you please give me the necessary configuration options?
>
> I did nothing special. My build.mk (in mk/) says:
> BIN_DIST=1
> Project=Ghc
> SRC_HC_OPTS += -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc
>
> Any linker should do, if it is consistently the first one in the PATH. I
> think, it even doesn't matter which linker is used by gcc. Maybe you are
> able to get a libm.so.1 stage2 compiler without Interpreter?
>
> GhcWithInterpreter=NO
>
> HTH Christian
>
>
> -bash-3.00$ ghci
> ___ ___ _
> / _ \ /\ /\/ __(_)
> / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.
> / /_\\/ __ / /___| | http://www.haskell.org/ghc/
> \____/\/ /_/\____/|_| Type :? for help.
>
> Loading package base ... linking ... done.
> Prelude> :quit
> Leaving GHCi.
> -bash-3.00$ uname -a
> SunOS euklid 5.8 Generic_117350-45 sun4u sparc SUNW,Ultra-4
>
> -bash-3.00$ ldd /usr/local/pub-bkb/ghc/ghc-6.6/lib/ghc-6.6/ghc-6.6
> librt.so.1 => /usr/lib/librt.so.1
> libm.so.2 => /usr/local/lib/libm.so.2
> libdl.so.1 => /usr/lib/libdl.so.1
> libreadline.so.5 => /usr/local/lib/libreadline.so.5
> libncurses.so.5 => /usr/local/lib/libncurses.so.5
> libgmp.so.3 => /usr/local/lib/libgmp.so.3
> libpthread.so.1 => /usr/lib/libpthread.so.1
> libc.so.1 => /usr/lib/libc.so.1
> libaio.so.1 => /usr/lib/libaio.so.1
> libthread.so.1 => /usr/lib/libthread.so.1
> /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
>
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the Glasgow-haskell-bugs
mailing list