#3354: binaries built with GHC on Mac OS X 10.5 (Leopard) do not work on 10.4
(Tiger)
---------------------+------------------------------------------------------
Reporter: bkomuves | Owner:
Type: bug | Status: new
Priority: normal | Component: Build System
Version: 6.10.1 | Severity: major
Keywords: | Testcase:
Os: MacOS X | Architecture: Unknown/Multiple
---------------------+------------------------------------------------------
It seems that binaries (at least those linked with the threaded runtime)
built with GHC on Mac OS X 10.5 do not work on Mac OS X 10.4. The error
message in my case is
{{{
dyld: lazy symbol binding failed: Symbol not found:
_pthread_cond_init$UNIX2003
Referenced from: <the executable>
Expected in: /usr/lib/libSystem.B.dylib
}}}
I believe that the primary reasons for this is that the runtime system is
linked against the 10.5 system libraries, which are not ABI compatible
with the 10.4 system libraries.
Apple provides both 10.4 and 10.5 SDKs with 10.5, along with compiler and
linker options for those who want to build backward-compatible binaries. I
tried to pass these options to the linker, which results in the error
message
{{{
Undefined symbols:
"_strerror$UNIX2003", referenced from:
_newThreadLocalKey in libHSrts_thr.a(OSThreads.thr_o)
_setThreadLocalVar in libHSrts_thr.a(OSThreads.thr_o)
_freeThreadLocalKey in libHSrts_thr.a(OSThreads.thr_o)
_my_mmap in libHSrts_thr.a(OSMem.thr_o)
_rtsSysErrorMsgFn in libHSrts_thr.a(RtsMessages.thr_o)
"_fputs$UNIX2003", referenced from:
_heapCensus in libHSrts_thr.a(ProfHeap.thr_o)
"_read$UNIX2003", referenced from:
___hscore_PrelHandle_read in libHSbase-4.0.0.0.a(PrelIOUtils.o)
"_fcntl$UNIX2003", referenced from:
_resetNonBlockingFd in libHSrts_thr.a(RtsUtils.thr_o)
_resetNonBlockingFd in libHSrts_thr.a(RtsUtils.thr_o)
_setNonBlockingFd in libHSrts_thr.a(RtsUtils.thr_o)
_setNonBlockingFd in libHSrts_thr.a(RtsUtils.thr_o)
"_pthread_cond_init$UNIX2003", referenced from:
_initCondition in libHSrts_thr.a(OSThreads.thr_o)
"_open$UNIX2003", referenced from:
___hscore_open in libHSbase-4.0.0.0.a(PrelIOUtils.o)
"_kill$UNIX2003", referenced from:
_shutdownHaskellAndSignal in libHSrts_thr.a(RtsStartup.thr_o)
"_select$UNIX2003", referenced from:
_fdReady in libHSbase-4.0.0.0.a(inputReady.o)
"_write$UNIX2003", referenced from:
_ioManagerWakeup in libHSrts_thr.a(Signals.thr_o)
_ioManagerDie in libHSrts_thr.a(Signals.thr_o)
_generic_handler in libHSrts_thr.a(Signals.thr_o)
___hscore_PrelHandle_write in libHSbase-4.0.0.0.a(PrelIOUtils.o)
ld: symbol(s) not found
}}}
It would be nice if GHC on OS X shipped with two version of the runtime
(and the base library?), and had compiler flags to build compatible
binaries. This could be also a problem in the future, with the next OS X
versions.
See also this thread: http://lists.apple.com/archives/Darwin-
dev/2007/Nov/msg00109.html
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3354>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs