Problem compiling openssh-4.3p2 w/ openssl.0.9.8a on FC3

Darren Tucker dtucker at zip.com.au
Wed Mar 15 07:37:02 EST 2006


On Tue, Mar 14, 2006 at 10:29:02AM -0800, Colin Dick wrote:
> gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o 
[...]
> : undefined reference to `dlopen'
> 	Any ideas?  It looks like an incompatibility between OpenSSH and 
> OpenSSL.  Thanks in advance for any information or suggestions you can 
> provide.

OpenSSL now seems to need libdl these days.  You can add it by doing:
./configure --with-libs=-ldl

Perhaps configure should test for this condition, eg the attached?
(Anyone trying this will need to run "autoreconf" to rebuild configure
then re-run configure).

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v
retrieving revision 1.333
diff -u -p -r1.333 configure.ac
--- configure.ac	13 Mar 2006 08:06:51 -0000	1.333
+++ configure.ac	14 Mar 2006 20:33:23 -0000
@@ -1871,6 +1895,36 @@ int main(void) { exit(EVP_aes_192_cbc() 
 	]
 )
 
+AC_MSG_CHECKING([if programs using OpenSSL functions will link])
+AC_LINK_IFELSE(
+	[AC_LANG_SOURCE([[
+#include <openssl/evp.h>
+int main(void) { SSLeay_add_all_algorithms(); }
+	]])],
+	[
+		AC_MSG_RESULT(yes)
+	],
+	[
+		AC_MSG_RESULT(no)
+		saved_LIBS="$LIBS"
+		LIBS="$LIBS -ldl"
+		AC_MSG_CHECKING([if programs using OpenSSL need -ldl])
+		AC_LINK_IFELSE(
+			[AC_LANG_SOURCE([[
+#include <openssl/evp.h>
+int main(void) { SSLeay_add_all_algorithms(); }
+			]])],
+			[
+				AC_MSG_RESULT(yes)
+			],
+			[
+				AC_MSG_RESULT(no)
+				LIBS="$saved_LIBS"
+			]
+		)
+	]
+)
+
 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
 # because the system crypt() is more featureful.
 if test "x$check_for_libcrypt_before" = "x1"; then


More information about the openssh-unix-dev mailing list