Libtool and Support for Shared Libraries (3)

Carson Gaspar carson at taltos.org
Fri Jun 8 17:22:34 EDT 2012


[ Much perl tsuris elided ]

Folks keep talking about linking a static libfoo.a into a dynamic 
libbar.so. This MUST NOT HAPPEN. Linking non-PIC code into a shared 
object will fail in unpredictable ways. It may _appear_ to work, but it 
really won't. The Solaris linker will usually scream bloody murder and 
error out. Linux/gnu ld tend to fail to enforce this, and leave the 
errors for runtime.

The libtool non-static convenience lib stuff sounds like it does the 
right thing, but I haven't looked at it to be sure.

If I have some time this weekend, I'll try building the dev/libtool 
branch and provide more feedback, as I install every package into it's 
own tree, so I will trigger any missing RPATH issues.

-- 
Carson



More information about the Cyrus-devel mailing list