[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems building OpenSSL



Hi,

Ever since OpenBSD released their new 3.4 version,  we've been unable 
to build OpenSSL
and have been unable to obtain enough information for a workaround,  so 
in desperation,
I'm posting it here,  because the developers of OpenSSL have been 
totally ignoring my
plea for help.

Below is a partial listing of the "build" output.

gcc -DMONOLITH -I.. -I../include  -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer 
-DSHA1_ASM -DMD5_ASM -DRMD160_ASM  -c spkac.c
gcc -DMONOLITH -I.. -I../include  -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer 
-DSHA1_ASM -DMD5_ASM -DRMD160_ASM  -c smime.c
gcc -DMONOLITH -I.. -I../include  -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer 
-DSHA1_ASM -DMD5_ASM -DRMD160_ASM  -c rand.c
gcc -DMONOLITH -I.. -I../include  -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer 
-DSHA1_ASM -DMD5_ASM -DRMD160_ASM  -c engine.c
gcc -DMONOLITH -I.. -I../include  -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer 
-DSHA1_ASM -DMD5_ASM -DRMD160_ASM  -c ocsp.c
gcc -DMONOLITH -I.. -I../include  -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer 
-DSHA1_ASM -DMD5_ASM -DRMD160_ASM  -c openssl.c
rm -f openssl
if [ "bsd-gcc-shared" = "hpux-shared" -o "bsd-gcc-shared" = 
"darwin-shared" ] ; then  gcc -o openssl -DMONOLITH -I.. -I../include  
-DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 
-fomit-frame-pointer -DSHA1_ASM -DMD5_ASM -DRMD160_ASM 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  
../libcrypto.a  ;  else  LD_LIBRARY_PATH=..:$LD_LIBRARY_PATH  gcc -o 
openssl -DMONOLITH -I.. -I../include  -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer 
-DSHA1_ASM -DMD5_ASM -DRMD160_ASM 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.. 
-lcrypto  ;  fi
speed.o: In function `speed_main':
speed.o(.text+0x1678): undefined reference to `RC4'
speed.o(.text+0x1752): undefined reference to `DES_ncbc_encrypt'
speed.o(.text+0x183d): undefined reference to `DES_ede3_cbc_encrypt'
speed.o(.text+0x1d7c): undefined reference to `RC5_32_cbc_encrypt'
speed.o(.text+0x1e5c): undefined reference to `BF_cbc_encrypt'
speed.o(.text+0x1f3c): undefined reference to `CAST_cbc_encrypt'

When I build it using ./config no-asm it works fine.   Ok,  so next I 
go to the OpenSSL web site
and I see this entry in the FAQ....

12. Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented 
segment type"?

As of 0.9.7 assembler routines were overhauled for position 
independence of the machine code, which is essential for shared library 
support. For some reason OpenBSD is equipped with an out-of-date GNU 
assembler which finds the new code offensive. To work around the 
problem, configure with no-asm (and sacrifice a great deal of 
performance) or patch your assembler according to 
http://www.openssl.org/~appro/gas-1.92.3.OpenBSD.patch. For your 
convenience a pre-compiled replacement binary is provided at 
http://www.openssl.org/~appro/gas-1.92.3.static.aout.bin. Reportedly 
elder *BSD a.out platforms also suffer from this problem and remedy 
should be same. Provided binary is statically linked and should be 
working across wider range of *BSD branches, not just OpenBSD.

I'm not sure if this is related,  but it does mention some patch needed 
to the assembler.   But if this
is what I need to get this to build,  there is no information given in 
here that says how to make this patch,  as it only gives out the Diff 
file of some module which I cannot find,  nor do they mention
which package this is.

Has anyone gotten this to work?   If so,  where can I get information 
on a workaround.    Again,  I want to mention that the OpenSSL 
developers are ignoring my plea for help,  nor can I find any info on 
how
to get around this problem.

Thanx
John