Hi all,

Using recent CVS GHC to build c2hs, when GHC calls

/usr/bin/gcc -o c2hs -DDONT_WANT_WIN32_DLL_SUPPORT c/C.o c/CAST.o c/CAttrs.o 
c/CBuiltin.o c/CLexer.o c/CNames.o c/CParser.o c/CPretty.o c/CTrav.o chs/CHS.o 
chs/CHSLexer.o gen/CInfo.o gen/GBMonad.o gen/GenBind.o state/C2HSState.o 
state/Switches.o toplevel/C2HSConfig.o toplevel/Main.o toplevel/Version.o 
toplevel/c2hs_config.o -L/home/igloo/local/ghc//lib/ghc-5.05 
-L/home/igloo/src/c2hs/c2hs-0.10.17/base -lHShaskell98 -lctk -lHSposix -lHSposix_cbits 
-ldl -lHSunix -lHSunix_cbits -lHSlang -lHSlang_cbits -lHSbase -lHSbase_cbits -lHSrts 
-lm -lgmp -ldl -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 
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_Deadlock_closure -u 
GHCziWeak_runFinalizzerBatch_closure -u __stginit_Prelude -u Main_zdmain_closure


I'm getting

/home/igloo/src/c2hs/c2hs-0.10.17/base/libctk.a(FileOps.o): In function 
`__stginit_FileOps_':
FileOps.o(.text+0x32): undefined reference to `__stginit_Directory_'
/home/igloo/src/c2hs/c2hs-0.10.17/base/libctk.a(CIO.o): In function `__stginit_CIO_':
CIO.o(.text+0x3c): undefined reference to `__stginit_System_'
CIO.o(.text+0x46): undefined reference to `__stginit_Directory_'
CIO.o(.text+0x50): undefined reference to `__stginit_IO_'
/home/igloo/src/c2hs/c2hs-0.10.17/base/libctk.a(SysDepPosix.o): In function 
`__stginit_SysDepPosix_':
SysDepPosix.o(.text+0x1e): undefined reference to `__stginit_IO_'
SysDepPosix.o(.text+0x32): undefined reference to `__stginit_Directory_'
collect2: ld returned 1 exit status


In /home/igloo/local/ghc//lib/ghc-5.05 various options to nm on both
the .a and .o HShaskell98s look OK to my untrained eye, e.g.:

$ nm HShaskell98.o | grep __stginit_Directory_
00000208 T __stginit_Directory_
$ nm --defined-only libHShaskell98.a | grep __stginit_Directory_
00000008 T __stginit_Directory_
$ nm -g libHShaskell98.a | grep __stginit_Directory_
00000008 T __stginit_Directory_

Any ideas what's going wrong?

This may help too:

$ nm HShaskell98.o | grep Directory
00000200 T __stginit_Directory
00000208 T __stginit_Directory_
         U __stginit_SystemziDirectory_
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)


Thanks
Ian

_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to