LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-21-2015, 03:58 AM   #1
chris.j
LQ Newbie
 
Registered: Apr 2014
Location: Poland
Distribution: Debian
Posts: 12

Rep: Reputation: Disabled
Question Compiling OpenSSL 1.0.2d on Debian Lenny ARMv5 returns libcrypto.so errors


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?
 
Old 10-22-2015, 05:48 AM   #2
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
1) You're using an unsupported release containing much more vulnerable software than the ssl library. The fact that you're concerned about ssl, means that you need to upgrade to at least Debian squeeze LTS.

2) But if you really must - instead of building from upstream source and adapting documentation from LFS, I suggest trying to backport that version from unstable (it may work, it may not - you'll find out).

Just add the deb-src repository for Debian sid/unstable to your sources.list (and disable any and all other deb-src repositories) then:

Code:
# apt-get update
# apt-get build-dep openssl
# apt-get install fakeroot
$ mkdir ~/build && cd ~/build
$ apt-get source openssl
$ cd ~/build/openssl-1.0.2d
$ dpkg-buildpackage -rfakeroot -us -uc
$ cd ..
# dpkg -i *
If dpkg-buildpackage fails, post the errors.
 
Old 10-22-2015, 04:31 PM   #3
andre@home
Member
 
Registered: Oct 2003
Distribution: 2x Debian 8.1 webdav servers
Posts: 93

Rep: Reputation: 44
Debian 8.1 has openssl1.0.1.1k from 2015 on board ...
I came from Debian 6 having a webdav server/apache running. It ran for 3.5 yrs without major problems, but a disk fail made me start to think on a new version (or putting bak the old image..).
Debian 8 will also become LTS after the normal support period, so I switched to that. My Debian 6 LTS would end spring 2016, so I had anyhow started this winter...

It (8.1) works now > 2 months, without any issues. Glad I did it. (fresh install, not updating.. it is clean again....)
 
  


Reply

Tags
arm, debian, openssl



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openssl - libcrypto.so moyorakkhi Linux - Newbie 6 07-31-2014 02:53 AM
Debian Lenny Random SCSI Errors jmoschetti45 Linux - Hardware 3 12-13-2009 08:43 PM
sha-1 openssl on debian Lenny knobby67 Programming 1 09-11-2009 08:00 AM
Errors when compiling KTlight on Debian Lenny (testing) lefty.crupps Linux - Software 0 10-16-2007 09:32 AM
When compiling Scribus 1.2.1 returns several errors IanChristie Linux - Software 0 02-10-2005 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration