on slackware-current with openssl 0.9.7 the build fails to make as follows make[1]: Entering directory `/tmp/openssh-3.5p1/openbsd-compat' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/tmp/openssh-3.5p1/openbsd-compat' i386-slackware-linux-gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -lssh -lopenbsd-compat - lutil -lz -lnsl -lcrypto -lcrypt ./libssh.a(rsa.o)(.text+0x2a4): In funcion `rsa_generate_additional_parameters' : : undefined reference to `BN_mod' ./libssh.a(rsa.o)(.text+0x2a6): In funcion `rsa_generate_additional_parameters' : : undefined reference to `BN_mod' collect2: ld returned 1 exit status make: *** [ssh[ Error 1 configured as follows CFLAGS="-O2 -march=i386 -mcpu=i686 -Wall" ./configure --prefix=/usr \ --sysconfdir=/etc/ssh \ --without-pam \ --with-md5-passwords \ --with-tcp-wrappers \ --with-default- path=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin \ --with-ipv4-default \ i386-slackware-linux OpenSSH has been configured with the following options: User binaries: /usr/bin System binaries: /usr/sbin Configuration files: /etc/ssh Askpass program: /usr/libexec/ssh-askpass Manual pages: /usr/man/manX PID file: /var/run Privilege separation chroot path: /var/empty sshd default user PATH: /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin Manpage format: doc PAM support: no KerberosIV support: no KerberosV support: no Smartcard support: no AFS support: no S/KEY support: no TCP Wrappers support: yes MD5 password support: yes IP address in $DISPLAY hack: no Use IPv4 by default hack: yes Translate v4 in v6 hack: yes BSD Auth support: no Random number source: OpenSSL internal ONLY Host: i386-slackware-linux-gnu Compiler: i386-slackware-linux-gcc Compiler flags: -O2 -march=i386 -mcpu=i686 -Wall -Wall -Wpointer-arith -Wno- uninitialized Preprocessor flags: Linker flags: Libraries: -lwrap -lutil -lz -lnsl -lcrypto -lcrypt
i think your openssl header files and libaries are not matching
just removed all traces of openssl, recompiled and installed it, and still the same error. if what you say is true wouldnt it also stop me from compiling anything else that uses openssl (apache 2, php, curl, sasl to name just a few that ive recompiled using the new openssl fine)
Try running the "findssl.sh" script from http://www.zip.com.au/~dtucker/openssh/ to see if there's any libraries or headers you missed.
heres the output from findssl.sh, i think it speaks for itself Searching for OpenSSL header files. 0x0090700fL /usr/include/openssl/opensslv.h Searching for OpenSSL shared library files. 0x0090700fL /usr/lib/libcrypto.so.0.9.7 0x0090700fL /usr/lib/libcrypto.so 0x0090700fL /usr/lib/libcrypto.so.0 0x0090700fL /usr/lib/libcrypto.so.0.9.6 Searching for OpenSSL static library files. 0x0090700fL /usr/lib/libcrypto.a
Created attachment 189 [details] Change BN_mod( . . . ) to BN_div(NULL, . . . .)
0x0090700fL /usr/lib/libcrypto.so.0.9.6 this looks very much like a broken openssl setup to me.
openssl 0.9.7 defines #define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx)) in <openssl/bn.h> and openssh's rsa.c includes rsa.h which includes <openssl/bn.h> so i don't see why this is a problem in OpenSSH...
"Change BN_mod( . . . ) to BN_div(NULL, . . . .)" this should not be necessary, since bn.h is included and bn.h should do this....
"0x0090700fL /usr/lib/libcrypto.so.0.9.6 this looks very much like a broken openssl setup to me" thats just a sym link to libcrypto.so.9.9.7
"0x0090700fL /usr/lib/libcrypto.so.0.9.6 this looks very much like a broken openssl setup to me" thats just a sym link to libcrypto.so.0.9.7
the patch from Andreas Sundstrom worked ok, still a bit strange as to why it needed to be changed even though bn.h defines bn_mod
My comment wasn't added, but here goes: I don't know why the #define statement in bn.h has no effect, the patch is just what I did to be able to compile this for now.. Until someone who has more C knowledge than me can fix whatever should be fixed.. /Andreas
I had the same problem, and it was because of old header file generated by gcc's fixincludes, namely /usr/lib/gcc-lib/.../openssl/bh.h. I just removed the whole directory openssl there.
*** Bug 569 has been marked as a duplicate of this bug. ***
Mass change of RESOLVED bugs to CLOSED