Unable to build OpenSSL from source package

General support questions
Post Reply
swtrse
Posts: 2
Joined: 2017/08/10 20:34:54

Unable to build OpenSSL from source package

Post by swtrse » 2017/08/10 20:42:25

Hello,
I tried to build OpenSSL from source rpm to enable some ciphers I need.
This is what I have done

Code: Select all

yumdownloader --source openssl
rpm -ivh <rmp file>
In the Spec file...
Change the Release line to:

Code: Select all

Release: 60%{?dist}.1_crypto
Change configure line to

Code: Select all

./Configure \
        --prefix=%{_prefix} --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
        zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \
        enable-cms enable-md2 enable-sctp \
        enable-ec enable-ecdh enable-ecdsa \
        no-mdc2 no-rc5 no-gost no-srp \
        --with-krb5-flavor=MIT --enginesdir=%{_libdir}/openssl/engines \
        --with-krb5-dir=/usr shared  ${sslarch} %{?!nofips:fips}
In the hobble-openssl I comment out this lines

Code: Select all

#for c in `find crypto/bn -name "*gf2m.c"`; do
#       echo Destroying $c
#       > $c
#done
#
#for c in `find crypto/ec -name "ec2*.c" -o -name "ec_curve.c" -o -name "ecp_nistp?2?.c" -o -name "ectest.c"`; do
#       echo Destroying $c
#       > $c
#done
That I did

Code: Select all

mock -r epel-7-x86_64 --buildsrpm --spec $HOME/rpmbuild/SPECS/openssl.spec --sources $HOME/rpmbuild/SOURCES
mock -r epel-7-x86_64 --no-clean --rebuild /var/lib/mock/epel-7-x86_64/result/<openssl package name>.src.rpm
The build ends with the error messages
shlib_target=; if [ -n "libcrypto.so.10 libssl.so.10" ]; then \
shlib_target="linux-shared"; \
elif [ -n "" ]; then \
FIPSLD_CC="gcc"; CC=/usr/local/ssl/fips-2.0/bin/fipsld; export CC FIPSLD_CC; \
fi; \
LIBRARIES="-L.. -lssl -L/usr/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -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 -Wl,-z,relro -ldl -lz" \
link_app.${shlib_target}
make[2]: Entering directory `/home/swtrse/rpmbuild/BUILD/openssl-1.0.1e/apps'
../libcrypto.so: undefined reference to `ec_GF2m_simple_group_set_curve'
../libcrypto.so: undefined reference to `EC_GF2m_simple_method'
../libcrypto.so: undefined reference to `ec_GF2m_simple_point2oct'
../libcrypto.so: undefined reference to `ec_GF2m_simple_set_compressed_coordinates'
../libcrypto.so: undefined reference to `ec_GF2m_simple_oct2point'
collect2: error: ld returned 1 exit status
make[2]: *** [link_app.gnu] Error 1
make[2]: Leaving directory `/home/swtrse/rpmbuild/BUILD/openssl-1.0.1e/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/home/swtrse/rpmbuild/BUILD/openssl-1.0.1e/apps'
make: *** [build_apps] Error 1
Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.wzEiiO (%build)


Fehler beim Bauen des RPM:
Fehler-Status beim Beenden von /var/tmp/rpm-tmp.wzEiiO (%build)

What did I do wrong?

Post Reply