I'm compiling OpenSSL 1.0.2d on Debian Lenny ARMv5 embedded system:
Code:
detrayz:~/openssl-1.0.2d# uname -a
Linux detrayz 2.6.24.4 #1 Fri Sep 17 10:29:48 KST 2010 armv5tejl GNU/Linux
I'm following the guide from
this website, have configured the package with:
Code:
./config --prefix=/usr \
--openssldir=/etc/ssl \
--libdir=lib \
shared \
zlib-dynamic &&
make CC='gcc -v'
But when it comes to compiling the apps folder (generally the OpenSSL binary) I get the following error:
Code:
make[1]: Entering directory `/root/openssl-1.0.2d/apps'
rm -f openssl
shlib_target=; if [ -n "libcrypto.so.1.0.0 libssl.so.1.0.0" ]; then \
shlib_target="linux-shared"; \
elif [ -n "" ]; then \
FIPSLD_CC="gcc -v"; CC=/usr/local/ssl/fips-2.0/bin/fipsld; export CC FIPSLD_CC; \
fi; \
LIBRARIES="-L.. -lssl -L.. -lcrypto" ; \
make -f ../Makefile.shared -e \
APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o" \
LIBDEPS=" $LIBRARIES -ldl" \
link_app.${shlib_target}
make[2]: Entering directory `/root/openssl-1.0.2d/apps'
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabi/4.3.2/:/usr/lib/gcc/arm-linux-gnueabi/4.3.2/:/usr/lib/gcc/arm-linux-gnueabi/:/usr/lib/gcc/arm-linux-gnueabi/4.3.2/:/usr/lib/gcc/arm-linux-gnueabi/:/usr/lib/gcc/arm-linux-gnueabi/4.3.2/:/usr/lib/gcc/arm-linux-gnueabi/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabi/4.3.2/:/usr/lib/gcc/arm-linux-gnueabi/4.3.2/:/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-fPIC' '-DOPENSSL_PIC' '-DZLIB_SHARED' '-DZLIB' '-DOPENSSL_THREADS' '-D_REENTRANT' '-DDSO_DLFCN' '-DHAVE_DLFCN_H' '-O3' '-Wall' '-DOPENSSL_BN_ASM_MONT' '-DOPENSSL_BN_ASM_GF2m' '-DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DAES_ASM' '-DBSAES_ASM' '-DGHASH_ASM' '-o' 'openssl' '-L..' '-L..'
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/collect2 --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.3 -X -m armelf_linux_eabi -o openssl /usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../crt1.o /usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../crti.o /usr/lib/gcc/arm-linux-gnueabi/4.3.2/crtbegin.o -L.. -L.. -L/usr/lib/gcc/arm-linux-gnueabi/4.3.2 -L/usr/lib/gcc/arm-linux-gnueabi/4.3.2 -L/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../.. -rpath /usr/lib openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o -lssl -lcrypto -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabi/4.3.2/crtend.o /usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../crtn.o
../libcrypto.so: undefined reference to `d3'
../libcrypto.so: undefined reference to `d0'
collect2: ld returned 1 exit status
make[2]: *** [link_app.gnu] Error 1
make[2]: Leaving directory `/root/openssl-1.0.2d/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/root/openssl-1.0.2d/apps'
make: *** [build_apps] Error 1
If I issue ldd against
libcrypt.so.1.0.0 I get the following output:
Code:
detrayz:~/openssl-1.0.2d# ldd libcrypto.so.1.0.0
libdl.so.2 => /lib/libdl.so.2 (0x4018b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40196000)
libc.so.6 => /lib/libc.so.6 (0x401aa000)
/lib/ld-linux.so.3 (0x2a000000)
Initially I've thought that this may be related to
libcrypto.so.0.9.8 library that exists in
/usr/lib, but even if I move this library in other place I still get the same error. Moreover the error looks as referring to
../libcrypto.so which only exists in
/root/openssl-1.0.2d/.
Could you please help me figure out why the libcrypto.so library compiled right before OpenSSL have some undefined references?