httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poggenpohl, Daniel" <>
Subject AW: [users@httpd] Self-compiled httpd and OpenSSL: Trying to start httpd without using LD_LIBRARY_PATH
Date Fri, 08 Apr 2016 13:01:28 GMT
So hello,

stepping back a bit, I decided to look which gcc I'm using. It seems it's one in /usr/sfw/bin
(Sun Freeware), and it is gcc 3.4.3 (relatively old, it seems). So I looked what gcc packages
are installed on the system (pkg list | grep gcc) and somehow the wrapper package gcc-48 is
installed, but the binaries aren't (packages gcc-c-48 and gcc-common-48). So I install the
newer gcc (pkg install gcc-c-48) and voila, now I have a gcc 4.8.2 waiting for me, which I
hope is better and will recognize the -R command...

I recompile OpenSSL 1.0.2g via the same commands.
I then reextract my httpd archive and reconfigure using the same commands:
APACHEDIR=/moodle/apache2/2.4.18 \
OPENSSLDIR=/moodle/openssl/1.0.2g \
; \
./configure --prefix=$APACHEDIR \
--enable-rewrite --enable-so --enable-dav --enable-deflate \
--enable-authnz-ldap --enable-ldap --with-ldap \
--enable-ssl --with-ssl=$OPENSSLDIR \
--disable-version \
--with-pcre --with-mpm=prefork --enable-nonportable-atomics=yes --with-included-apr --with-crypto
>apache-2418-configure.out 2>&1

Then I use my new shiny command to remove the global_symbol_pipe bug in the libtool script:
LIBTOOL=/moodle/installers/httpd-2.4.18/srclib/apr/libtool; sed '/export_symbols_cmds.*global_symbol_pipe/s/
| \\\$global_symbol_pipe//' <$LIBTOOL >libtool.tmp; mv libtool.tmp $LIBTOOL
and try to build httpd (gmake).
It builds until here:
Making all in unix
gmake[2]: Entering directory `/basedir/installers/httpd-2.4.18/os/unix'
gmake[3]: Entering directory `/basedir/installers/httpd-2.4.18/os/unix'
/basedir/installers/httpd-2.4.18/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99
-I/basedir/openssl/1.0.2g/include   -I. -I/basedir/installers/httpd-2.4.18/os/unix -I/basedir/installers/httpd-2.4.18/include
-I/basedir/installers/httpd-2.4.18/srclib/apr/include -I/basedir/installers/httpd-2.4.18/srclib/apr-util/include
-I/usr/include/pcre -I/basedir/installers/httpd-2.4.18/modules/aaa -I/basedir/installers/httpd-2.4.18/modules/cache
-I/basedir/installers/httpd-2.4.18/modules/core -I/basedir/installers/httpd-2.4.18/modules/database
-I/basedir/installers/httpd-2.4.18/modules/filters -I/basedir/installers/httpd-2.4.18/modules/ldap
-I/basedir/installers/httpd-2.4.18/modules/loggers -I/basedir/installers/httpd-2.4.18/modules/lua
-I/basedir/installers/httpd-2.4.18/modules/proxy -I/basedir/installers/httpd-2.4.18/modules/session
-I/basedir/installers/httpd-2.4.18/modules/ssl -I/basedir/installers/httpd-2.4.18/modules/test
-I/basedir/installers/httpd-2.4.18/server -I/basedir/installers/httpd-2.4.18/modules/arch/unix
-I/basedir/installers/httpd-2.4.18/modules/dav/main -I/basedir/installers/httpd-2.4.18/modules/generators
-I/basedir/installers/httpd-2.4.18/modules/mappers  -prefer-non-pic -static -c unixd.c &&
touch unixd.lo
/bin/sh[1]: /basedir/installers/httpd-2.4.18/srclib/apr/libtool: cannot execute [Permission
gmake[3]: *** [unixd.lo] Error 126
gmake[3]: Leaving directory `/basedir/installers/httpd-2.4.18/os/unix'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/basedir/installers/httpd-2.4.18/os/unix'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/basedir/installers/httpd-2.4.18/os'
gmake: *** [all-recursive] Error 1

I don't know why, but this line doesn't use /bin/sh . I'm doing all this as root, so I don't
know why "Permission denied" is thrown.

Any thoughts?

@dferradal: I used -R for gcc so that the httpd and the modules know where to look for the
OpenSSL library. It seems no one else knows about this option or else somehow misses it when
I write it. Or do you mean I shouldn't do both (-R and tell the openssl folder to configure)?

Daniel P.
-----Urspr√ľngliche Nachricht-----
Von: Daniel [] 
Gesendet: Freitag, 8. April 2016 13:18
Betreff: Re: [users@httpd] Self-compiled httpd and OpenSSL: Trying to start httpd without

They key in the OP is here:

"I've compiled Apache HTTPD 2.4.18 with the following options:
cd /basedir/installers/httpd-2.4.18
OPENSSLDIR=/basedir/openssl/1.0.2g \" <-----

You compiled httpd against openssl 1.0.2g , so it is normal you have to add LD_LIBRARY_PATH
to use it and if you don't apache will look for the ssl libs in needs in the paths it has
(your system's)

El vie., 8 abr. 2016 a las 10:41, Rainer Canavan (<>) escribió:

	On Fri, Apr 8, 2016 at 12:31 AM, Yann Ylavic <> wrote:
	> On Thu, Apr 7, 2016 at 5:21 PM, Poggenpohl, Daniel
	> <> wrote:
	> I don't know which compiler you are using, but gcc's -R is not working
	> correctly (on Linux at least), whereas "-Wl,-rpath,$OPENSSLDIR/lib"
	> is...
	-R used to work for us on Solaris with gcc to compile/link/run our own
	httpd / php / curl / openssl stack. However, I'm not sure which linker we
	used to use. If ldd claims it's picking up the correct libraries, I'd assume
	it should work at runtime as well.  In case there's any doubt, lsof may show
	which libraries are actually used.
	To unsubscribe, e-mail:
	For additional commands, e-mail:

View raw message