Mac OS X: compiling for 10.5 under 10.6

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

On Tue, Jun 05, 2012 at 03:07:09PM +0200, Soenke Hahn wrote:
If not, does that mean, ghc-7.4.1 does not support OS X 10.5?
As far as I know, if you build GHC 7.4.1 on OS X 10.5 then it will work, but I haven't tried it so I may be wrong. However, binaries built on newer versions (including the binaries we build) may not work on OS X 10.5. Thanks Ian

On Thu, Jun 7, 2012 at 4:59 PM, Ian Lynagh wrote:
On Tue, Jun 05, 2012 at 03:07:09PM +0200, Soenke Hahn wrote:
If not, does that mean, ghc-7.4.1 does not support OS X 10.5?
As far as I know, if you build GHC 7.4.1 on OS X 10.5 then it will work, but I haven't tried it so I may be wrong.
I've built 7.3.20111212 and 7.4.1.20120508 (both are release candidates, I think) from source on 10.5. I haven't built exactly 7.4.1, but I have no reason to believe it wouldn't work. Regards, Sean
participants (3)
-
Ian Lynagh
-
Sean Leather
-
Soenke Hahn