Subject: Re: pkgsrc/security/openssl fails to build on NetBSD 1.4/alpha
To: None <itojun@iijlab.net>
From: Simon Burge <simonb@telstra.com.au>
List: tech-toolchain
Date: 08/24/1999 21:16:04
[[ reply cc'd to tech-pkg and tech-toolchain - I'm not really sure where
   this should be discussed. ]]

itojun@iijlab.net wrote:

> 	Hello,
> 	Is anyone using NetBSD-1.4 pkgsrc/security/openssl on NetBSD 1.4/alpha,
> 	without RSAREF (USE_RSAREF=NO)?
> 	for me, it compiles just fine on NetBSD 1.4/i386, but not on alpha.  
> 	It fails like attached.

If I get rid of references to RSAglue then I get something that builds
fine.  Also, linking against libcrypto.a (instead of -L.. -lcrypto)
works.  It looks like the ELF toolchain has problems because it can't
resolve the symbols listed below even though nothing calls them.

Does the following break the USE_RSAREF2=yes case (which I obviously
can't test, but I suspect so :-)?

--- makefile.one.ORIG	Tue Aug 24 21:03:24 1999
+++ makefile.one	Tue Aug 24 20:45:51 1999
@@ -89,7 +89,7 @@
 
 O_SSL=     $(LIB_D)/lib$(SSL).a
 O_CRYPTO=  $(LIB_D)/lib$(CRYPTO).a
-O_RSAGLUE= $(LIB_D)/lib$(RSAGLUE).a
+O_RSAGLUE= # $(LIB_D)/lib$(RSAGLUE).a
 SO_SSL=    lib$(SSL)
 SO_CRYPTO= lib$(CRYPTO)
 L_SSL=     $(LIB_D)/$(SSL).a
--- crypto/Makefile.ssl.ORIG	Tue Aug 24 21:03:31 1999
+++ crypto/Makefile.ssl	Tue Aug 24 20:46:04 1999
@@ -48,7 +48,7 @@
 	@(cd ..; $(MAKE) DIRS=$(DIR) all)
 
 all: date.h lib subdirs
-	cd .. && csh ${MAKELIB} libcrypto.so.1.0 libcrypto.a libRSAglue.a
+	cd .. && csh ${MAKELIB} libcrypto.so.1.0 libcrypto.a # libRSAglue.a
 
 date.h: ../Makefile.ssl
 	echo "#define DATE \"`date`\"" >date.h


Simon.

> ---
> cd .. && csh /usr/home/itojun/work/pkgsrc/security/openssl/files/makelib libssl.so.1.0 libssl.a
> making all in apps...
> rm -f openssl
> gcc -o openssl -DMONOLITH -I../include -DTERMIOS -O3 -Wall 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 -Wl,-R/
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
>