Mac OS X: compiling for 10.5 under 10.6
Soenke Hahn
shahn at cs.tu-berlin.de
Tue Jun 5 15:07:09 CEST 2012
Hi!
I was trying to use the ghc on a system with OS X 10.6 to compile for
both 10.6 and 10.5 (and hopefully 10.7). In the past (with ghc-7.2.2
IIRC) I had luck with
if os(darwin)
cc-options:
-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
ld-options:
-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
in the cabal file, but with ghc-7.4.1 (from Haskell-Platform-2012.2.0.0)
I get linker errors:
Undefined symbols:
"_fopen$DARWIN_EXTSN", referenced from:
_procRtsOpts in libHSrts.a(RtsFlags.o)
_initProfiling2 in libHSrts.a(ProfHeap.o)
_exitHpc in libHSrts.a(Hpc.o)
_startupHpc in libHSrts.a(Hpc.o)
"_fopen$UNIX2003", referenced from:
_loadArchive in libHSrts.a(Linker.o)
_addDLL in libHSrts.a(Linker.o)
"_kevent64", referenced from:
_s3VN_info in libHSbase-4.5.0.0.a(KQueue__166.o)
ld: symbol(s) not found
If I remove the backward-compatibility flags from the cabal file,
everything works fine. (I assume it won't run on OS X 10.5 then, of course.)
If I understand correctly the RTS and the base library in ghc-7.4.1
depend on a newer version of the OS X SDK (>= 10.6). Is there an easy
way to work around this version constraint? If not, does that mean,
ghc-7.4.1 does not support OS X 10.5?
Thanks,
Sönke
More information about the Glasgow-haskell-users
mailing list