[Aqsis-development] shared vs static libraries; building on amd64 - bug 1456902
Brought to you by:
ltatkinson,
pgregory
From: Chris F. <fo...@ph...> - 2006-05-20 14:47:54
|
Hi all. I'm revisiting my kludgy "solution" to Bug 1456902 - that is, the problem with the build system on amd64. Originally I'd assumed that we needed a way to put -fPIC into the CFLAGS explicitly, but studing the scons manual shows that this is incorrect. I've isolated the problem down to the fact that on amd64 systems it's not possible to link static libraries into a shared library. As far as I can tell, all object code going into a shared library must be explicitly compiled as position independent code. This is in contrast to x86 where it doesn't seem to matter. As a consequence, the build fails when linking static libraries like libddmanager.a into the aqsis library, aqsis.so. scons will do the right thing (using -fPIC etc) if we explicitly tell it to create shared libraries with the SharedLibrary method, so as I see it, we have two options: 1) Don't use static libraries - If there's no special reasons for preferring static libraries for libddmanager.a etc, then this is probably easiest. 2) Build all the libraries as both static and shared, at least on the amd64 architecture. I have tried to naively just replace calls to Library with SharedLibrary - this didn't work so far; I get dependency cycles which I'm not sure of the cause for yet... Comments would be much appreciated, thanks. ~Chris. PS: Is there anything we can do about the latency of this list? My last mail took four days or so to get through - very frustrating. |