[Haskell-cafe] HPong-0.1.2 fails to compile in Debian ghc 6.10.1

Ahn, Ki Yung kyagrd at gmail.com
Thu Apr 23 15:15:44 EDT 2009

I don't know the exact reason but this should not fail since I have 
Debian packaged ghc 6.10.1 and OpenGL- on my system.

I think this is because the filename of the OpenGL shared library is 
/usr/lib/libGL.so.1 rather than libGL.so.  This is why we have two 
binary distributions for Linux because editline library has the same 
naming issues in Debian.  So, this may be Debian packaging problem of 
OpenGL bindings.

But the interesting thing is that I was able to work around this in 
Debian, by temporarily making a symbolic link libGL.so pointing to 
libGL.so.1 and it hpong built successfully.  Once it builds, hpong still 
runs even if I delete the symbolic link libGL.so.  So, there is also a 
possibility that what may be wrong is with the build system (cabal or ghc).

Thanks in advance for related library packaging mangers and developers, 
and here are the details of failure:

kyagrd at kyagrd:~/cscs/stlcwpat$ uname -a
Linux kyagrd 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux
kyagrd at kyagrd:~/cscs/stlcwpat$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.1
kyagrd at kyagrd:~/cscs/stlcwpat$ which ghc

kyagrd at kyagrd:~/cscs/stlcwpat$ cabal update
Downloading the latest package list from hackage.haskell.org

kyagrd at kyagrd:~/cscs/stlcwpat$ cabal install HPong
Resolving dependencies...
Configuring HPong-0.1.2...
Preprocessing executables for HPong-0.1.2...
Building HPong-0.1.2...
[1 of 1] Compiling Main             ( HPong.hs, 
dist/build/hpong/hpong-tmp/Main.o )
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package syb ... linking ... done.
Loading package base- ... linking ... done.
Loading package array- ... linking ... done.
Loading package containers- ... linking ... done.
Loading package transformers- ... linking ... done.
Loading package data-accessor- ... linking ... done.
Loading package packedstring- ... linking ... done.
Loading package pretty- ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package utility-ht-0.0.4 ... linking ... done.
Loading package data-accessor-template- ... linking ... done.
Loading package OpenGL- ... <command line>: can't load .so/.DLL 
for: GL (libGL.so: cannot open shared object file: No such file or 
cabal: Error: some packages failed to install:
HPong-0.1.2 failed during the building phase. The exception was:
exit: ExitFailure 1
kyagrd at kyagrd:~/cscs/stlcwpat$ ghc-pkg list
     ALUT-, Cabal-, Diff-0.1.2, GLUT-, HDBC-2.1.0,
     HDBC-postgresql-, HGL-, HUnit-,
     OpenAL-, OpenGL-, QuickCheck-, Stream-0.2.2,
     X11-1.4.5, X11-xft-0.3, array-, arrows-0.4.1, base-,
     base-, binary-0.5, bytestring-, cairo-0.10.0,
     cgi-3001.1.7.1, containers-, convertible-1.0.2,
     directory-, editline-, fgl-, filepath-,
     (ghc-6.10.1), ghc-prim-, gio-0.10.0, glade-0.10.0,
     glib-0.10.0, gstreamer-0.10.0, gtk-0.10.0, gtkglext-0.10.0,
     gtksourceview2-0.10.0, haskell-src-, haskell98-,
     hpc-, hslogger-1.0.8, html-, integer-,
     irc-0.4.3, mtl-, network-, old-locale-,
     old-time-, packedstring-, parallel-,
     parsec-3.0.0, pretty-, process-, random-,
     regex-base-0.93.1, regex-compat-0.92, regex-posix-0.93.1, rts-1.0,
     soegtk-0.10.0, stm-, svgcairo-0.10.0, syb-,
     syb-with-class-0.5.1, tagsoup-0.6, template-haskell-,
     terminfo-, time-, unix-, utf8-string-0.3.4,
     xhtml-3000.2.0.1, xmonad-0.8.1, xmonad-contrib-0.8.1, zlib-
     Cabal-, Cabal-, GLFW-0.3, HGL-, HTTP-3001.1.3,
     HTTP-4000.0.4, HTTP-4000.0.5, InfixApplicative-1.0.1,
     QuickCheck-, QuickCheck-, Stream-0.3.1, arrows-0.4.1,
     binary-, cgi-3001.1.7.1, data-accessor-,
     data-accessor-monads-fd-0.2, data-accessor-template-,
     derive-0.1.4, extensible-exceptions-, filepath-,
     fingertree-0.0, ghc-paths-, haddock-2.4.1,
     haskell98-, irc-0.4.3, lazysmallcheck-0.3,
     (monads-fd-, network-, network-2.2.1,
     old-time-, parsec-, pointedlist-0.3.1,
     process-, pureMD5-0.2.4, random-, regex-tdfa-1.0.0,
     rosezipper-0.1, sparsebit-0.5, split-0.1.1, terminfo-,
     transformers-, uniplate-, unix-compat-,
     utility-ht-0.0.4, vty-, yi-0.6.0, zlib-, zlib-

kyagrd at kyagrd:~/cscs/stlcwpat$ ls /usr/lib/*GL*
/usr/lib/libGL.so.1@       /usr/lib/libGLU.so.1.3.070300
/usr/lib/libGL.so.180.44   /usr/lib/libGLcore.so.1@
/usr/lib/libGLEW.so.1.5@   /usr/lib/libGLcore.so.180.44
/usr/lib/libGLEW.so.1.5.0  /usr/lib/libQtOpenGL.so.4@
/usr/lib/libGLU.a          /usr/lib/libQtOpenGL.so.4.5@
/usr/lib/libGLU.so@        /usr/lib/libQtOpenGL.so.4.5.0

More information about the Haskell-Cafe mailing list