RE: Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Then I recompiled/built Apache successfully. The errors about " ld: fatal: relocations remain against allocatable but non-writable sections" are gone.
	# cd /usr/local/apache2/install/httpd-2.4.20
	# export CC="gcc -m64 -fPIC" 
	# export PATH=/usr/local/apache2/openssl/bin:$PATH

	# ./configure \
	--prefix=/usr/local/apache2/httpd-2.4.20 \
	--with-port=80 \
	--with-mpm=worker \
	--enable-mods-shared=most \
	--enable-ssl \
	--with-ssl=/usr/local/apache2/openssl \
	--enable-proxy \
	--disable-example \
	--with-included-apr \
	--with-pcre=/usr/local/apache2/pcre  

	make clean
	make  
	make install

Again, thank you so much for your time and help.
Jin


-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@xxxxxxxxxxx] 
Sent: Monday, May 02, 2016 3:45 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

Am 02.05.2016 um 20:35 schrieb Andy Wang:
>
>
> On 05/02/2016 12:42 PM, Rainer Jung wrote:
>> Am 02.05.2016 um 19:07 schrieb Huang, Jinhui (OST):
>>> Hi, Rainer:
>>> I checked the 32/64 Bit issue on PCRE first. I found
>>> /usr/local/apache2/pcre/lib/libpcre.a:  current ar archive, 32-bit 
>>> symbol table
>>> /usr/local/apache2/pcre/lib/libpcreposix.a:     current ar archive,
>>> 32-bit symbol table
>>
>> The .so (shared libraries) look fine, the .a (static libraries) not.
>> They are 32 Bit and you can't link a 64 bit binary against them. By 
>> default, the linking should happen against the .so (building 
>> dynamically linked stuff). If you want to make sure, it'd be better 
>> to rename the .a file to .a_ or similar, so they wont get used.
>>
>> Why pcre has build the .a files only as 32 bit and didn't respect 
>> your CC setting I don't know but shouldn't matter for now.
>
> Are you basing that on the file command output?  Keep in mind the 
> symbol table size is not dependent on the bitwidth of the binaries in 
> the archive but rather the size of of the ar archive itself.
>
>  From ar man page:
>
>       -S    When building the archive symbol table, force the  use
>             of the 64-bit capable symbol table format. By default,
>             the 32-bit format is used  for  all  archives  smaller
>             than  4GB,  and  the  larger format is used for larger
>             archives that exceed the 32-bit limit.

Yes, sorry, I just referred to "/usr/local/apache2/pcre/lib/libpcre.a: 
current ar archive, 32-bit symbol table". But since the OP shouldn't IMHO try to link against the .a files, it doesn't actually matter.

> The compile error doesn't appear related to pcre though.  It looks to 
> be more still an openssl related problem.

Agreed.

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux