httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "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"
Date Mon, 02 May 2016 20:40:09 GMT
Hi, Andy:
Thank you for the comment about CFLAGS="-m64" and " solaris64-x86_64-gcc". 
I will use CFLAGS="-m64" when I re compile/build PCRE. 
For OpenSSL, actually, I saw this option when I select the target for Configure program. I
thought  that  "solaris64-x86_64-gcc" is for a windows/intel system ONLY. I am using a Sun
Solaris system, so, I selected the  " solaris64-sparcv9-gcc" instead. May I use this flag
for Sun Solaris system as well?

-----Original Message-----
From: Andy Wang [] 
Sent: Monday, May 02, 2016 4:16 PM
Subject: Re: [users@httpd] Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file
ab.o: wrong ELF class: ELFCLASS32"

On 05/02/2016 03:06 PM, Huang, Jinhui (OST) wrote:
> Hi, Rainer:
> Thank you for the comments.
> Following your suggestion this morning, I recompiled/built the OpenSSL with new  "shared"
 option.  Then I checked the .so files to make sure they are 64 bit.
> 	# export CC="gcc -m64 -fPIC"
> 	# ./Configure solaris64-sparcv9-gcc shared  --prefix=/usr/local/apache2/openssl --openssldir=/usr/local/apache2/openssl
> 	# make depend
> 	# make
> 	# make install

A few tidbits to help you.  OpenSSL actually has this Configure target "solaris64-x86_64-gcc"

"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG
DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-fPIC:-m64 -shared\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",

It takes care of all of the minimum CFLAGS you need.  If you use this target you don't even
need to export CC="gcc -m64 -fPIC".

Your PCRE build problem earlier is directly related to this.  If you had instead set CFLAGS="-m64"
the c++ pcre code would have likely compiled and linked properly.  Keep in mind g++ is a different
binary than gcc and likely PCRE's build script usex CXX instead of CC.  So it would have lost
your augmented CC command and used the default behavior which is to compile to 32-bit arch.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message