Hu, Xuekun wrote: > I couldn't successfully compile Apache (2.1.6-alpha) with SLES9 > (2.6.5-7.97-smp, 64bit). > > The error is: > ...-lrt -lcrypt -lpthread -ldl -lgdbm -ldb-4.2 /usr/lib/libexpat.la > /root/huxuekun/httpd-2.1.6-alpha/srclib/apr/libapr-1.la -lrt -lcrypt > -lpthread -ldl > /usr/lib/libexpat.so: could not read symbols: Invalid operation > collect2: ld returned 1 exit status > make[3]: *** [libaprutil-1.la] Error 1 > make[3]: Leaving directory > `/root/huxuekun/httpd-2.1.6-alpha/srclib/apr-util' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory > `/root/huxuekun/httpd-2.1.6-alpha/srclib/apr-util' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/root/huxuekun/httpd-2.1.6-alpha/srclib' > make: *** [all-recursive] Error 1 > > Since this is 64 bit, libexpat.la should be reference to /usr/lib64 > instead of /usr/lib.
Attached is a patch against apr-util that solves the problem without touching the defaults. It allows building against expat residing in lib64 for 64bit installations by specifying "--enable-lib64" to configure as well as expat residing in lib for 32bit installations. The neat thing is that "--enable-lib64" is generic and its value can be reused whereever the same problem arises. -- Andreas Steinmetz SPAMmers use [EMAIL PROTECTED]
--- apr-util/build/apu-conf.m4.orig 2005-08-23 16:19:57.000000000 +0200 +++ apr-util/build/apu-conf.m4 2005-08-23 16:10:23.000000000 +0200 @@ -20,6 +20,17 @@ dnl dnl +dnl enable preference of lib64 instead of lib +dnl +AC_ARG_ENABLE(lib64, +AC_HELP_STRING([--enable-lib64],[prefer lib64 over lib [[default=no]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-lib64, need yes or no]) ;; +esac], +[enable_lib64=no]) + +dnl dnl APU_FIND_APR: figure out where APR is located dnl AC_DEFUN([APU_FIND_APR], [ @@ -64,6 +75,14 @@ expat_libs="-lexpat" expat_libtool="$1/lib/libexpat.la" elif test -r "$1/include/expat.h" -a \ + -r "$1/lib64/libexpat.la" -a \ + "$enable_lib64" = "yes" ; then + dnl Expat 1.95.* installation on certain 64-bit platforms (with libtool) + expat_include_dir="$1/include" + expat_ldflags="-L$1/lib64" + expat_libs="-lexpat" + expat_libtool="$1/lib64/libexpat.la" + elif test -r "$1/include/expat.h" -a \ -r "$1/lib/libexpat.la"; then dnl Expat 1.95.* installation (with libtool) expat_include_dir="$1/include"