Package: apache2 Severity: serious The apache2 source tree contains four copies of ltmain.sh from Libtool 1.4.3, but at compile time, three of them are replaced with the ambient version, which in my case was 1.6-0+1.5a-1. The newer libtool fails to generate libmain.a properly. I have omitted --silent below, so that you can see the error:
> make[3]: Entering directory > `/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/server' ... > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr/libtool > --mode=link gcc -g -O2 -pthread -DLINUX=2 -D_REENTRANT > -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE > -DAP_HAVE_DESIGNATED_INITIALIZER > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/httpd-2.0.48/srclib/apr/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr-util/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/httpd-2.0.48/srclib/apr-util/include > -I/usr/include -I. > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/server > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/server/mpm/worker > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/include > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/os/unix > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/server/mpm/worker > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/http > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/filters > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/proxy > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/include > -I/usr/include/openssl > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/dav/main > -export-dynamic -L/usr/lib -ldl -o libmain.la test_char.h config.lo log.lo > main.lo vhost.lo util.lo util_script.lo util_md5.lo util_cfgtree.lo > util_ebcdic.lo util_time.lo rfc1413.lo connection.lo listen.lo mpm_common.lo > util_charset.lo util_debug.lo util_xml.lo util_filter.lo > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/server/exports.lo > buildmark.lo scoreboard.lo error_bucket.lo protocol.lo core.lo request.lo > provider.lo > rm -fr .libs/libmain.a .libs/libmain.la > ar cru .libs/libmain.a > ranlib .libs/libmain.a > creating libmain.la > (cd .libs && rm -f libmain.la && ln -s ../libmain.la libmain.la) Note that the ar command did not put any objects in the library! This causes a linker error later on: > make[2]: Entering directory > `/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker' ... > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr/libtool > --silent --mode=link gcc -g -O2 -pthread -DLINUX=2 -D_REENTRANT > -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE > -DAP_HAVE_DESIGNATED_INITIALIZER > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/httpd-2.0.48/srclib/apr/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr-util/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/httpd-2.0.48/srclib/apr-util/include > -I/usr/include -I. -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2 > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/server/mpm/worker > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/include > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/os/unix > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/server/mpm/worker > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/http > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/filters > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/proxy > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/include > -I/usr/include/openssl > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/dav/main > -export-dynamic -L/usr/lib -ldl -o apache2 modules.lo > modules/aaa/mod_access.la modules/aaa/mod_auth.la > modules/loggers/mod_log_config.la modules/loggers/mod_logio.la > modules/metadata/mod_env.la modules/metadata/mod_setenvif.la > modules/http/mod_http.la modules/http/mod_mime.la > modules/generators/mod_status.la modules/generators/mod_autoindex.la > modules/mappers/mod_negotiation.la modules/mappers/mod_dir.la > modules/mappers/mod_userdir.la modules/mappers/mod_alias.la > modules/mappers/mod_so.la server/mpm/worker/libworker.la server/libmain.la > os/unix/libos.la -lz -lssl -lcrypto > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/pcre/libpcre.la > > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr-util/libaprutil-0.la > -lldap -llber -ldb -lexpat > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr/libapr-0.la > -lrt -lm -lcrypt -lnsl -lpthread > /usr/lib/gcc-lib/i486-linux/3.3.2/../../../crt1.o(.text+0x18): In function > `_start': > ../sysdeps/i386/elf/start.S:98: undefined reference to `main' [several other undefined references omitted] Actually, libtool is working correctly; the bug is in the arguments given to libtool when libmain.la is generated. According to the documentation: "If you omit both `-rpath' and `-static', libtool will create a convenience library that can be used to create other libtool libraries, even shared ones." Thus, libtool wanted PIC objects, but none have been compiled: > # main.lo - a libtool object file > # Generated by ltmain.sh - GNU libtool 1.5a (1.1296 2003/10/21 15:03:52) > Debian: 117 $ > # > # Please DO NOT delete this file! > # It is necessary for linking the library. > > # Name of the PIC object. > pic_object=none > > # Name of the non-PIC object. > non_pic_object='main.o' With "-static" added to the libtool invocation, the library gets built correctly. I don't know where it should be added in the build scripts of Apache, though. > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr/libtool > --mode=link gcc -g -O2 -pthread -DLINUX=2 -D_REENTRANT > -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE > -DAP_HAVE_DESIGNATED_INITIALIZER > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/httpd-2.0.48/srclib/apr/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/srclib/apr-util/include > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/httpd-2.0.48/srclib/apr-util/include > -I/usr/include -I. > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/server > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/server/mpm/worker > > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/include > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/os/unix > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/server/mpm/worker > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/http > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/filters > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/proxy > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/include > -I/usr/include/openssl > -I/var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2/modules/dav/main > -export-dynamic -L/usr/lib -ldl -static -o libmain.la test_char.h config.lo > log.lo main.lo vhost.lo util.lo util_script.lo util_md5.lo util_cfgtree.lo > util_ebcdic.lo util_time.lo rfc1413.lo connection.lo listen.lo mpm_common.lo > util_charset.lo util_debug.lo util_xml.lo util_filter.lo > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/server/exports.lo > buildmark.lo scoreboard.lo error_bucket.lo protocol.lo core.lo request.lo > provider.lo > rm -fr .libs/libmain.a .libs/libmain.la > ar cru .libs/libmain.a config.o log.o main.o vhost.o util.o util_script.o > util_md5.o util_cfgtree.o util_ebcdic.o util_time.o rfc1413.o connection.o > listen.o mpm_common.o util_charset.o util_debug.o util_xml.o util_filter.o > /var/tmp/kalle/debian/apache2-2.0.48/build-tree/apache2-build/worker/server/exports.o > buildmark.o scoreboard.o error_bucket.o protocol.o core.o request.o > provider.o > ranlib .libs/libmain.a > creating libmain.la > (cd .libs && rm -f libmain.la && ln -s ../libmain.la libmain.la) Alternatively, if you arranged for apache2 to use the version of libtool bundled in the source package, perhaps the error would not occur. -- System Information: Debian Release: testing/unstable Architecture: i386 Kernel: Linux Astalo 2.4.21-kon.astalo.1 #1 la elokuun 23. 01:05:31 EEST 2003 i686 Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 Versions of packages apache2 build-depends on: ii debhelper 4.1.77 helper programs for debian/rules ii libssl-dev 0.9.7c-5 SSL development libraries, header files and ii openssl 0.9.7c-5 Secure Socket Layer (SSL) binary and related ii bzip2 1.0.2-1 A high-quality block-sorting file compressor ii autoconf 2.58-12 automatic configure script builder ii autotools-dev 20031007.1 Update infrastructure for config.{guess,sub} ii libtool 1.6-0+1.5a-1 Generic library support script ii libdb4.1-dev 4.1.25-10 Berkeley v4.1 Database Libraries [developmen ii zlib1g-dev 1.2.1-2 compression library - development ii libpcre3-dev 4.3-3 Development stuff for libpcre ii libldap2-dev 2.1.23-1 OpenLDAP development libraries ii libexpat1-dev 1.95.6-6 XML parsing C library - development kit