Failure to compile OpenSSH.

Atro Tossavainen atossava at cc.helsinki.fi
Wed Jun 6 23:14:49 EST 2001


>> Linux:		Configure fails to find OpenSSL. (1)
> 
> i have seen this if libz.so is installed at strange places.
> does static linking work?

libz is installed where RedHat puts it, i.e. /usr/lib.

Since this is with gcc, I tried with LDFLAGS="-static"

./configure --with-ssl-dir=/afs/biocenter.helsinki.fi/v/@sys/libraries/openssl/latest

fails the same way. dso_dlfcn.o in OpenSSL libcrypto.a refers to the
undefined functions dlopen, dlclose, dlsym.

Explicitly including -ldl in LDFLAGS allowed configure to finish
properly (without -static in LDFLAGS, I should probably add).

Now, the build fails, with the following error messages:

gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -L/afs/bi/v/@sys/libraries/openssl/latest/lib -ldl -L/usr/athena/lib -L/usr/afsws/lib -lssh -lopenbsd-compat -lkafs -lresolv -ldes -lkrb -lz -lnsl  -lutil -lcrypto -lcrypt -ldes
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(dx86-elf.o): In function `des_encrypt2':
dx86-elf.o(.text+0x1040): multiple definition of `des_encrypt2'
/usr/athena/lib/libdes.a(des_enc.o):/home/atossava/krb4-1.0.8/lib/des/./des_enc.c:166: first defined here
/usr/bin/ld: Warning: size of symbol `des_encrypt2' changed from 5153 to 3999 in dx86-elf.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(dx86-elf.o): In function `des_encrypt3':
dx86-elf.o(.text+0x1fe0): multiple definition of `des_encrypt3'
/usr/athena/lib/libdes.a(des_enc.o):/home/atossava/krb4-1.0.8/lib/des/./des_enc.c:261: first defined here
/usr/bin/ld: Warning: size of symbol `des_encrypt3' changed from 329 to 292 in dx86-elf.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(dx86-elf.o): In function `des_decrypt3':
dx86-elf.o(.text+0x2110): multiple definition of `des_decrypt3'
/usr/athena/lib/libdes.a(des_enc.o):/home/atossava/krb4-1.0.8/lib/des/./des_enc.c:284: first defined here
/usr/bin/ld: Warning: size of symbol `des_decrypt3' changed from 329 to 292 in dx86-elf.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(dx86-elf.o): In function `des_ncbc_encrypt':
dx86-elf.o(.text+0x2240): multiple definition of `des_ncbc_encrypt'
/usr/athena/lib/libdes.a(ncbc_enc.o):/home/atossava/krb4-1.0.8/lib/des/ncbc_enc.c:68: first defined here
/usr/bin/ld: Warning: size of symbol `des_ncbc_encrypt' changed from 1297 to 480 in dx86-elf.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(dx86-elf.o): In function `des_ede3_cbc_encrypt':
dx86-elf.o(.text+0x2420): multiple definition of `des_ede3_cbc_encrypt'
/usr/athena/lib/libdes.a(ede_enc.o):/home/atossava/krb4-1.0.8/lib/des/ede_enc.c:70: first defined here
/usr/bin/ld: Warning: size of symbol `des_ede3_cbc_encrypt' changed from 1341 to 480 in dx86-elf.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(set_key.o)(.data+0x0): multiple definition of `des_check_key'
/usr/athena/lib/libdes.a(set_key.o):/home/atossava/krb4-1.0.8/lib/des/set_key.c:80: first defined here
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(set_key.o): In function `des_set_odd_parity':
set_key.o(.text+0x390): multiple definition of `des_set_odd_parity'
/usr/athena/lib/libdes.a(set_key.o):/home/atossava/krb4-1.0.8/lib/des/set_key.c:80: first defined here
/usr/bin/ld: Warning: size of symbol `des_set_odd_parity' changed from 97 to 125 in set_key.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(set_key.o): In function `des_is_weak_key':
set_key.o(.text+0x4a0): multiple definition of `des_is_weak_key'
/usr/athena/lib/libdes.a(set_key.o):/home/atossava/krb4-1.0.8/lib/des/set_key.c:137: first defined here
/usr/bin/ld: Warning: size of symbol `des_is_weak_key' changed from 121 to 153 in set_key.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(set_key.o): In function `des_set_key':
set_key.o(.text+0x540): multiple definition of `des_set_key'
/usr/athena/lib/libdes.a(set_key.o):/home/atossava/krb4-1.0.8/lib/des/set_key.c:166: first defined here
/usr/bin/ld: Warning: size of symbol `des_set_key' changed from 733 to 133 in set_key.o
/afs/bi/v/@sys/libraries/openssl/latest/lib/libcrypto.a(set_key.o): In function `des_key_sched':
set_key.o(.text+0x5d0): multiple definition of `des_key_sched'
/usr/athena/lib/libdes.a(set_key.o):/home/atossava/krb4-1.0.8/lib/des/set_key.c:247: first defined here
/usr/bin/ld: Warning: size of symbol `des_key_sched' changed from 73 to 133 in set_key.o
collect2: ld returned 1 exit status
make: *** [ssh] Error 1




-- 
Atro Tossavainen (Mr.)               / The Institute of Biotechnology at
Systems Analyst, Techno-Amish &     / the University of Helsinki, Finland,
+358-9-19158939  UNIX Dinosaur     / employs me, but my opinions are my own.
< URL : http : / / www . iki . fi / atro . tossavainen / >



More information about the openssh-unix-dev mailing list