Libtool and Support for Shared Libraries

Дилян Палаузов dilyan.palauzov at
Mon May 14 11:34:19 EDT 2012


I put the libraries initially under $cyrus_prefix/lib (/usr/cyrus/lib), 
because the directory $cyrus_prefix already existed.

If the intention is to move the files from $cyrus_prefix / $servicepath 
(/usr/cyrus/bin), to /usr/libexec and /usr/bin, then the shared 
libraries can be renamed to libcyrus-imap and libcyrus-sieve and 
installed under $libdir.

> commit ", Add libtool support"
> So, with no arguments to LT_INIT() are we getting both shared and static
versions of the libraries by default?

Yes.  But when the package is compiled, this can be further tuned with 
passing options to ./configure (--disable-shared, --disable-static).

> commit "convert com_err/et/libcom_err.a to a libtool archive"
> You should also fix the 2nd argument to db_panic() in lib/cyrusdb_berkeley.c.

I am not sure: gcc does not complain.  I think it matters only when 
errno is a global variable, in db_panic() it is local.

> Also, I notice that 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 are compiled with -fPIC and statically linked in 
libimap and libsieve.  That is how the files are found at run time. 
This has the disadvantage, that running timsieved and lmtpd with shared 
libraries support, loads libimap and libsieve, so the statically linked 
code of libcim_err is loaded twice.  An option would be to install as shared libcyrus_com_err, which is loaded by both libimap 
and libsieve.

Със здраве
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dilyan_palauzov.vcf
Type: text/x-vcard
Size: 380 bytes
Desc: not available
Url : 

More information about the Cyrus-devel mailing list