Debian&HOpenGL, undefined symbol: glPixelStorei

Hi, I'm trying to get HOpenGL working on a unstable debian box. Since there were suitable packages available (ghc6, ghc6-hopengl) I installed those. After trying to "ghci6 -package GLUT" I get the following error message: Loading package OpenGL ... ghc-6.0.1: can't load .so/.DLL for: GLU (/usr/ X11R6/lib/libGLU.so: undefined symbol: glPixelStorei) With packages for ghc5 this seems to work but I cannot get any example compiled. The result for "ghc5 --make -package GLUT Planet.hs" is: ghc-5.04.3: can't find module `GL' (while processing "Planet.hs") Any help appreciated, Ville Tirronen

try one of these ghc -package GLUT -package OpenGL Planet.hs -lglut ghc -package GLUT -package OpenGL Planet.hs -lglut -lGL -lGLU /usr/*/lib/libGL.so should contain glPixelStorei Am Freitag, 24. Oktober 2003 08:52 schrieb Ville Tirronen:
Hi,
I'm trying to get HOpenGL working on a unstable debian box. Since there were suitable packages available (ghc6, ghc6-hopengl) I installed those. After trying to "ghci6 -package GLUT" I get the following error message:
Loading package OpenGL ... ghc-6.0.1: can't load .so/.DLL for: GLU (/usr/ X11R6/lib/libGLU.so: undefined symbol: glPixelStorei)
With packages for ghc5 this seems to work but I cannot get any example compiled.
The result for "ghc5 --make -package GLUT Planet.hs" is:
ghc-5.04.3: can't find module `GL' (while processing "Planet.hs")
Any help appreciated, Ville Tirronen
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl

try one of these ghc -package GLUT -package OpenGL Planet.hs -lglut ghc -package GLUT -package OpenGL Planet.hs -lglut -lGL -lGLU
/usr/*/lib/libGL.so should contain glPixelStorei
No go I'm afraid. ghci still has the same complaint, but that is not really such a big deal, since I can compile programs. Thank you, Ville Tirronen

Ville Tirronen wrote:
try one of these ghc -package GLUT -package OpenGL Planet.hs -lglut ghc -package GLUT -package OpenGL Planet.hs -lglut -lGL -lGLU
/usr/*/lib/libGL.so should contain glPixelStorei
No go I'm afraid. ghci still has the same complaint, but that is not really such a big deal, since I can compile programs.
Nevertheless, the OpenGL and GLUT packages should work on Debian, but I don't have access to such a platform. Could you send me GHC's package.conf file and the output of strace -e trace=file ghci ... Do you have some kind of "Hello, world!" OpenGL examples in C? What does ldd myOpenGLHelloWorldExample print? Cheers, S.

i tried it. i have the same problem. (using gentoo linux) ghci -lGL -lGLU works, but ghci -lGLU -lGL doesn't. ghc -lGL -lGLU -package GLUT tries to load the package first. Sven Panne: strace -e trace=file ghci -lGL -lGLU -package GLUT &>strace strace -e trace=file ghci -lGL -lGLU -package GLUT >strace.stdout 2>strace.stderr Am Dienstag, 28. Oktober 2003 14:57 schrieb Ville Tirronen:
try one of these ghc -package GLUT -package OpenGL Planet.hs -lglut ghc -package GLUT -package OpenGL Planet.hs -lglut -lGL -lGLU
/usr/*/lib/libGL.so should contain glPixelStorei
No go I'm afraid. ghci still has the same complaint, but that is not really such a big deal, since I can compile programs.
Thank you,
Ville Tirronen
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl

found the solution: in /usr/lib/ghc-6.0.1/package.conf the package named "OpenGL" contains extra_ld_opts = ["", "-lGLU", "-lGL", but it has to contain extra_ld_opts = ["", "-lGL", "-lGLU", so that libGL.so will be loaded before libGLU.so. with this patch it works. :) - marc Am Dienstag, 28. Oktober 2003 20:33 schrieb Marc A. Ziegert:
i tried it. i have the same problem. (using gentoo linux)
ghci -lGL -lGLU works, but ghci -lGLU -lGL doesn't.
ghc -lGL -lGLU -package GLUT tries to load the package first.
Sven Panne:
strace -e trace=file ghci -lGL -lGLU -package GLUT &>strace strace -e trace=file ghci -lGL -lGLU -package GLUT >strace.stdout 2>strace.stderr
Am Dienstag, 28. Oktober 2003 14:57 schrieb Ville Tirronen:
try one of these ghc -package GLUT -package OpenGL Planet.hs -lglut ghc -package GLUT -package OpenGL Planet.hs -lglut -lGL -lGLU
/usr/*/lib/libGL.so should contain glPixelStorei
No go I'm afraid. ghci still has the same complaint, but that is not really such a big deal, since I can compile programs.
Thank you,
Ville Tirronen
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl

whops... sorry. only ghci -package OpenGL works, but not ghci -package GLUT but maybe that is only my problem because of installing HOpenGL-1.05 over ghc-6.0.1 (which already contains OpenGL) Am Mittwoch, 29. Oktober 2003 12:21 schrieb Marc A. Ziegert:
found the solution:
in /usr/lib/ghc-6.0.1/package.conf the package named "OpenGL" contains
extra_ld_opts = ["", "-lGLU", "-lGL",
but it has to contain
extra_ld_opts = ["", "-lGL", "-lGLU",
so that libGL.so will be loaded before libGLU.so. with this patch it works. :)
- marc
Am Dienstag, 28. Oktober 2003 20:33 schrieb Marc A. Ziegert:
i tried it. i have the same problem. (using gentoo linux)
ghci -lGL -lGLU works, but ghci -lGLU -lGL doesn't.
ghc -lGL -lGLU -package GLUT tries to load the package first.
Sven Panne:
strace -e trace=file ghci -lGL -lGLU -package GLUT &>strace strace -e trace=file ghci -lGL -lGLU -package GLUT >strace.stdout 2>strace.stderr
Am Dienstag, 28. Oktober 2003 14:57 schrieb Ville Tirronen:
try one of these ghc -package GLUT -package OpenGL Planet.hs -lglut ghc -package GLUT -package OpenGL Planet.hs -lglut -lGL -lGLU
/usr/*/lib/libGL.so should contain glPixelStorei
No go I'm afraid. ghci still has the same complaint, but that is not really such a big deal, since I can compile programs.
Thank you,
Ville Tirronen
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl

second patch: the package named "GLUT" contains extra_ld_opts = ["", "-L/usr/X11R6/lib", "-lSM", but it has to contain extra_ld_opts = ["", "-L/usr/X11R6/lib", "-lglut", "-lSM", Am Mittwoch, 29. Oktober 2003 12:31 schrieb Marc A. Ziegert:
whops... sorry. only
ghci -package OpenGL
works, but not
ghci -package GLUT
but maybe that is only my problem because of installing HOpenGL-1.05 over ghc-6.0.1 (which already contains OpenGL)
Am Mittwoch, 29. Oktober 2003 12:21 schrieb Marc A. Ziegert:
found the solution:
in /usr/lib/ghc-6.0.1/package.conf the package named "OpenGL" contains
extra_ld_opts = ["", "-lGLU", "-lGL",
but it has to contain
extra_ld_opts = ["", "-lGL", "-lGLU",
so that libGL.so will be loaded before libGLU.so. with this patch it works. :)
- marc
Am Dienstag, 28. Oktober 2003 20:33 schrieb Marc A. Ziegert:
i tried it. i have the same problem. (using gentoo linux)
ghci -lGL -lGLU works, but ghci -lGLU -lGL doesn't.
ghc -lGL -lGLU -package GLUT tries to load the package first.
Sven Panne:
strace -e trace=file ghci -lGL -lGLU -package GLUT &>strace strace -e trace=file ghci -lGL -lGLU -package GLUT >strace.stdout 2>strace.stderr
Am Dienstag, 28. Oktober 2003 14:57 schrieb Ville Tirronen:
try one of these ghc -package GLUT -package OpenGL Planet.hs -lglut ghc -package GLUT -package OpenGL Planet.hs -lglut -lGL -lGLU
/usr/*/lib/libGL.so should contain glPixelStorei
No go I'm afraid. ghci still has the same complaint, but that is not really such a big deal, since I can compile programs.
Thank you,
Ville Tirronen
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl
_______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl

Marc A. Ziegert wrote:
second patch:
the package named "GLUT" contains
extra_ld_opts = ["", "-L/usr/X11R6/lib", "-lSM",
but it has to contain
extra_ld_opts = ["", "-L/usr/X11R6/lib", "-lglut", "-lSM",
Hmmm, this means that configure couldn't find a usable GLUT library. Could you send me the config.log and a transcript of your shell session? Cheers, S.
participants (4)
-
Marc A. Ziegert
-
Sven Panne
-
Ville Tirronen
-
Ville Tirronen