[Haskell-cafe] Haskell, SDL, OpenGL

Lemmih lemmih at gmail.com
Mon Jul 18 10:29:17 EDT 2005


On 7/18/05, yin <yin at atom.sk> wrote:
> Hello,
> 
> I'm trying to write a 3D renderer in Haskell using SDL bindings (Lemmih)
> and OpenGL bindings. When I try to compile my work, ghc runs collect2:
> 
> /usr/libexec/gcc/i686-pc-linux-gnu/3.4.3-20050110/collect2
> --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out
> -u GHCziBase_Izh_static_info -u GHCziBase_Czh_static_info -u
> GHCziFloat_Fzh_static_info -u GHCziFloat_Dzh_static_info -u
> GHCziPtr_Ptr_static_info -u GHCziWord_Wzh_static_info -u
> GHCziInt_I8zh_static_info -u GHCziInt_I16zh_static_info -u
> GHCziInt_I32zh_static_info -u GHCziInt_I64zh_static_info -u
> GHCziWord_W8zh_static_info -u GHCziWord_W16zh_static_info -u
> GHCziWord_W32zh_static_info -u GHCziWord_W64zh_static_info -u
> GHCziStable_StablePtr_static_info -u GHCziBase_Izh_con_info -u
> GHCziBase_Czh_con_info -u GHCziFloat_Fzh_con_info -u
> GHCziFloat_Dzh_con_info -u GHCziPtr_Ptr_con_info -u
> GHCziPtr_FunPtr_con_info -u GHCziStable_StablePtr_con_info -u
> GHCziBase_False_closure -u GHCziBase_True_closure -u
> GHCziPack_unpackCString_closure -u GHCziIOBase_stackOverflow_closure -u
> GHCziIOBase_heapOverflow_closure -u GHCziIOBase_NonTermination_closure
> -u GHCziIOBase_BlockedOnDeadMVar_closure -u
> GHCziIOBase_BlockedIndefinitely_closure -u GHCziIOBase_Deadlock_closure
> -u GHCziWeak_runFinalizzerBatch_closure -u __stginit_Prelude
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../crt1.o
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../crti.o
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/crtbegin.o
> -L/home/yin/devel/third/sdlh/SDLstable/img/lib/SDL-0.2.0
> -L/usr/lib/ghc-6.4 -L/usr/lib
> -L/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110
> -L/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110
> -L/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../../i686-pc-linux-gnu/lib
> -L/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../.. Main.o
> -lHSSDL-0.2.0 \
>                             /usr/lib \
> -lSDL -lHSOpenGL -lHSOpenGL_cbits -lGLU -lGL -lm -lHSbase -lHSbase_cbits
> -lHSrts -lm -lgmp -ldl -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/crtend.o
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../crtn.o
> 
> Collect2 don't understand the /usr/lib parameter and fails with this
> message:
> 
> /usr/bin/ld: /usr/lib: No such file: File format not recognized
> collect2: ld returned 1 exit status
> 
> I just rerun collect2 by hand without pre /usr/lib parameter, and it
> works. What have I to do or where have to look in to find and resolve
> the problem? I use Gentoo 2005.0 and SDL binding from SDLStable brach
> installed by hand (I didn't use Portage).

How did you invoke GHC?
How did you install the SDL binding?
What does 'ghc-pkg describe SDL' say?

-- 
Friendly,
  Lemmih


More information about the Haskell-Cafe mailing list