Juan C. Blanco
2014-Feb-07 17:13 UTC
[Dovecot] Problem rebuilding Centos 5/6 pigeonhole RPM from mercurial version
Hi Stephan, I'm traying to rebuild the RH (Centos) EL5 and EL6 RPM with the last mercurial pigeonhole 0.4.2 version, but I'm having problems with the build. I think that I've isolated the problem outside rpmbuild context. I've downloaded dovecot and pigeonhole mercurial versions and built dovecot with the commands: dovecot-2.2.10$ ./autogen.sh dovecot-2.2.10$ ./configure INSTALL_DATA="install -c -p -m644" --enable-header-install --disable-static --with-nss --with-shadow --with-pam --with-gssapi=plugin --with-ldap=plugin --with-sql=plugin --with-mysql --with-zlib --with-sql-drivers --with-libcap --with-db --with-ssl=openssl --with-ssldir=/etc/pki/dovecot --with-notify=inotify --with-solr --with-docs dovecot-2.2.10$ make dovecot-2.2.10$ make install DESTDIR=/var/tmp/dovecot after that, building pigeonhole with the commands pigeonhole-0.4.2$ ./autogen.sh pigeonhole-0.4.2$ ./configure INSTALL_DATA="install -c -p -m644" --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-dovecot=/var/tmp/dovecot --with-managesieve=yes pigeonhole-0.4.2$ make pigeonhole-0.4.2$ make install DESTDIR=/var/tmp/dovecot works fine, but if I install pigeonhole in a different path, i.e. pigeonhole-0.4.2$ make install DESTDIR=/var/tmp/pigeonhole I get the following error make[4]: Entering directory `/home/jc/pigeonhole-0.4.2/src/lib-sieve' make[4]: Nothing to be done for `install-exec-am'. test -z "/usr/lib64/dovecot" || mkdir -p -- "/var/tmp/pigeonhole/usr/lib64/dovecot" /bin/sh ../../libtool --mode=install /usr/bin/install -c 'libdovecot-sieve.la' '/var/tmp/pigeonhole/usr/lib64/dovecot/libdovecot-sieve.la' libtool: install: warning: relinking `libdovecot-sieve.la' (cd /home/jc/pigeonhole-0.4.2/src/lib-sieve; /bin/sh ../../libtool --tag=CC --mode=relink gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/kerberos/include -o libdovecot-sieve.la -rpath /usr/lib64/dovecot sieve-settings.lo sieve-message.lo sieve-smtp.lo sieve-lexer.lo sieve-script.lo sieve-script-file.lo sieve-script-dict.lo sieve-ast.lo sieve-binary.lo sieve-binary-file.lo sieve-binary-code.lo sieve-binary-debug.lo sieve-parser.lo sieve-address.lo sieve-validator.lo sieve-generator.lo sieve-interpreter.lo sieve-runtime-trace.lo sieve-code-dumper.lo sieve-binary-dumper.lo sieve-result.lo sieve-error.lo sieve-objects.lo sieve-stringlist.lo sieve-comparators.lo sieve-match-types.lo sieve-address-parts.lo sieve-match.lo sieve-commands.lo sieve-code.lo sieve-actions.lo sieve-extensions.lo sieve-plugins.lo cmp-i-octet.lo cmp-i-ascii-casemap.lo mcht-is.lo mcht-contains.lo mcht-matches.lo tst-truefalse.lo tst-not.lo tst-anyof.lo tst-allof.lo tst-address.lo tst-header.lo tst-exists.lo tst-size.lo cmd-require.lo cmd-stop.lo cmd-if.lo cmd-keep.lo cmd-redirect.lo cmd-discard.lo ext-fileinto.lo ext-reject.lo ext-envelope.lo ext-encoded-character.lo sieve.lo ../../src/lib-sieve/plugins/vacation/libsieve_ext_vacation.la ../../src/lib-sieve/plugins/subaddress/libsieve_ext_subaddress.la ../../src/lib-sieve/plugins/comparator-i-ascii-numeric/libsieve_ext_comparator-i-ascii-numeric.la ../../src/lib-sieve/plugins/relational/libsieve_ext_relational.la ../../src/lib-sieve/plugins/regex/libsieve_ext_regex.la ../../src/lib-sieve/plugins/copy/libsieve_ext_copy.la ../../src/lib-sieve/plugins/imap4flags/libsieve_ext_imap4flags.la ../../src/lib-sieve/plugins/include/libsieve_ext_include.la ../../src/lib-sieve/plugins/body/libsieve_ext_body.la ../../src/lib-sieve/plugins/variables/libsieve_ext_variables.la ../../src/lib-sieve/plugins/enotify/libsieve_ext_enotify.la ../../src/lib-sieve/plugins/notify/libsieve_ext_notify.la ../../src/lib-sieve/plugins/environment/libsieve_ext_environment.la ../../src/lib-sieve/plugins/mailbox/libsieve_ext_mailbox.la ../../src/lib-sieve/plugins/date/libsieve_ext_date.la ../../src/lib-sieve/plugins/spamvirustest/libsieve_ext_spamvirustest.la ../../src/lib-sieve/plugins/ihave/libsieve_ext_ihave.la ../../src/lib-sieve/plugins/editheader/libsieve_ext_editheader.la ../../src/lib-sieve/plugins/vnd.dovecot/debug/libsieve_ext_debug.la ../../src/lib-sieve/plugins/vnd.dovecot/duplicate/libsieve_ext_duplicate.la ../../src/lib-sieve/util/libsieve_util.la /home/jc/dovecot-2.2.10/src/lib-lda/libdovecot-lda.la /home/jc/dovecot-2.2.10/src/lib-storage/libdovecot-storage.la /home/jc/dovecot-2.2.10/src/lib-imap-storage/libimap-storage.la /home/jc/dovecot-2.2.10/src/lib-dovecot/libdovecot.la -export-dynamic -ldl -lrt -inst-prefix-dir /var/tmp/pigeonhole) gcc -shared .libs/sieve-settings.o .libs/sieve-message.o .libs/sieve-smtp.o .libs/sieve-lexer.o .libs/sieve-script.o .libs/sieve-script-file.o .libs/sieve-script-dict.o .libs/sieve-ast.o .libs/sieve-binary.o .libs/sieve-binary-file.o .libs/sieve-binary-code.o .libs/sieve-binary-debug.o .libs/sieve-parser.o .libs/sieve-address.o .libs/sieve-validator.o .libs/sieve-generator.o .libs/sieve-interpreter.o .libs/sieve-runtime-trace.o .libs/sieve-code-dumper.o .libs/sieve-binary-dumper.o .libs/sieve-result.o .libs/sieve-error.o .libs/sieve-objects.o .libs/sieve-stringlist.o .libs/sieve-comparators.o .libs/sieve-match-types.o .libs/sieve-address-parts.o .libs/sieve-match.o .libs/sieve-commands.o .libs/sieve-code.o .libs/sieve-actions.o .libs/sieve-extensions.o .libs/sieve-plugins.o .libs/cmp-i-octet.o .libs/cmp-i-ascii-casemap.o .libs/mcht-is.o .libs/mcht-contains.o .libs/mcht-matches.o .libs/tst-truefalse.o .libs/tst-not.o .libs/tst-anyof.o .libs/tst-allof.o .libs/tst-address.o .libs/tst-header.o .libs/tst-exists.o .libs/tst-size.o .libs/cmd-require.o .libs/cmd-stop.o .libs/cmd-if.o .libs/cmd-keep.o .libs/cmd-redirect.o .libs/cmd-discard.o .libs/ext-fileinto.o .libs/ext-reject.o .libs/ext-envelope.o .libs/ext-encoded-character.o .libs/sieve.o -Wl,--whole-archive ../../src/lib-sieve/plugins/vacation/.libs/libsieve_ext_vacation.a ../../src/lib-sieve/plugins/subaddress/.libs/libsieve_ext_subaddress.a ../../src/lib-sieve/plugins/comparator-i-ascii-numeric/.libs/libsieve_ext_comparator-i-ascii-numeric.a ../../src/lib-sieve/plugins/relational/.libs/libsieve_ext_relational.a ../../src/lib-sieve/plugins/regex/.libs/libsieve_ext_regex.a ../../src/lib-sieve/plugins/copy/.libs/libsieve_ext_copy.a ../../src/lib-sieve/plugins/imap4flags/.libs/libsieve_ext_imap4flags.a ../../src/lib-sieve/plugins/include/.libs/libsieve_ext_include.a ../../src/lib-sieve/plugins/body/.libs/libsieve_ext_body.a ../../src/lib-sieve/plugins/variables/.libs/libsieve_ext_variables.a ../../src/lib-sieve/plugins/enotify/.libs/libsieve_ext_enotify.a ../../src/lib-sieve/plugins/notify/.libs/libsieve_ext_notify.a ../../src/lib-sieve/plugins/environment/.libs/libsieve_ext_environment.a ../../src/lib-sieve/plugins/mailbox/.libs/libsieve_ext_mailbox.a ../../src/lib-sieve/plugins/date/.libs/libsieve_ext_date.a ../../src/lib-sieve/plugins/spamvirustest/.libs/libsieve_ext_spamvirustest.a ../../src/lib-sieve/plugins/ihave/.libs/libsieve_ext_ihave.a ../../src/lib-sieve/plugins/editheader/.libs/libsieve_ext_editheader.a ../../src/lib-sieve/plugins/vnd.dovecot/debug/.libs/libsieve_ext_debug.a ../../src/lib-sieve/plugins/vnd.dovecot/duplicate/.libs/libsieve_ext_duplicate.a ../../src/lib-sieve/util/.libs/libsieve_util.a /home/jc/dovecot-2.2.10/src/lib-imap-storage/.libs/libimap-storage.a -Wl,--no-whole-archive -Wl,--rpath -Wl,/usr/lib64/dovecot -L/home/jc/dovecot-2.2.10/src/lib-storage/.libs -L/home/jc/dovecot-2.2.10/src/lib-dovecot/.libs -L/var/tmp/pigeonhole/usr/lib64/dovecot -L/usr/lib64/dovecot -ldovecot-lda -ldovecot-storage -ldovecot -ldl -lrt -Wl,-soname -Wl,libdovecot-sieve.so.0 -o .libs/libdovecot-sieve.so.0.0.0 /usr/bin/ld: cannot find -ldovecot-lda collect2: ld returned 1 exit status libtool: install: error: relink `libdovecot-sieve.la' with the above command before installing it make[4]: *** [install-dovecot_pkglibLTLIBRARIES] Error 1 make[4]: Leaving directory `/home/jc/pigeonhole-0.4.2/src/lib-sieve' make[3]: *** [install-am] Error 2 make[3]: Leaving directory `/home/jc/pigeonhole-0.4.2/src/lib-sieve' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory `/home/jc/pigeonhole-0.4.2/src/lib-sieve' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/jc/pigeonhole-0.4.2/src' Note that in the link command there are library paths for -L/home/jc/dovecot-2.2.10/src/lib-storage/.libs -L/home/jc/dovecot-2.2.10/src/lib-dovecot/.libs while there is not an equivalent one for the libdovecot-lda -Lhome/jc/dovecot-2.2.10/src/lib-lda/.libs Perhaps some problem with libtool is not generating the right library paths? In the first case, since dovecot and pigeonhole where installed in the same path, the library was found in the installation path -L/var/tmp/pigeonhole/usr/lib64/dovecot but in the second case (the normal if building two separate rpm) the pigeonhole installation path does not contains the dovecot libaries. I'm not a developper and am not familiar enough with libtool, so I'm not able to determine the reason of the error since the DEPENDENCIES and LIBADD definitions in src/lib-sieve/Makefile.am seems to be correct ibdovecot_sieve_la_DEPENDENCIES = \ $(plugins) \ $(top_builddir)/src/lib-sieve/util/libsieve_util.la \ $(LIBDOVECOT_LDA_DEPS) \ $(LIBDOVECOT_STORAGE_DEPS) \ $(LIBDOVECOT_DEPS) libdovecot_sieve_la_LIBADD = \ $(plugins) \ $(top_builddir)/src/lib-sieve/util/libsieve_util.la \ $(LIBDOVECOT_LDA) \ $(LIBDOVECOT_STORAGE) \ $(LIBDOVECOT) I apologize for the long message, hope you can help on this. Regards Juan C. Blanco-- +----------------------------------------------------------------+ | Juan C. Blanco | | | | Centro de Calculo | | | Facultad de Informatica U.P.M. | E-mail: jcblanco at fi.upm.es | | Campus de Montegancedo | | | Boadilla del Monte | Tel.: (+34) 91 336 7466 | | 28660 MADRID (Spain) | Fax : (+34) 91 336 6913 | +----------------------------------------------------------------+
Stephan Bosch
2014-Feb-11 21:07 UTC
[Dovecot] Problem rebuilding Centos 5/6 pigeonhole RPM from mercurial version
On 2/7/2014 6:13 PM, Juan C. Blanco wrote:> works fine, but if I install pigeonhole in a different path, i.e. > > pigeonhole-0.4.2$ make install DESTDIR=/var/tmp/pigeonhole >Ok, so what are you trying to achieve by installing in a different destination? I wouldn't call myself a libtool/autotools wizard and I am pretty much as puzzled by this behavior as you are. Obviously, I have never tried this before myself, and I am wondering why anyone would want to. :) Regards, Stephan.