2

I need to install Apache 2.4 32bit version on RHEL 5. I am not installing 64bit apache because the application running on the RHEL5 machine needs apache 32bit (or that's what I thinks because of the past behavior).

I receive "could not read symbols" while make which is probably due to pcre libs are of ELF 64bit when the installation expects it to be of ELF 32bit

**/usr/local/lib/libpcre.so: could not read symbols: File in wrong format**
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/opt/myapp/httpd-2.4.7'
make: *** [all-recursive] Error 1

The configure for Apache 2.4 is run as:

CFLAGS="-m32"; export CFLAGS
LDFLAGS="-m32"; export LDFLAGS
"./configure" \
"--prefix=/opt/myapp/apache2.4" \
"--with-mpm=worker" \
"--enable-static-support" \
"--enable-ssl=static" \
"--enable-modules=most" \
"--disable-authndbd" \
"--disable-authn-dbm" \
"--disable-dbd" \
"--enable-static-logresolve" \
"--enable-static-rotatelogs" \
"--enable-proxy=static" \
"--enable-proxyconnect=static" \
"--enable-proxy-ftp=static" \
"--enable-proxy-http=static" \
"--enable-rewrite=static" \
"--enable-so=static" \
"--with-ssl=/opt/myapp/apache2.4/openssl" \
"--host=x86_32-unknown-linux-gnu" \
"host_alias=x86_32-unknown-linux-gnu" \
"CFLAGS=-m32" \
"LDFLAGS=-m32" \
"--with-included-apr" \
"--with-pcre=/usr/local" \
"$@"

I have installed PCRE without any error using:

./configure --prefix=/usr/local --enable-pcre32

When I do pcretest it get this (Compiled with 8-bit support?):

$ /usr/local/bin/pcretest -C
PCRE version 8.33 2013-05-28
Compiled with
  8-bit support
  No UTF-8 support
  No Unicode properties support
  No just-in-time compiler support
  Newline sequence is LF
  \R matches all Unicode newlines
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack

But when I check the libs created (which are supposed to support 32bit apps) I get ELF 64bit.

$ file libpcre32.so.0.0.1
libpcre32.so.0.0.1: **ELF 64-bit** LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

1 Answer 1

1

Your --enable_pcre32 configure option refers to the 32 bit option of pcre itself (can be enabled to handle 16 bit or 32 bit versions of regex - presumably for Unicode stuff?)

Try building pcre with the -m32 options you used on your Apache configure.

1
  • Or alternatively grab a precompiled one: link
    – tim
    Jun 6, 2014 at 15:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .