You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Hu, Xuekun" <xu...@intel.com> on 2005/08/11 11:59:39 UTC
Compiling Apache-2.1.6-alpha error on SLES9 x86_64
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.
So, I think the below patch could fix the problem for x86_64 bit Linux.
diff -Nraup httpd-2.1.6-alpha.orig/srclib/apr-util/build/apu-conf.m4
httpd-2.1.6-alpha.lib64/srclib/apr-util/build/apu-conf.m4
--- httpd-2.1.6-alpha.orig/srclib/apr-util/build/apu-conf.m4
2005-08-11 10:16:44.653903328 +0800
+++ httpd-2.1.6-alpha.lib64/srclib/apr-util/build/apu-conf.m4
2005-08-11 10:19:56.132794112 +0800
@@ -40,7 +40,14 @@ AC_DEFUN(APU_TEST_EXPAT,[
expat_libtool=""
- if test -r "$1/lib/expat.h.in"; then
+ if test -r "$1/include/expat.h" -a \
+ -r "$1/lib64/libexpat.la"; 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/lib/expat.h.in"; then
dnl Expat 1.95.* distribution
expat_include_dir="$1/lib"
expat_ldflags="-L$1/lib"
@@ -54,13 +61,6 @@ AC_DEFUN(APU_TEST_EXPAT,[
expat_libs="-lexpat"
expat_libtool="$1/lib/libexpat.la"
elif test -r "$1/include/expat.h" -a \
- -r "$1/lib64/libexpat.la"; 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.a"; then
dnl Expat 1.95.* installation (without libtool)
dnl FreeBSD textproc/expat2
Since some Linux (64bit) distributions maybe have lib/libexpat.la file,
so I put the lib64 check early. Any comments?
Thanks,
Xuekun Hu
Re: Compiling Apache-2.1.6-alpha error on SLES9 x86_64
Posted by Andreas Steinmetz <as...@domdv.de>.
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 robotrap@domdv.de
Re: Compiling Apache-2.1.6-alpha error on SLES9 x86_64
Posted by Andreas Steinmetz <as...@domdv.de>.
Hu, Xuekun wrote:
> I couldn't successfully compile Apache (2.1.6-alpha) with SLES9
> (2.6.5-7.97-smp, 64bit).
I now added a hopefully complete apr-util patch to bugzilla bug 28205.
--
Andreas Steinmetz SPAMmers use robotrap@domdv.de
Re: Compiling Apache-2.1.6-alpha error on SLES9 x86_64
Posted by Joe Orton <jo...@redhat.com>.
On Thu, Aug 11, 2005 at 03:06:51PM +0200, Andreas Steinmetz wrote:
> Hu, Xuekun wrote:
...
> > Since this is 64 bit, libexpat.la should be reference to /usr/lib64
> > instead of /usr/lib.
...
> >
> > Since some Linux (64bit) distributions maybe have lib/libexpat.la file,
> > so I put the lib64 check early. Any comments?
>
> I think it will help. It solves the problem in most cases but not if
> somebody wants to build a 32bit apache on AMD64 which can happen with
> respect to third party modules. Any auto* tools guru?
Right; re-ordering the tests just breaks the 32-bit build on a biarch
platform (be that "gcc -m32" on x86_64 or just plain "gcc" on ppc)
"rpm --erase expat-devel.i386"
is the workaround I'd recommend.
joe
Re: Compiling Apache-2.1.6-alpha error on SLES9 x86_64
Posted by Andreas Steinmetz <as...@domdv.de>.
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.
>
> So, I think the below patch could fix the problem for x86_64 bit Linux.
>
> diff -Nraup httpd-2.1.6-alpha.orig/srclib/apr-util/build/apu-conf.m4
> httpd-2.1.6-alpha.lib64/srclib/apr-util/build/apu-conf.m4
> --- httpd-2.1.6-alpha.orig/srclib/apr-util/build/apu-conf.m4
> 2005-08-11 10:16:44.653903328 +0800
> +++ httpd-2.1.6-alpha.lib64/srclib/apr-util/build/apu-conf.m4
> 2005-08-11 10:19:56.132794112 +0800
> @@ -40,7 +40,14 @@ AC_DEFUN(APU_TEST_EXPAT,[
>
> expat_libtool=""
>
> - if test -r "$1/lib/expat.h.in"; then
> + if test -r "$1/include/expat.h" -a \
> + -r "$1/lib64/libexpat.la"; 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/lib/expat.h.in"; then
> dnl Expat 1.95.* distribution
> expat_include_dir="$1/lib"
> expat_ldflags="-L$1/lib"
> @@ -54,13 +61,6 @@ AC_DEFUN(APU_TEST_EXPAT,[
> expat_libs="-lexpat"
> expat_libtool="$1/lib/libexpat.la"
> elif test -r "$1/include/expat.h" -a \
> - -r "$1/lib64/libexpat.la"; 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.a"; then
> dnl Expat 1.95.* installation (without libtool)
> dnl FreeBSD textproc/expat2
>
> Since some Linux (64bit) distributions maybe have lib/libexpat.la file,
> so I put the lib64 check early. Any comments?
I think it will help. It solves the problem in most cases but not if
somebody wants to build a 32bit apache on AMD64 which can happen with
respect to third party modules. Any auto* tools guru?
--
Andreas Steinmetz SPAMmers use robotrap@domdv.de