PDA

View Full Version : cannot build apache 2.2 on centos 5.2 64bit



Protollix
07-22-2008, 08:08 AM
this is the error:

make[2]: Entering directory `/usr/local/directadmin/custombuild/httpd-2.2.9/support'
/usr/local/directadmin/custombuild/httpd-2.2.9/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -I/usr/local/include -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I. -I/usr/local/directadmin/custombuild/httpd-2.2.9/os/unix -I/usr/local/directadmin/custombuild/httpd-2.2.9/server/mpm/prefork -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/http -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/filters -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/proxy -I/usr/local/directadmin/custombuild/httpd-2.2.9/include -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/generators -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/mappers -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/database -I/usr/local/directadmin/custombuild/httpd-2.2.9/srclib/apr/include -I/usr/local/directadmin/custombuild/httpd-2.2.9/srclib/apr-util/include -I/usr/local/include -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/proxy/../generators -I/usr/include -I/usr/kerberos/include -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/ssl -I/usr/local/directadmin/custombuild/httpd-2.2.9/modules/dav/main -prefer-non-pic -static -c htpasswd.c && touch htpasswd.lo
/usr/local/directadmin/custombuild/httpd-2.2.9/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread -I/usr/local/include -L/usr/local/lib -L/usr/lib -o htpasswd htpasswd.lo -lm -L/usr/local/lib -lpcre /usr/local/directadmin/custombuild/httpd-2.2.9/srclib/apr-util/libaprutil-1.la -lexpat /usr/local/directadmin/custombuild/httpd-2.2.9/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/lib/libexpat.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.2.9/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.2.9/support'
make: *** [all-recursive] Error 1

*** The make has failed, do you want to try to make again? (y,n):

My first time setting up a 64 bit OS. I am guessing that it's trying to link to the 32bit libraries instead of the 64bit. I have libm and expat 64bit installed in /usr/lib64

What can I do to make custombuild use the proper libs?

loatu
07-22-2008, 10:30 AM
I had the exact same problem today and have fixed it. You were right in guessing that it's a problem with the 32 bit libraries. The install apparently looks for the 32 bit libraries first, and if it finds them it stops looking. Here's what I did to solve it:



mv /usr/lib/libm.a /usr/lib/libm.a.bak
mv /usr/lib/libm.so /usr/lib/libm.so.bak
mv /usr/lib/libexpat.so /usr/lib/libexpat.so.bak
ln -s /usr/lib64/libm.a /usr/lib/libm.a
ln -s /usr/lib64/libm.so /usr/lib/libm.so
ln -s /usr/lib64/libexpat.so /usr/lib/libexpat.so


After doing this, the install worked fine.

Protollix
07-22-2008, 10:37 AM
I had the exact same problem today and have fixed it. You were right in guessing that it's a problem with the 32 bit libraries. The install apparently looks for the 32 bit libraries first, and if it finds them it stops looking. Here's what I did to solve it:



mv /usr/lib/libm.a /usr/lib/libm.a.bak
mv /usr/lib/libm.so /usr/lib/libm.so.bak
mv /usr/lib/libexpat.so /usr/lib/libexpat.so.bak
ln -s /usr/lib64/libm.a /usr/lib/libm.a
ln -s /usr/lib64/libm.so /usr/lib/libm.so
ln -s /usr/lib64/libexpat.so /usr/lib/libexpat.so


After doing this, the install worked fine.

Giving it a go. thanks

My concern is, what about 32 bit programs that might need the 32bit versions still/eventually? I would imagine putting them back to where they were (after compile) won't exactly make apache very happy :p

loatu
07-22-2008, 11:02 AM
Ya, I wondered the same thing. I'll post again if I see something bad.

Protollix
07-22-2008, 11:06 AM
lol, why can't things just work? ;p

Now it's having an issue compiling libxslt. Seems it never builds the actual xslt library before trying to compile inside xsltproc. *sigh*

off to search

Protollix
07-22-2008, 12:45 PM
rebooted and it worked. my guess is I needed to maybe run ldconfig?

DirectAdmin Support
07-22-2008, 12:47 PM
Hello,

We don't yet know of a correct solution, but this is the guide I've rewritten as a workaround:

http://help.directadmin.com/item.php?id=213

This is why we have not yet put CentOS 5.2 64-bit as supported.

John

loatu
03-11-2010, 11:08 AM
So, to revive this issue, I notice that:

http://www.directadmin.com/install.html

mentions that CentOS 5.4 64 bit is supported, yet I still have this problem every time I try to rebuild apache. Following the fix in the mentioned article works, but it's a bit annoying. Shouldn't the ./build script sense whether it's 64-bit and edit appropriately?

DirectAdmin Support
03-11-2010, 11:59 AM
Hello,

Because they're low-level system libraries, we don't want the build script to touch them in case it makes an incorrect judgement, which would completely toast the box. As for why 64-bit boxes are coming with i386/i686 rpms along with the same versions of the 64-bit rpms is beyond me.. possibly to be more compatible with everything.

John

loatu
12-10-2010, 12:03 PM
Another update. An easier way (and perhaps more appropriate than the linking I suggested earlier) is to do the following:

yum remove glibc-devel.i386 expat-devel.i386

Compiling worked perfectly after this.

nmb
02-03-2011, 10:47 PM
Another update. An easier way (and perhaps more appropriate than the linking I suggested earlier) is to do the following:

yum remove glibc-devel.i386 expat-devel.i386

Compiling worked perfectly after this.

This method worked for me. Thanks.