Subject: pkg/8025: OpenSSL packge broken under ELF environment?
To: None <gnats-bugs@gnats.netbsd.org>
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
List: netbsd-bugs
Date: 07/18/1999 05:35:49
>Number:         8025
>Category:       pkg
>Synopsis:       OpenSSL packge broken under ELF environment?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 18 05:35:01 1999
>Last-Modified:
>Originator:     Takahiro Kambe
>Organization:
	
>Release:        NetBSD-current 1999/7/17
>Environment:
	
System: NetBSD land.sky.yamashina.kyoto.jp 1.4G NetBSD 1.4G (LAND) #68: Sat Jul 17 01:21:23 JST 1999 taca@land.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/LAND i386


>Description:
	OpenSSL package fail to compile on NetBSD/i386, after switching ELF.
>How-To-Repeat:
	In my /etc/mk.conf,

USE_RSAREF2=NO
USE_RSAREF=NO

	And make on /usr/pkgsrc/security/openssl fail as bellow:


===>  Validating dependencies for openssl-0.9.2b
>Fix:
	Unknown.
>Audit-Trail:
>Unformatted:
>> Checksum OK for openssl-0.9.2b.tar.gz.
>> Checksum OK for openssl-0.9.2b-rsaoaep.patch.
===>  Extracting for openssl-0.9.2b
===>  openssl-0.9.2b depends on installed package: perl-5.00404 - perl-5.00404  found
work -> /a/obj/pkgsrc/security/openssl/work
===>  Patching for openssl-0.9.2b
===>  Applying distribution patches for openssl-0.9.2b
===>  Applying NetBSD patches for openssl-0.9.2b
===>  Configuring for openssl-0.9.2b
Configuring for NetBSD-i386elf
...(snip)...
gcc -o openssl -DMONOLITH -I../include -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DBN_ASM -DSHA1_ASM -DMD5_ASM -DRMD160_ASM openssl.o verify.o asn1pars.o req.o dgst.o dh.o enc.o gendh.o errstr.o ca.o  pkcs7.o crl2p7.o crl.o  rsa.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 version.o sess_id.o  ciphers.o nseq.o -L. -L.. -L../.. -L../../.. -L.. -lssl -L.. -lcrypto -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
../libcrypto.so: undefined reference to `R_RandomUpdate'
../libcrypto.so: undefined reference to `R_GetRandomBytesNeeded'
../libcrypto.so: undefined reference to `RSAPrivateDecrypt'
../libcrypto.so: undefined reference to `RSAPublicEncrypt'
../libcrypto.so: undefined reference to `R_RandomFinal'
../libcrypto.so: undefined reference to `RSAPrivateEncrypt'
../libcrypto.so: undefined reference to `R_RandomInit'
../libcrypto.so: undefined reference to `RSAPublicDecrypt'
collect2: ld returned 1 exit status
*** Error code 1
...(snip)...
Stop.