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
For me it worked only when I installed OpenSSL in the system and used that.
See in your error message? /usr/pw/apache/openssl/lib/libssl.a that is not /root/shishir/httpd-2.4.1/srclib/openssl
wget http://openssl.org/source/openssl-1.0.1.tar.gz
tar xfz openssl-1.0.1.tar.gz
cd openssl-*
./config --prefix=/usr zlib-dynamic --openssldir=/etc/ssl shared
make
sudo make install
./buildconf
./configure --prefix=/opt/apache2 --enable-pie --enable-mods-shared=all --enable-so --disable-include --enable-deflate --enable-headers --enable-expires --enable-ssl=shared --enable-mpms-shared=all --with-mpm=event --enable-rewrite --with-z=/home/mario/apache24/httpd-2.4.2/srclib/zlib --enable-module=ssl --enable-fcgid --with-included-apr
i have used the following..
for openssl
./config no-threads --prefix=/usr/pw/apache/openssl
make
make install
for httpd2.4.1
./configure --prefix=/usr/pw/apache --with-ssl=/usr/pw/apache/openssl --enable-ssl=shared --enable-mods-shated=most
--with-expat=builtin --with-included-apr --with-pcre=/root/shishir/pcre-8.30/pcre-config
is this wrong? or require some correction?
is zlib required here?
zlib is for mod deflate needed.
For openssl you may try
./config no-threads shared --prefix=/usr/pw/apache/openssl
cause your error message says: recompile with -fPIC that is the shared option for gcc
Thanks for the inputs, tried as suggest
./config no-threads shared --prefix=/usr/pw/apache/openssl
and got a new error
/usr/bin/ld: libcrypto.a(e_4758cca.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
libcrypto.a(e_4758cca.o): could not read symbols: Bad value
Did you run make clean before trying?
by the way, which Linux are you using?
yea it worked for that phase..thanks for the tip.
but this time i can see mod_ssl.so in my \apache\modules list but when i try to start the apache it is throwing the below error.
httpd: Syntax error on line 155 of /usr/pw/apache/conf/httpd.conf: Cannot load /usr/pw/apache/modules/mod_ssl.so into server: /usr/pw/apache/modules/mod_ssl.so: undefined symbol: SSL_SESSION_get_compress_id
Any suggestions on this?
Hi,
Any suggestions on
httpd: Syntax error on line 155 of /usr/pw/apache/conf/httpd.conf: Cannot load /usr/pw/apache/modules/mod_ssl.so into server: /usr/pw/apache/modules/mod_ssl.so: undefined symbol: SSL_SESSION_get_compress_id
Thanks,
Shishir
I'm seeing this same error on RHEL6.2, with openssl 1.0.1c and Apache 2.4.1:
httpd: Syntax error on line 33 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/mod_ssl.so into server: /usr/local/apache/modules/mod_ssl.so: undefined symbol: SSL_SESSION_get_compress_id
Does anyone have any idea what I can do to solve this?
Thanks,
Paul
I discovered my problem was that at runtime this was linking to my OS's openssl libraries rather than the openssl I'd built in /usr/local/openssl
export LD_LIBRARY_PATH=/usr/local/openssl/lib
then running apache fixed it.
Quote from: shishir on May 23, 2012, 11:41:09 AM
Hi,
Any suggestions on
httpd: Syntax error on line 155 of /usr/pw/apache/conf/httpd.conf: Cannot load /usr/pw/apache/modules/mod_ssl.so into server: /usr/pw/apache/modules/mod_ssl.so: undefined symbol: SSL_SESSION_get_compress_id
Thanks,
Shishir
Hi Shishir, I'm getting this error too. I found your post after pasting the error into google. Do you know what this code means and how to get rid of it? Thanks.
Yes the issue can be solved by export LD_LIBRARY_PATH=/usr/local/openssl/lib
You can see an example in https://github.com/JBlond/debian_build_apache24
Quote from: mario on March 28, 2016, 09:43:50 PM
Yes the issue can be solved by reading about the 4 Minutes Fighter Abs (http://fitnessbond.com/4-minute-fighter-abs-review/) export LD_LIBRARY_PATH=/usr/local/openssl/lib
You can see an example in https://github.com/JBlond/debian_build_apache24
Thank you very much Mario, github very useful. Thanks
Thank you, yes! Finally figured out how to solve my compiling issue with Apache!
Much appreciated, Sara
Quote from: lordoftheflies on July 09, 2016, 10:17:22 AM
I found this post by searching google for my problem, i used the github recommendation to solve the problem but now my computer is freezing everytime i run anything, i'm starting to think this is beyond me ???
how is your folder structure? How did you configure your apache build?
it seems that your apache is compiled against a different OpenSSL version than it was compiled against.
Hi, Any suggestions on httpd: Syntax error on line 155 of /usr/pw/apache/conf/httpd.conf: Cannot load /usr/pw/apache/modules/ server: /usr/pw/apache/modules/mod_ssl.so: undefined symbol: SSL_SESSION_get_compress_id Thanks, Shishir
Quote from: ClaireEllison
Hi, Any suggestions on httpd: Syntax error on line 155 of /usr/pw/apache/conf/httpd.conf: Cannot load /usr/pw/apache/modules/ server: /usr/pw/apache/modules/mod_ssl.so: undefined symbol: SSL_SESSION_get_compress_id Thanks, Shishir
You compiled against a wroing OpenSSL Version. So solve this see what I posted before.
Quote from: mario on March 28, 2016, 09:43:50 PM
Yes the issue can be solved by export LD_LIBRARY_PATH=/usr/local/openssl/lib
You can see an example in https://github.com/JBlond/debian_build_apache24
Quote from: lordoftheflies on July 09, 2016, 10:17:22 AM
I found this post by searching google for my problem, i used the github recommendation to solve the problem but now my computer is freezing everytime i run anything, i'm starting to think this is beyond me ???
You mix different OpenSSL Versions. That is why oyu have to tell the compiler which path to use.
example
export LDFLAGS="-Wl,-rpath,/opt/openssl/lib"
Quote from: shishir on April 24, 2012, 12:01:03 PM
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
Needs open SSL mate.
Do we have any update here? Did i (https://mymusclepal.com)t go well? I think that Mario gave you the answer basically..
hi! i am also looking for new updates.
porno gratis (https://www.bingoporno.com/porno-gratis/) free porn (https://pornjimbo.com/) porno (https://pornodk.dk/) sex webcam (https://www.dinocams.com/en/)
Yes, you find it here https://github.com/JBlond/debian_build_apache24/
But now it is a much fresher OpenSSL Version ;)
That sort of error i was facing Long back and i didn't found out any solutions :-\
Im trying to install apache http server 2.4.9 on mac osx 10.9. I have downloaded the gcc compiler.
sh-3.2# gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix.
Quote from: Perrytonitus on December 23, 2022, 02:05:15 PMIm trying to install apache http server 2.4.9 on mac osx 10.9. I have downloaded the gcc compiler.
sh-3.2# gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix.
thank you so much share your problem solve code :D