Hello, > I had sent this mail on openssl-dev, and havent heard back yet. > Thought of asking it here. > Apologies if there are unnecessary details, but I felt like providing > as much information as possible. > > > I am building openssl0.9.8e on HP Itanium system. > ------- > bash-2.05b$ uname -a > HP-UX ia64-bld B.11.23 U ia64 3226910008 unlimited-user license > > bash-2.05b$ gcc -v > Reading specs from /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/specs > Configured > with: /scratch/zack/pkgbuild/3.3.1/hpux-11/gcc-3.4.3/configure > --enable-languages=c,c++ --enable-threads=posix --with-gnu-as > --without-gnu-ld --with-as=/usr/local/bin/as --prefix=/usr/local > Thread model: posix > gcc version 3.4.3 > ------- > > The build fails with "Duplicate symbols" errors, when it is configured > to generate 'shared' objects. > I will be glad if anyone could tell what wrong I am doing. > > > $ ./Configure hpux64-ia64-gcc shared > $ make > > This generates libcrypto.a, and then errors out with Duplicate symbols > errors > ------- > making all in crypto/pqueue... > make[2]: Entering directory > `/home/nz/urjit/openssl-0.9.8e/crypto/pqueue' > make[2]: Nothing to be done for `all'. > make[2]: Leaving directory > `/home/nz/urjit/openssl-0.9.8e/crypto/pqueue' > if [ -n "libcrypto.so.0.9.8 libssl.so.0.9.8" ]; then \ > (cd ..; make libcrypto.so.0.9.8); \ > fi > make[2]: Entering directory `/home/nz/urjit/openssl-0.9.8e' > make[3]: Entering directory `/home/nz/urjit/openssl-0.9.8e' > make[4]: Entering directory `/home/nz/urjit/openssl-0.9.8e' > ld: Duplicate symbol "__divxf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > ld: Duplicate symbol "__divtf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > ld: Duplicate symbol "__divdf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdf3.oS] > ld: Duplicate symbol "__divsf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divsf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divsf3.oS] > ld: Duplicate symbol "__divdi3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdi3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdi3.oS] > ld: Duplicate symbol "__moddi3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__moddi3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__moddi3.oS] > ..... > ------- > > After this, I tried to build ssl library with "make build_ssl", but > that also errored out after creating libssl.a > ------- > ar r ../libssl.a s2_meth.o s2_srvr.o s2_clnt.o s2_lib.o s2_enc.o > s2_pkt.o s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o > s3_both.o s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o > s23_pkt.o t1_meth.o t1_srvr.o t1_clnt.o t1_lib.o t1_enc.o > d1_meth.o d1_srvr.o d1_clnt.o d1_lib.o d1_pkt.o d1_both.o d1_enc.o > ssl_lib.o ssl_err2.o ssl_cert.o ssl_sess.o ssl_ciph.o ssl_stat.o > ssl_rsa.o ssl_asn1.o ssl_txt.o ssl_algs.o bio_ssl.o ssl_err.o kssl.o > ar: creating ../libssl.a > /usr/local/bin/ranlib ../libssl.a || echo Never mind. > if [ -n "libcrypto.so.0.9.8 libssl.so.0.9.8" ]; then \ > (cd ..; make libssl.so.0.9.8); \ > fi > make[2]: Entering directory `/home/nz/urjit/openssl-0.9.8e' > make[3]: Entering directory `/home/nz/urjit/openssl-0.9.8e' > make[4]: Entering directory `/home/nz/urjit/openssl-0.9.8e' > ld: Duplicate symbol "__divxf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > ld: Duplicate symbol "__divtf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divxf3.oS] > ld: Duplicate symbol "__divdf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdf3.oS] > ld: Duplicate symbol "__divsf3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divsf3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divsf3.oS] > ld: Duplicate symbol "__divdi3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdi3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divdi3.oS] > ld: Duplicate symbol "__moddi3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__moddi3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__moddi3.oS] > ld: Duplicate symbol "__udivdi3" in > files > /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__udivdi3.oS] and > /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__udivdi3.oS] > ld: Duplicate symbol "__umoddi3" in > files > /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__umoddi3.oS] and > /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__umoddi3.oS] > ld: Duplicate symbol "__divsi3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divsi3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__divsi3.oS] > ld: Duplicate symbol "__modsi3" in > files /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__modsi3.oS] > and /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a[__modsi3.oS] After trying to build OpenSSL 0.9.8e on my Itanium I have the same results:
$ ./Configure threads shared --prefix=/usr/local/openssl-0.9.8e hpux64-ia64-gcc .... make[2]: Leaving directory `/u01/home/admin/openssl-0.9.8e/crypto/pqueue' if [ -n "libcrypto.so.0.9.8 libssl.so.0.9.8" ]; then \ (cd ..; /usr/local/bin/make libcrypto.so.0.9.8); \ fi *** AND LOTS OF ERRORS *** To check what commands generate this errors I run: $ make SHELL="/bin/sh -x" libcrypto.so.0.9.8 .... + gcc -fpic -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H -mlp64 -O3 -DB_ENDIAN -D_REENTRANT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -mlp64 -shared -Wl,-B,symbolic,+vnocompatwarnings,-z,+s, +h,libcrypto.so.0.9.8 -o libcrypto.so.0.9.8 -Wl,+forceload libcrypto.a -L. -ldl *** AND LOTS OF ERRORS *** To check at what stage this errors are generated I run: gcc -v -fpic -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H -mlp64 -O3 -DB_ENDIAN -D_REENTRANT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -mlp64 -shared -Wl,-B,symbolic,+vnocompatwarnings,-z,+s, +h,libcrypto.so.0.9.8 -o libcrypto.so.0.9.8 -Wl,+forceload libcrypto.a -L. -ldl Using built-in specs. Target: ia64-hp-hpux11.23 Configured with: ... Thread model: single gcc version 4.0.2 /usr/local/gcc-4.0.2-hpux1123/libexec/gcc/ia64-hp-hpux11.23/4.0.2/collect2 -z +Accept TypeMismatch -b -o libcrypto.so.0.9.8 -L. -L/usr/local/gcc-4.0.2-hpux1123/lib/gcc/ia64-hp-hpux11.23/4.0.2/hpux64 -L/usr/local/gcc-4.0.2-hpux1123/lib/gcc/ia64-hp-hpux11.23/4.0.2 -L/usr/ccs/bin -L/usr/ccs/lib/hpux64 -L/usr/ccs/lib -L/usr/local/gcc-4.0.2-hpux1123/lib/gcc/ia64-hp-hpux11.23/4.0.2/../../../hpux64 -L/usr/local/gcc-4.0.2-hpux1123/lib/gcc/ia64-hp-hpux11.23/4.0.2/../../.. -L/lib/hpux64 -L/usr/lib/hpux64 -B symbolic +vnocompatwarnings -z +s +h libcrypto.so.0.9.8 +forceload libcrypto.a -lgcc -lgcc ^^^^^^^^^^^^ *** AND LOTS OF ERRORS *** and I really have two gcc libraries included. If I remove one - this compiles ok. This happens with libssl and engine libraries too. One (not recommended) simple solution: # cd /usr/local/gcc-4.0.2-hpux1123/libexec/gcc/ia64-hp-hpux11.23/4.0.2 # mv collect2 collect2.ORG # cat > collect2 #!/bin/sh ARGS=`echo $*|sed 's/-lgcc -lgcc/-lgcc/'` ${0}.ORG $ARGS ^D # chmod a+x collect2 Second (probably not recommended too): change in main Makefile definitions to: SHARED_LDFLAGS=-mlp64 -shared -nodefaultlibs EX_LIBS= -ldl -lgcc and run make again. Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]