httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Huang, Jinhui (OST)" <Jinhui.Huang....@dot.gov>
Subject RE: [users@httpd] Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"
Date Fri, 29 Apr 2016 13:39:22 GMT
Thank you for the advice of using pcre 8.38. I installed it last night successfully to replace
the old. 

When I first try to install it using 
#  export CC="gcc -m64"
#  ./configure --prefix=/usr/local/apache2/pcre/
# make 
I received the following error, 

....
....
  CC       libpcre_la-pcre_version.lo
  CC       libpcre_la-pcre_xclass.lo
  CC       libpcre_la-pcre_chartables.lo
  CCLD     libpcre.la
  CC       libpcreposix_la-pcreposix.lo
  CCLD     libpcreposix.la
  CXX      libpcrecpp_la-pcrecpp.lo
  CXX      libpcrecpp_la-pcre_scanner.lo
  CXX      libpcrecpp_la-pcre_stringpiece.lo
  CXXLD    libpcrecpp.la
ld: fatal: file ./.libs/libpcre.so: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to .libs/libpcrecpp.so.0.0.1
collect2: ld returned 1 exit status
*** Error code 1
The following command caused the error:
echo "  CXXLD   " libpcrecpp.la;/bin/bash ./libtool --silent --tag=CXX    --mode=link g++
     -O2 -version-info 0:1:0   -o libpcrecpp.la -rpath /usr/local/apache2/pcre/lib libpcrecpp_la-pcrecpp.lo
 libpcrecpp_la-pcre_scanner.lo  libpcrecpp_la-pcre_stringpiece.lo libpcre.la
make: Fatal error: Command failed for target `libpcrecpp.la'
Current working directory /usr/local/apache2/install/pcre-8.38
*** Error code 1
make: Fatal error: Command failed for target `all'

Inspired by the example I searched online, I added one more option (--disable-cpp) to the
configure. Then the pcre was installed successfully:

# ./configure --prefix=/usr/local/apache2/pcre --disable-cpp
...
# make clean
...
# make
...
...
  CCLD     libpcre.la
  CC       libpcreposix_la-pcreposix.lo
  CCLD     libpcreposix.la
  CC       pcretest-pcretest.o
  CC       pcretest-pcre_printint.o
  CCLD     pcretest
ld: warning: file /usr/local/apache2/install/pcre-8.38/.libs/libpcre.so: linked to ./.libs/libpcre.so:
attempted multiple inclusion of file
  CC       pcregrep-pcregrep.o
  CCLD     pcregrep
ld: warning: file /usr/local/apache2/install/pcre-8.38/.libs/libpcre.so: linked to ./.libs/libpcre.so:
attempted multiple inclusion of file
#
# make install
...

I hope the two warnings during make are not important.  Please let me know if you need to
see the whole screen capture (text file).


Last night, after the install of the PCRE 8.38, I tried the Apache installation again. This
time I got a different error message. I will post it very soon.

Jin


-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de] 
Sent: Thursday, April 28, 2016 3:30 PM
To: users@httpd.apache.org
Cc: Huang, Jinhui (OST)
Subject: Re: [users@httpd] Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file
ab.o: wrong ELF class: ELFCLASS32"

Am 28.04.2016 um 19:59 schrieb Jinhui.Huang.CTR@dot.gov:
> Hi, Rainer:
> The following is the output of make,  after I run a "make clean" first.
> Jin
> --------------------------------------------------------
> # make clean
> Making clean in test
> rm -f *.o *.lo *.slo *.obj *.a *.la
> rm -rf .libs
> Making clean in srclib
> Making clean in apr-util
> Making clean in test
> rm -f ./*.o ./*.lo ./*.a ./*.la ./*.so ./*.obj rm -rf ./.libs rm -f 
> manyfile.bin testfile.txt data/sqlite*.db dbd testall rm -rf 
> autom4te.cache ......
> ......
>
> # make
> Making all in srclib
> Making all in apr
> /usr/local/apache2/install/httpd-2.4.20/srclib/apr/build/mkdir.sh tools
> /bin/bash /usr/local/apache2/install/httpd-2.4.20/srclib/apr/libtool --silent --mode=compile
gcc -m64 -g -O2   -DHAVE_CONFIG_H  -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT 
 -I./include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/arch/unix -I./include/arch/unix
-I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/arch/unix -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include
-I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/private -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/private
 -o tools/gen_test_char.lo -c tools/gen_test_char.c && touch tools/gen_test_char.lo
> /bin/bash /usr/local/apache2/inst
> ......
> ......
> pd-2.4.20/modules/ssl -I/usr/local/apache2/install/httpd-2.4.20/modules/test -I/usr/local/apache2/install/httpd-2.4.20/server
-I/usr/local/apache2/install/httpd-2.4.20/modules/arch/unix -I/usr/local/apache2/install/httpd-2.4.20/modules/dav/main
-I/usr/local/apache2/install/httpd-2.4.20/modules/generators -I/usr/local/apache2/install/httpd-2.4.20/modules/mappers
 -prefer-non-pic -static -c util_xml.c && touch util_xml.lo
> /usr/local/apache2/install/httpd-2.4.20/srclib/apr/libtool --silent --mode=compile gcc
-m64 -std=gnu99  -g -O2      -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT     -I.
-I/usr/local/apache2/install/httpd-2.4.20/os/unix -I/usr/local/apache2/install/httpd-2.4.20/include
-I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr-util/include
-I/usr/local/apache2/pcre2/include -I/usr/local/apache2/install/httpd-2.4.20/modules/aaa -I/usr/local/apache2/install/httpd-2.4.20/modules/cache
-I/usr/local/apache2/install/httpd-2.4.20/modules/core -I/usr/local/apache2/install/httpd-2.4.20/modules/database
-I/usr/local/apache2/install/httpd-2.4.20/modules/filters -I/usr/local/apache2/install/httpd-2.4.20/modules/ldap
-I/usr/local/apache2/install/httpd-2.4.20/modules/loggers -I/usr/local/apache2/install/httpd-2.4.20/modules/lua
-I/usr/local/apache2/install/httpd-2.4.20/modules/proxy -I/usr/local/apache2/install/httpd-2.4.20/!
 modules/
session -I/usr/local/apache2/install/httpd-2.4.20/modules/ssl -I/usr/local/apache2/install/httpd-2.4.20/modules/test
-I/usr/local/apache2/install/httpd-2.4.20/server -I/usr/local/apache2/install/httpd-2.4.20/modules/arch/unix
-I/usr/local/apache2/install/httpd-2.4.20/modules/dav/main -I/usr/local/apache2/install/httpd-2.4.20/modules/generators
-I/usr/local/apache2/install/httpd-2.4.20/modules/mappers  -prefer-non-pic -static -c util_filter.c
&& touch util_filter.lo
> /usr/local/apache2/install/httpd-2.4.20/srclib/apr/libtool --silent --mode=compile gcc
-m64 -std=gnu99  -g -O2      -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT     -I.
-I/usr/local/apache2/install/httpd-2.4.20/os/unix -I/usr/local/apache2/install/httpd-2.4.20/include
-I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr-util/include
-I/usr/local/apache2/pcre2/include -I/usr/local/apache2/install/httpd-2.4.20/modules/aaa -I/usr/local/apache2/install/httpd-2.4.20/modules/cache
-I/usr/local/apache2/install/httpd-2.4.20/modules/core -I/usr/local/apache2/install/httpd-2.4.20/modules/database
-I/usr/local/apache2/install/httpd-2.4.20/modules/filters -I/usr/local/apache2/install/httpd-2.4.20/modules/ldap
-I/usr/local/apache2/install/httpd-2.4.20/modules/loggers -I/usr/local/apache2/install/httpd-2.4.20/modules/lua
-I/usr/local/apache2/install/httpd-2.4.20/modules/proxy -I/usr/local/apache2/install/httpd-2.4.20/!
 modules/
session -I/usr/local/apache2/install/httpd-2.4.20/modules/ssl -I/usr/local/apache2/install/httpd-2.4.20/modules/test
-I/usr/local/apache2/install/httpd-2.4.20/server -I/usr/local/apache2/install/httpd-2.4.20/modules/arch/unix
-I/usr/local/apache2/install/httpd-2.4.20/modules/dav/main -I/usr/local/apache2/install/httpd-2.4.20/modules/generators
-I/usr/local/apache2/install/httpd-2.4.20/modules/mappers  -prefer-non-pic -static -c util_pcre.c
&& touch util_pcre.lo
> util_pcre.c:49:18: pcre.h: No such file or directory
> util_pcre.c: In function `ap_regfree':
> util_pcre.c:104: error: `pcre_free' undeclared (first use in this 
> function)
> util_pcre.c:104: error: (Each undeclared identifier is reported only 
> once
> util_pcre.c:104: error: for each function it appears in.)
> util_pcre.c: In function `ap_regcomp':
> util_pcre.c:128: error: `PCRE_DUPNAMES' undeclared (first use in this 
> function)
> util_pcre.c:131: error: `PCRE_CASELESS' undeclared (first use in this 
> function)
> util_pcre.c:133: error: `PCRE_MULTILINE' undeclared (first use in this 
> function)
> util_pcre.c:135: error: `PCRE_DOTALL' undeclared (first use in this 
> function)
> util_pcre.c:138: warning: implicit declaration of function `pcre_compile2'
> util_pcre.c:138: warning: assignment makes pointer from integer 
> without a cast
> util_pcre.c:151: warning: implicit declaration of function `pcre_fullinfo'
> util_pcre.c:151: error: syntax error before "pcre"
> util_pcre.c: In function `ap_regexec_len':
> util_pcre.c:189: error: `PCRE_NOTBOL' undeclared (first use in this 
> function)
> util_pcre.c:191: error: `PCRE_NOTEOL' undeclared (first use in this 
> function)
> util_pcre.c:207: warning: implicit declaration of function `pcre_exec'
> util_pcre.c:207: error: syntax error before "pcre"
> util_pcre.c:230: error: `PCRE_ERROR_NOMATCH' undeclared (first use in 
> this function)
> util_pcre.c:232: error: `PCRE_ERROR_NULL' undeclared (first use in 
> this function)
> util_pcre.c:234: error: `PCRE_ERROR_BADOPTION' undeclared (first use 
> in this function)
> util_pcre.c:236: error: `PCRE_ERROR_BADMAGIC' undeclared (first use in 
> this function)
> util_pcre.c:238: error: `PCRE_ERROR_UNKNOWN_NODE' undeclared (first 
> use in this function)
> util_pcre.c:240: error: `PCRE_ERROR_NOMEMORY' undeclared (first use in 
> this function)
> util_pcre.c: In function `ap_regname':
> util_pcre.c:269: error: syntax error before "pcre"
> util_pcre.c:271: error: syntax error before "pcre"
> util_pcre.c:273: error: syntax error before "pcre"
> *** Error code 1
> make: Fatal error: Command failed for target `util_pcre.lo'
> Current working directory 
> /usr/local/apache2/install/httpd-2.4.20/server
> *** Error code 1

This error is likely a consequence of the error during configure:

checking for pcre-config... false

configure: Using external PCRE library from /usr/local/apache2/pcre2/bin/pcre2-config

   setting PCRE_INCLUDES to "-I/usr/local/apache2/pcre2/include"

Usage: pcre2-config [--prefix] [--exec-prefix] [--version] [--libs8] [--libs-posix]  [--cflags]
[--cflags-posix]

   setting PCRE_LIBS to ""

Usage: pcre2-config [--prefix] [--exec-prefix] [--version] [--libs8] [--libs-posix]  [--cflags]
[--cflags-posix]


This indicates that your try to build httpd against pcre version 10. We 
only support pcre until version 8, latest is 8.38. PCRE version 10, aka 
pcre2, is not API compatible with pcre until 8. Since the path 
/usr/local/apache2/pcre2/ looks like you compiled pcre2 yourself, grab 
pcre 8.38, compile it again and run configure against that one.

This will IMHO *not* fix you other issue about ab.o being 32 bit. Could 
it be, that ab.o was in your build directory from another attempt at 
building where you started without the -m64 flag, so that there was 
already an old 32 bit ab.o file and "make clean" has already fixed that?

Regards,

Rainer

Mime
View raw message