logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in  RSS Apache Lounge  


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.


Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Errors while compiling Apache 2.4.1 openssl 1.0.1 on Linux
Author
shishir



Joined: 07 Mar 2012
Posts: 7
Location: India, Bangalore

PostPosted: Tue 24 Apr '12 11:54    Post subject: Errors while compiling Apache 2.4.1 openssl 1.0.1 on Linux Reply with quote

Hi,

I am trying to compile Apache 2.4.1 with openssl 1.0.1 on Linux 2.6.32-71.el6.x86_64.
Following is the last block of the 'make' command of apache.

make[4]: Entering directory `/root/shishir/httpd-2.4.1/modules/ssl'
/root/shishir/httpd-2.4.1/srclib/apr/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -pthread -o mod_ssl.la -rpath /usr/pw/apache/modules -module -avoid-version mod_ssl.lo ssl_engine_config.lo ssl_engine_dh.lo ssl_eng
ine_init.lo ssl_engine_io.lo ssl_engine_kernel.lo ssl_engine_log.lo ssl_engine_mutex.lo ssl_engine_pphrase.lo ssl_engine_rand.lo ssl_engine_vars.lo ssl_scache.lo ssl_util_stapling.lo ssl_util.lo ssl_util_ssl.lo ssl_engine_ocsp.lo
ssl_util_ocsp.lo -L/usr/pw/apache/openssl/lib -lssl -lcrypto -lrt -lcrypt -lpthread -export-symbols-regex ssl_module
/usr/bin/ld: /usr/pw/apache/openssl/lib/libssl.a(s3_srvr.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/pw/apache/openssl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_ssl.la] Error 1
make[4]: Leaving directory `/root/shishir/httpd-2.4.1/modules/ssl'



Please note, make test for openssl came successful.

Please suggest what can be wrong while reading libssl.a?

Thanks,
Shishir
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 610
Location: Milford, MA, USA

PostPosted: Tue 24 Apr '12 15:19    Post subject: Reply with quote

The root problem seems to be with your compile of OpenSSL-1.0.1, not Apache.

Per the error message "recompile with -fPIC ", you should add the switch -fPIC to your ./config (or your ./Configure) command when you build OpenSSL. You may also want to add no-gost to this command too.
I use these commands to build OpenSSL on X64 Linux:
Code:
./config --prefix=${destination_dir} -fPIC no-gost no-shared no-zlib
make
make install

Position Independent Code is necessary for a module like mod_ssl which may get placed anywhere in memory at runtime. It is not necessary for the standalone OpenSSL test program, which is why make test worked OK without -fPIC.

FYI - The OpenSSL code for the 1970's-era Soviet GOST cipher can cause problems when compiling with -fPIC on X64 platforms. Since GOST is not used by modern browsers, omitting this cipher should not cause you any problems with mod_ssl.

I hope this helps,
-tom-
Back to top


Reply to topic   Topic: Errors while compiling Apache 2.4.1 openssl 1.0.1 on Linux View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads