[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool 1.5.8 problems on OSX: ${wl} evaluation [#9382]

From: George Feinberg
Subject: Re: Libtool 1.5.8 problems on OSX: ${wl} evaluation [#9382]
Date: Wed, 13 Oct 2004 11:02:56 -0400

George Feinberg wrote:
Note that ALL 3 of these libraries load all of the core DB .o files, and therefore
duplicate those symbols.

This is the problem. Tcl, for some reason, uses NSAddImage to load objects at runtime on darwin/Mac OS X. NSAddImage, and NSAddLibrary, are unable to load objects privately, so for flat_namespace images you will get conflicts and the library will fail to load. I have no idea why the Tcl folks went with loading objects of type MH_DYLIB, not MH_BUNDLE, it makes no sense. It also means that Tcl can not work on the original Mac OS X 10.0.x, that api was not available then. Note that the file which does this is (c) Apple Computer and atributed to Wilfredo Sanchez, but Wilfredo left Apple before the NSAddImage api became available, so it isn't his fault :)

If you rebuild all your libraries with MACOSX_DEPLOYMENT_TARGET set to 10.3, it should cause you to get two level namespace libraries, which may be capable of being simultaneously loaded by Tcl.

Please note that if I successfully pass "-flat_namespace -undefined suppress" to the linker, things work just fine. This used to be the case, with DB 4.2.52, which used an older libtool. There is still a bug in libtool in that these
are not properly passed on OS X.

That said, do you mean running libtool with MACOSX_DEPLOYMENT_TARGET set to 10.3,
or is it sufficient to just have that in my environment while building?
I'm pretty sure I've done the latter, and it doesn't help. Also, it didn't seem to affect the link line in DB -- ${wl}-flat_namespaces was still passed.

I'm not holding my breath that two-level namespaces will work.

Alternatively, you could try and ensure that libdb_cxx is not loaded by Tcl at the same time as libdb_tcl or libdb.

Not an option, unless we change DB to not put core symbols in all of its libraries,
which has not worked for other reasons.

Thanks for your help, and I'll let you know how things go.


Peter O'Gorman -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]