Andy Polyakov wrote:

Does it build?

not:

+gcc -m64 -shared -o libcrypto.so.0.9.7 -Wl,-soname=libcrypto.so.0.9.7 -Wl,-Bsymbolic -Wl,--whole-archive libcrypto.a -Wl,--no-whole-archive -L. -lc
libcrypto.a(dso_dlfcn.o)(.text+0x68): In function `dlfcn_load':
: undefined reference to `dlopen'
libcrypto.a(dso_dlfcn.o)(.text+0x9c): In function `dlfcn_load':
: undefined reference to `dlerror'
libcrypto.a(dso_dlfcn.o)(.text+0x130): In function `dlfcn_load':
: undefined reference to `dlclose'
libcrypto.a(dso_dlfcn.o)(.text+0x214): In function `dlfcn_bind_var':
: undefined reference to `dlsym'
libcrypto.a(dso_dlfcn.o)(.text+0x248): In function `dlfcn_bind_var':
: undefined reference to `dlerror'
libcrypto.a(dso_dlfcn.o)(.text+0x334): In function `dlfcn_bind_func':
: undefined reference to `dlsym'
libcrypto.a(dso_dlfcn.o)(.text+0x368): In function `dlfcn_bind_func':
: undefined reference to `dlerror'
libcrypto.a(dso_dlfcn.o)(.text+0x5a4): In function `dlfcn_unload':
: undefined reference to `dlclose'

...
...

gcc -o openssl -DMONOLITH -I.. -I../include -DOPENSSL_SYSNAME_ULTRASPARC -fPIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DMD5_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
../libcrypto.so: undefined reference to `dlerror'
../libcrypto.so: undefined reference to `dlclose'
../libcrypto.so: undefined reference to `dlopen'
../libcrypto.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[1]: *** [openssl] Error 1
make[1]: Leaving directory `/usr/local/src/openssl-0.9.7-stable-SNAP-20021202/apps'
make: *** [sub_all] Error 1

adding -ldl before last -m64 flag, build!

What does 'ldd apps/openssl' return?

# ldd apps/openssl
       libssl.so.0.9.7 => not found
       libcrypto.so.0.9.7 => not found
       libc.so.6 => /lib64/libc.so.6 (0xfffff8000011c000)
       /lib64/ld-linux.so.2 => /lib64/ld-linux.so.2 (0xfffff80000000000)

# LD_LIBRARY_PATH=./ ldd apps/openssl
       libssl.so.0.9.7 => ./libssl.so.0.9.7 (0xfffff8000011c000)
       libcrypto.so.0.9.7 => ./libcrypto.so.0.9.7 (0xfffff80000258000)
       libc.so.6 => /lib64/libc.so.6 (0xfffff800004b8000)
       libdl.so.2 => /lib64/libdl.so.2 (0xfffff8000071c000)
       /lib64/ld-linux.so.2 => /lib64/ld-linux.so.2 (0xfffff80000000000)

Does 'make test' pass?

yes!, thanks for all

related info:
looking inside openssl-0.9.6b source rpm from Aurora (port of RedHat 7.3 to sparc), it has this patch (I was not tested linux64-sparcv9, but other are distributed with Aurora):.

--- openssl-engine-0.9.6b/Configure.jj Tue Apr 23 12:33:04 2002
+++ openssl-engine-0.9.6b/Configure Tue Apr 23 12:46:16 2002
@@ -172,16 +172,14 @@ my %table=(
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL
BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",

#### SPARC Linux setups
-"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO $ENV{RPM_OPT_FLAGS} -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::linux-shared:-fPIC",
+"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO $ENV{RPM_OPT_FLAGS} -Wall::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
# Ray Miller <[EMAIL PROTECTED]> has patiently
# assisted with debugging of following two configs.
-"linux-sparcv8","gcc:-DB_ENDIAN -DTERMIO -Wall -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::::::::::linux-shared:-fPIC",
+"linux-sparcv8","gcc:-DB_ENDIAN -DTERMIO $ENV{RPM_OPT_FLAGS} -Wall -DBN_DIV2W::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
# it's a real mess with -mcpu=ultrasparc option under Linux, but
# -Wa,-Av8plus should do the trick no matter what.
-"linux-sparcv9","gcc:-DB_ENDIAN -DTERMIO -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:asm/md5-sparcv8plus.o:dlfcn::::::::linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-# !!!Folowing can't be even tested yet!!!
-# We have to wait till 64-bit glibc for SPARC is operational!!!
-#"linux64-sparcv9","sparc64-linux-gcc:-m64 -DB_ENDIAN -DTERMIO -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:::::::linux-shared:-fPIC",
+"linux-sparcv9","gcc:-DB_ENDIAN -DTERMIO $ENV{RPM_OPT_FLAGS} -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"linux64-sparcv9","gcc:-m64 -DB_ENDIAN -DTERMIO $ENV{RPM_OPT_FLAGS} -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",

# Sunos configs, assuming sparc for the gcc one.
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown)::DES_UNROLL:::",



______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]

Reply via email to