bug in package.conf (ghci -package OpenGL / ghci -package GLUT)
"Marc A. Ziegert" <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.hopengl |
|---|---|
| Message-ID | <[email protected]> |
there still exist systems/programs that need a strict sequence of .so files to link. i.e. at least ghci on i386-gnu-linux.
coeus@titan ~ $ ghci -package GLUT
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Loading package OpenGL ... ghc-6.2: can't load .so/.DLL for: GLU (/usr/lib/libGL U.so: undefined symbol: glPixelStorei)
coeus@titan ~ $
problem to link GLU, because GL has not been linked before.
it happens in the package OpenGL, because it is in the package_deps of GLUT.
GLUT's libraries would have the same problem, but --because of package_deps-- GL and GLU must have been linked before. unnecessary to link them again.
it is:
Package
{name = "OpenGL",
package_deps = ["base"],
extra_ld_opts =
["-lGLU",
"-lGL",
Package
{name = "GLUT",
package_deps = ["base", "OpenGL"],
extra_ld_opts =
["-lglut",
"-lGLU",
"-lGL",
and should be:
Package
{name = "OpenGL",
package_deps = ["base"],
extra_ld_opts =
["-lGL",
"-lGLU",
Package
{name = "GLUT",
package_deps = ["base", "OpenGL"],
extra_ld_opts =
[ "-lglut",