opensubscriber
   Find in this group all groups
 
Unknown more information…

c : cyrus-devel@lists.andrew.cmu.edu 22 May 2012 • 3:26PM -0400

Re: Libtool and Support for Shared Libraries (2)
by Greg Banks

REPLY TO AUTHOR
 
REPLY TO GROUP






On Thu, May 17, 2012, at 01:21 AM, Дилян Палаузов wrote:
> Hello,
>
> I have integrated the comments about libtool/shared libraries and at the
> end the changes are:
>
>    -- in libcyrus_min:libconfig:config_read one parameter is added for
> config_need_data, so that this variable does not have to be global and
> presented in programs, not using config_read, update all invocations of
> the function to use the new API
>    -- in libimap:global:cyrus_init add one parameter (config_need_data),
> so that its value can be passed to config_read; update all invocations
> of cyrus_init;
>    -- create by default only shared libraries, this can be further tuned
> with ./configure --enable-static / --disable-shared
>    -- rename libsieve and libimap to libcyrus_sieve and libcyrus_sieve
> and install them in $(libdir) (e.g. /usr/lib)
>    -- make the perl/{imap,sieve/managesieve} modules use the shared
> libraries libcyrys_min and libcyrus.  This might lead to a problem, when
> the tests in perl/imap/t/ are run, before the shared libraries are
> installed, as the tests depend on the shared libraries, but the tests
> are not instructed to where to find thw libraries.
>    -- when there is no system-wide libcom_err, compile the bundled one
> as libcyrus_com_err and eventually install it in $(libdir)


commit "Makefile.am: remove LD_(BASIC,SERVER,SIEVE,UTILITY)_FLAGS"
commit "Makefile.am: remove LD_SIEVE_FLAGS"
commit "timsieved/scripttest.c: mark internal functions with "static""
commit "Makefile.am: build doc/text/htmlstrip only on "make dist""

This all looks good

commit "Makefile.am: move the defintion of COM_ERR_LIB here"

I don't think there's any point having COM_ERR_LIB and COM_ERR_LIBS,
just one should do, but we can tweak that later.

commit "libcyrus_min:libconfig:config_read: add parameter
config_need_data"
commit "libimap:global:cyrus_init add parameter config_need_data"

I think this could be done more cleanly, but it does solve the immediate
problem.

commit "notifyd/notifytest: add a function fatal"
commit "configure.ac, Makefile.am: Add libtool support"
commit "/.gitignore: update to ingore .la, .lo and .libs/ files"
commit "convert lib/libcyrus_min.a to libtool archive"
commit "convert lib/libcyrus.a to libtool archive"
commit "convert com_err/et/libcom_err.a to a libtool archive"
commit "convert sieve/libsieve.a to a libtool archive"
commit "convert imap/libimap.a to a libtool archivedev"

Looks good, except that the Perl build is broken.  I get this:

make[2]: Entering directory `/home/gnb/software/cyrus/imapd/perl/imap'
make[2]: *** No rule to make target `-lcyrus', needed by `subdirs'.
Stop.
make[2]: *** Waiting for unfinished jobs....info

I've been wrestling with this most of the day but libtool + MakeMaker =
one enormous headache :(

Also, is there a way of getting rid of these warnings:

  /bin/bash ./libtool   --mode=install /usr/bin/install -c imtest/imtest
  '/home/gnb/software/cyrus/inst/usr/cyrus/bin'
libtool: install: warning: `lib/libcyrus.la' has not been installed in
`/usr/cyrus/lib'
libtool: install: warning: `lib/libcyrus_min.la' has not been installed
in `/usr/cyrus/lib'

because there's quite a lot of them and they're confusing the script I
use to find compile time warnings.

> I hope with uploading now the separate branch "dev/libtool" on
> git.cyrusimapd.org I will not mess up the things again.

I think you should go ahead and merge it in once we can get the Perl
code building .  There's a few problems remaining after that but nothing
we can't handle once we know about it.  In other news I've tweaked
Cassandane to set up $LD_LIBRARY_PATH so it will be able to run Cyrus
binaries built for shared libraries.

--
Greg.

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.