ghc does not want to link statically

Folks, I'm trying to compile the Haskell Objective-C Binding (HOC) and it needs /usr/lib/libSystemStubs.a to find the missing _fprintf$LDBLStub symbol. I tried the following in the make file FOUNDATION_LIBS=-static -lSystemStubs -l dynamic -framework Foundation but ghc still tries to link libSystemStubs.a dynamically. How do I fix this? ghc --make HOC.hs \ -odir build/objects -hidir build/imports \ -fglasgow-exts -package-name HOC \ ../HOC_cbits/HOC_cbits.o \ -I../HOC_cbits \ -I../libffi-src/build/include \ \ -static -lSystemStubs -dynamic -framework Foundation \ ... Loading package base-1.0 ... linking ... done. Loading object (static) ../HOC_cbits/HOC_cbits.o ... done Loading object (dynamic) SystemStubs ... failed. Dynamic linker error message was: dlopen(libSystemStubs.dylib, 10): image not found Whilst trying to load: (dynamic) SystemStubs Directories to search are: /opt/local/lib ghc-6.4.2: user specified .o/.so/.DLL could not be loaded. make[1]: *** [ghcmake.build-stamp] Error 1 Thanks, Joel -- http://wagerlabs.com/

Please disregard the question. There's an opportunity to statically link the library at an earlier build step. There seems to be no way to link in static libraries when using ghc --make as the dynamic linker (ghci) is being used. On Jul 1, 2006, at 3:08 PM, Joel Reymont wrote:
Folks,
I'm trying to compile the Haskell Objective-C Binding (HOC) and it needs /usr/lib/libSystemStubs.a to find the missing _fprintf $LDBLStub symbol.
I tried the following in the make file
FOUNDATION_LIBS=-static -lSystemStubs -l dynamic -framework Foundation
but ghc still tries to link libSystemStubs.a dynamically. How do I fix this?
participants (1)
-
Joel Reymont