0

Server info:

# cat /etc/*-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 0
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"

First I installed OpenSSL 1.0.1g:

# tar -zxf openssl-1.0.1g.tar.gz
# cd /usr/src/openssl-1.0.1g
# make clean
# ./config --prefix=/usr --openssldir=/usr/local/openssl enable-tlsext no-shared no-zlib -fPIC no-gost
# make depend
# make
# make test
# make install
# mv /usr/bin/openssl /root/
# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
# openssl version
  OpenSSL 1.0.1g 7 Apr 2014

Then I installed APR and APR-UTIL

# cd /usr/src

# tar -zxf apr-1.5.2.tar.gz
# cd /usr/src/apr-1.5.2
# ./configure
# make
# make test
# make install

# tar -zxf apr-util-1.5.4.tar.gz
# cd /usr/src/apr-util-1.5.4/
# ./configure --with-apr=/usr/local/apr --with-ldap=ldap  --with-crypto 
# make
# make test
# make install

# cp /usr/local/apr/bin/* /usr/bin

Then I install Apache 2.4.16:

# tar -zxf httpd-2.4.16.tar.gz
# cd /usr/src/httpd-2.4.16/

# make clean

# env LDFLAGS=-ldl
# export LIBS=-ldl

# CFLAGS="-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables  -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED"; export CFLAGS

# CPPFLAGS="-DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096"; export CPPFLAGS

# ./configure  --prefix=/usr/sbin/httpd \
--enable-shared \
--enable-layout=SuSE \
--with-apr=/usr/bin/apr-1-config \
--with-apr-util=/usr/bin/apu-1-config \
--enable-exception-hook \
--with-pcre \
--enable-pie \
--enable-ssl \
--with-ssl=/usr/local/ssl \
--enable-ssl-staticlib-deps \
--enable-mods-static=ssl \
--enable-mod_php5 \
--enable-mod_fcgid \
--enable-mod_perl \
--enable-mod_session_crypto \
--disable-isapi \
--enable-deflate \
--enable-echo \
--enable-filter \
--enable-ext-filter \
--enable-charset-lite \
--enable-file-cache \
--enable-logio \
--enable-dumpio \
--enable-bucketeer \
--enable-case_filter \
--enable-case_filter_in \
--with-ldap \
--enable-ldap \
--enable-authnz_ldap \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-cache \
--enable-disk-cache \
--enable-mem-cache \
--enable-VERSION \
--enable-dav-lock \
--enable-authn-alias \
--enable-optional-hook-export \
--enable-optional-hook-import \
--enable-optional-fn-import \
--enable-optional-fn-export \
--enable-suexec \
--with-suexec-bin=/usr/sbin/suexec2 \
--with-suexec-caller=wwwrun \
--with-suexec-docroot=/srv/www \
--with-suexec-logfile=/var/log/apache2/suexec.log \
--with-suexec-userdir=public_html \
--with-suexec-uidmin=96 \
--with-suexec-gidmin=96 \
--with-suexec-safepath=/usr/local/bin:/usr/bin:/bin 

Configure seems to work without any errors

Then I issue:

# make

I get these errors:

/usr/local/apr/build-1/libtool --silent --mode=link gcc -std=gnu99  -pthread  -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -L/usr/local/ssl/lib -lssl -lcrypto -ldl -luuid -lrt -lcrypt -lpthread -pie \
                 -o ab  ab.lo        /usr/local/apr/lib/libaprutil-1.la -lexpat /usr/local/apr/lib/libapr-1.la -luuid -lrt -lcrypt -lpthread -lm
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: /usr/local/ssl/lib/libssl.a(s2_clnt.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [ab] Error 1
make[2]: Leaving directory `/usr/src/httpd-2.4.16/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/httpd-2.4.16/support'
make: *** [all-recursive] Error 1

I get the following errors in config.log

133  conftest.c:9:28: error: ac_nonexistent.h: No such file or directory

147  conftest.c:59: error: expected ';', ',' or ')' before 'text'

148-157
conftest.c: In function 'main':
conftest.c:111: warning: implicit declaration of function 'test_restrict'
conftest.c:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newvar'
conftest.c:113: error: 'newvar' undeclared (first use in this function)
conftest.c:113: error: (Each undeclared identifier is reported only once
conftest.c:113: error: for each function it appears in.)
conftest.c:123: error: 'for' loop initial declaration used outside C99 mode
configure:6017: $? = 1
configure: failed program was:
| /* confdefs.h */


380/438  conftest.c:52:26: error: minix/config.h: No such file or directory

535/607  conftest.c:66:27: error: sys/processor.h: No such file or directory

658/731  conftest.c:67:21: error: sys/sdt.h: No such file or directory

773/846  conftest.c:67:25: error: sys/loadavg.h: No such file or directory

1490/1588  conftest.c:92:21: error: bstring.h: No such file or directory
3
  • It looks like you're missing a lot of -dev or -devel packages.
    – Keith
    Oct 2, 2015 at 6:38
  • Like what Keith?
    – AllisonC
    Oct 2, 2015 at 13:03
  • I can't tell exactly, but there should be a development meta-package you can install. I don't use Suse so I can be more specific, sorry.
    – Keith
    Oct 3, 2015 at 22:30

1 Answer 1

0

Well, kudos to you on doing a custom compile! Reminds me of the good old days!

That said, this seems to be the key error:

/usr/local/ssl/lib/libssl.a: could not read symbols: Bad value

In my experience that comes from when a static library is 32-bit versus the requirements of the make which would be 64-bit. And since it’s an SSL item, it seems that all stems from OpenSSL 1.0.1g itself.

Looking at the compilation instructions on the official OpenSSL site shows that various configs exist for different systems and can be viewed by running this ./configure command from the source code; downloaded from here:

./configure LIST

The output I get is:

BC-32
BS2000-OSD
BSD-generic32
BSD-generic64
BSD-ia64
BSD-sparc64
BSD-sparcv8
BSD-x86
BSD-x86-elf
BSD-x86_64
Cygwin
Cygwin-pre1.3
DJGPP
MPE/iX-gcc
OS2-EMX
OS390-Unix
QNX6
QNX6-i386
ReliantUNIX
SINIX
SINIX-N
UWIN
VC-CE
VC-WIN32
VC-WIN64A
VC-WIN64I
aix-cc
aix-gcc
aix3-cc
aix64-cc
aix64-gcc
android
android-armv7
android-x86
aux3-gcc
beos-x86-bone
beos-x86-r5
bsdi-elf-gcc
cc
cray-j90
cray-t3e
darwin-i386-cc
darwin-ppc-cc
darwin64-ppc-cc
darwin64-x86_64-cc
debug
debug-BSD-x86-elf
debug-Cygwin
debug-VC-WIN32
debug-VC-WIN64A
debug-VC-WIN64I
debug-ben
debug-ben-darwin64
debug-ben-debug
debug-ben-debug-64
debug-ben-macos
debug-ben-macos-gcc46
debug-ben-no-opt
debug-ben-openbsd
debug-ben-openbsd-debug
debug-ben-strict
debug-bodo
debug-darwin-i386-cc
debug-darwin-ppc-cc
debug-geoff32
debug-geoff64
debug-levitte-linux-elf
debug-levitte-linux-elf-extreme
debug-levitte-linux-noasm
debug-levitte-linux-noasm-extreme
debug-linux-elf
debug-linux-elf-noefence
debug-linux-generic32
debug-linux-generic64
debug-linux-ia32-aes
debug-linux-pentium
debug-linux-ppro
debug-linux-x86_64
debug-rse
debug-solaris-sparcv8-cc
debug-solaris-sparcv8-gcc
debug-solaris-sparcv9-cc
debug-solaris-sparcv9-gcc
debug-steve-opt
debug-steve32
debug-steve64
debug-ulf
debug-vos-gcc
dgux-R3-gcc
dgux-R4-gcc
dgux-R4-x86-gcc
dist
gcc
hpux-cc
hpux-gcc
hpux-ia64-cc
hpux-ia64-gcc
hpux-parisc-cc
hpux-parisc-cc-o4
hpux-parisc-gcc
hpux-parisc1_1-cc
hpux-parisc1_1-gcc
hpux-parisc2-cc
hpux-parisc2-gcc
hpux64-ia64-cc
hpux64-ia64-gcc
hpux64-parisc2-cc
hpux64-parisc2-gcc
hurd-x86
iphoneos-cross
irix-cc
irix-gcc
irix-mips3-cc
irix-mips3-gcc
irix64-mips4-cc
irix64-mips4-gcc
linux-alpha+bwx-ccc
linux-alpha+bwx-gcc
linux-alpha-ccc
linux-alpha-gcc
linux-aout
linux-armv4
linux-elf
linux-generic32
linux-generic64
linux-ia32-icc
linux-ia64
linux-ia64-ecc
linux-ia64-icc
linux-ppc
linux-ppc64
linux-sparcv8
linux-sparcv9
linux-x86_64
linux32-s390x
linux64-s390x
linux64-sparcv9
mingw
mingw64
ncr-scde
netware-clib
netware-clib-bsdsock
netware-clib-bsdsock-gcc
netware-clib-gcc
netware-libc
netware-libc-bsdsock
netware-libc-bsdsock-gcc
netware-libc-gcc
newsos4-gcc
nextstep
nextstep3.3
osf1-alpha-cc
osf1-alpha-gcc
purify
qnx4
rhapsody-ppc-cc
sco5-cc
sco5-gcc
solaris-sparcv7-cc
solaris-sparcv7-gcc
solaris-sparcv8-cc
solaris-sparcv8-gcc
solaris-sparcv9-cc
solaris-sparcv9-gcc
solaris-x86-cc
solaris-x86-gcc
solaris64-sparcv9-cc
solaris64-sparcv9-gcc
solaris64-x86_64-cc
solaris64-x86_64-gcc
sunos-gcc
tandem-c89
tru64-alpha-cc
uClinux-dist
uClinux-dist64
ultrix-cc
ultrix-gcc
unixware-2.0
unixware-2.1
unixware-7
unixware-7-gcc
vos-gcc
vxworks-mips
vxworks-ppc405
vxworks-ppc60x
vxworks-ppc750
vxworks-ppc750-debug
vxworks-ppc860
vxworks-ppcgen
vxworks-simlinux

I don’t see anything that explicitly looks like SUSE Linux Enterprise Server 11, but I will assume then that perhaps the ./configure process compiled a 32-bit version? My guess is that perhaps your ./configure command for OpenSSL should explicitly state what architecture you wish to compile for?

Such as a commmand like:

./configure linux-generic64

And even adding in your options used previously like this:

./configure linux-generic64 --prefix=/usr --openssldir=/usr/local/openssl enable-tlsext no-shared no-zlib -fPIC no-gost

And then roll through the whole make and make install process again.

But my gut tells me this all hinges on 32-bit something mucking up the compile on a 64-bit system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.