Bug fix for apache 2.2.6 compilation on 64 bit linux

2007-09-21

This patch will solve ./configure error "/usr/lib/libexpat.so: could not read symbols: File in wrong format" that you encounter when you want to compile apache on 64 bit linux

If you have a 64 bit machine like I do, and you want to build a 64 bit apache, then you must first patch apache source, because there is a bug that fails apache to compile on 64 bit machines. You must apply this patch to your apache source

Go in the "httpd-2.2.6/srclib/apr-util" directory and apply it with "patch -p1 < apr-util_2.2.6.patch"

cd httpd-2.2.6/srclib/apr-util
patch -p1 < apr-util_2.2.6.patch

Delete ./configure scripts, apache configure and apr-utils configure

cd /home/source/httpd-2.2.6
rm configure
rm srclib/apr-util/configure

Then, rebuild the configure scripts

./buildconf

Add "--enable-lib64" to your configure and you are ready to compile. For details on compiling apache / updating whithout downtime, click here

./configure --prefix=/home/web/apache --enable-so --enable-rewrite --disable-cgi --disable-cgid --disable-autoindex --with-mpm=worker --enable-nonportable-atomics=yes  --enable-lib64 --libdir=/usr/lib64 && make && sudo make install

Share this with the world

Related

Comments

V.Z. Bunich

Hi there ,
first of all thanks for the patch and your effort.

Yet i still have a problem with it after
root@buddha httpd-2.2.6]make
I get the following error:

/usr/local/src/httpd-2.2.6/server/mpm/worker/worker.c:1203: undefined reference to `ap_thread_stacksize'

<...
/usr/local/src/httpd-2.2.6/srclib/pcre/libpcre.la /usr/local/src/httpd-2.2.6/srclib/apr-util/libaprutil-1.la -lexpat /usr/local/src/httpd-2.2.6/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl
server/mpm/worker/.libs/libworker.a(worker.o)(.text+0x13cc): In function `child_main':
/usr/local/src/httpd-2.2.6/server/mpm/worker/worker.c:1203: undefined reference to `ap_thread_stacksize'
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.2.6'
make: *** [all-recursive] Error 1
root@blahblah httpd-2.2.6]#


i will try to look further in to it...

Vlad

Posted on 2007-11-11 18:13:49
V.Z. Bunich

I removed the multi-threading --with-mpm=worker it works now , thanks!

Posted on 2007-11-11 19:39:13

Make yourself heard

Categories

Subscribe

All Posts

Tutorials posts

All Comments

This post comments

© Copyright CodeAssembly

All code is licensed under GPL, unless otherwise noted