Re: bug in package.conf (ghci -package OpenGL / ghci -package GLUT)

Sven Panne <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Marc A. Ziegert wrote:
> [...] what is the ghc option to link statically?

Static linking (-static) is the default, I've never tried dynamic linking
(-dynamic). A request for the latter one pops up quite regularly, but there
are a few reasons why it is not necessarily desirable (=> mailing list archives).

> coeus@titan ~ $ cat /usr/lib/libGLU.la [...]

 From this you can see that the library dependencies are not quite right on
your platform (see the lines starting with "dependency_libs" and "NEEDED").
This is what the final result should look like (modulo some minor differences):

panne@jeanluc:~> objdump -p /usr/lib/libglut.so | grep NEEDED
   NEEDED      libSM.so.6
   NEEDED      libICE.so.6
   NEEDED      libXmu.so.6
   NEEDED      libXext.so.6
   NEEDED      libXi.so.6
   NEEDED      libX11.so.6
   NEEDED      libGLU.so.1
   NEEDED      libc.so.6
panne@jeanluc:~> objdump -p /usr/lib/libGLU.so | grep NEEDED
   NEEDED      libGL.so.1
   NEEDED      libm.so.6
   NEEDED      libgcc_s.so.1
   NEEDED      libc.so.6
panne@jeanluc:~> objdump -p /usr/lib/libGL.so | grep NEEDED
   NEEDED      libGLcore.so.1
   NEEDED      libm.so.6
   NEEDED      libXext.so.6
   NEEDED      libX11.so.6
   NEEDED      libdl.so.2

I've just had a look at SuSE's source RPM for GLUT/GLU/GL, and they actually
do some patching (especially in the Makefile.am files) to get the dependencies
right. Perhaps the gentoo people should have a look at this. :-)

Cheers,
    S.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.