Libtool and Support for Shared Libraries

Дилян Палаузов dilyan.palauzov at aegee.org
Tue May 15 17:52:37 EDT 2012


Hello,

>>>>> Also, I notice that libcom_err.la is 'noinst'.  How do you expect that cyrus executable will be able to find this code at runtime on a platform which has shared libraries but no system com_err library?
>>>>
>>>> When the compilation of the internal com_err is requested, the files
>>>> from libcom_err.la are compiled with -fPIC and statically linked in
>>>> libimap and libsieve.
>>>
>>> Two questions -
>>>
>>> 1) is this happening by accident because we're currently adding -fPIC to
>>> the global CFLAGS via @PERL_CCLDFLAGS@ ?
>>
>> According to my understanding, -fPIC is added, so that the compiled .o
>> files, can be inserted in a shared library and this is independent from
>> @PERL_CCLDFLAGS at .
>
> Ah.  I was under the impression that libtool+automake would build two
> different .o files, one with -fPIC for shared libraries and one without
> for static libraries and executables.

For installable libraries, this is true, because both static and shared 
libraries are installed.  For noinst_ (convenience) libraries, this is 
also true (but I do not know why libtool builds .o files twice and I do 
not know, if the files that are supposed to be built without -fPIC are 
build in fact with @PERL_CCLDFLAGS@).

Със здраве
   Дилян
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dilyan_palauzov.vcf
Type: text/x-vcard
Size: 380 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20120515/9a9007c7/attachment.vcf 


More information about the Cyrus-devel mailing list