Bug 244230 - openssl build fails with no-ssl2 flag
openssl build fails with no-ssl2 flag
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: openssl (Show other bugs)
4.0
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-14 12:32 EDT by Steve
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-14 15:45:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This patch should fix the issue (503 bytes, patch)
2007-06-14 15:42 EDT, Tomas Mraz
no flags Details | Diff

  None (edit)
Description Steve 2007-06-14 12:32:45 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)

Description of problem:
I am trying to rebuild openssl without support for sslv2 ciphers.  I found out that the "no-ssl2" flag is necessary option for this in the spec file.  Unfortunately, I get the error below when I build with this flag in place.  Without the no-ssl2 flag, the src rpm builds fine.  

Here is the error:

if [ "linux-shared" = "hpux-shared" -o "linux-shared" = "darwin-shared" ] ; then \
  gcc -o openssl -DMONOLITH -I.. -I../include -I/usr/kerberos/include -fPIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DOPENSSL_NO_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_EC -I/usr/kerberos/include -DOPENSSL_NO_SSL2 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -Wa,--noexecstack 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 x509.o genrsa.o gendsa.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 spkac.o smime.o rand.o engine.o ocsp.o  ../libssl.a -L/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv ../libcrypto.a -L/usr/kerberos/lib -ldl -lz ; \
else \
  gcc -o openssl -DMONOLITH -I.. -I../include -I/usr/kerberos/include -fPIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DOPENSSL_NO_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_EC -I/usr/kerberos/include -DOPENSSL_NO_SSL2 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -Wa,--noexecstack 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 x509.o genrsa.o gendsa.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 spkac.o smime.o rand.o engine.o ocsp.o  -L.. -lssl -L/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -L.. -lcrypto -L/usr/kerberos/lib -ldl -lz ; \
fi
../libssl.so: undefined reference to `SSLv2_method'
collect2: ld returned 1 exit status
make[1]: *** [openssl] Error 1
make[1]: Leaving directory `/home/smithsg/src/rpm/BUILD/openssl-0.9.7a/apps'
make: *** [sub_all] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.33197 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.33197 (%build)


Version-Release number of selected component (if applicable):
openssl-0.9.7a-43.16

How reproducible:
Always


Steps to Reproduce:
1. Install the src rpm
2. Open the spec file, and around line 181 you will see sslflags="no-asm 386"
3. add no-ssl2 in the sslflags so it says: sslflags="no-asm 386 no-ssl2"
4. perform "rpmbuild -ba openssl.spec" from the command line, and the error will show up after a couple minutes of compiling.


Actual Results:
The package builds for awhile, and fails with this error:

if [ "linux-shared" = "hpux-shared" -o "linux-shared" = "darwin-shared" ] ; then \
  gcc -o openssl -DMONOLITH -I.. -I../include -I/usr/kerberos/include -fPIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DOPENSSL_NO_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_EC -I/usr/kerberos/include -DOPENSSL_NO_SSL2 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -Wa,--noexecstack 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 x509.o genrsa.o gendsa.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 spkac.o smime.o rand.o engine.o ocsp.o  ../libssl.a -L/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv ../libcrypto.a -L/usr/kerberos/lib -ldl -lz ; \
else \
  gcc -o openssl -DMONOLITH -I.. -I../include -I/usr/kerberos/include -fPIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DOPENSSL_NO_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_EC -I/usr/kerberos/include -DOPENSSL_NO_SSL2 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -Wa,--noexecstack 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 x509.o genrsa.o gendsa.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 spkac.o smime.o rand.o engine.o ocsp.o  -L.. -lssl -L/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -L.. -lcrypto -L/usr/kerberos/lib -ldl -lz ; \
fi
../libssl.so: undefined reference to `SSLv2_method'
collect2: ld returned 1 exit status
make[1]: *** [openssl] Error 1
make[1]: Leaving directory `/home/smithsg/src/rpm/BUILD/openssl-0.9.7a/apps'
make: *** [sub_all] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.33197 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.33197 (%build)


Expected Results:
The package builds correctly without support for sslv2 ciphers.

Additional info:
Comment 1 Tomas Mraz 2007-06-14 15:42:40 EDT
Created attachment 157035 [details]
This patch should fix the issue

This patch makes use of SSLv2_method conditional based on the preprocesor
define.
Comment 2 Tomas Mraz 2007-06-14 15:45:48 EDT
Please try the patch above. I'm closing this bug as WONTFIX because we don't
support selfcompiled versions of packages and so we don't want to add such patch
into our src.rpm. As you'll be changing the src.rpm anyway you can add the patch
yourself.

Note You need to log in before you can comment on or make changes to this bug.