Xymon Mailing List Archive search

Configure SSL Error

3 messages in this thread

list Brian Thompson · Mon, 11 Jun 2007 16:23:53 -0400 ·
Hi all, I've recently got my hobbit server back up and running and now I
need to add SSL support.  I know I can just install it and redo a
configure;make;make install, but I get this error when running
configure:

Checking for OpenSSL ...
Found OpenSSL include files in /usr/local/ssl/include
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_load':dso_dlfcn.c:(.text+0x44): undefined reference to `dlopen'
:dso_dlfcn.c:(.text+0xac): undefined reference to `dlclose'
:dso_dlfcn.c:(.text+0xe6): undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_unload':dso_dlfcn.c:(.text+0x189): undefined reference to
`dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_bind_var':dso_dlfcn.c:(.text+0x267): undefined reference to
`dlsym'
:dso_dlfcn.c:(.text+0x343): undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_bind_func':dso_dlfcn.c:(.text+0x3c1): undefined reference to
`dlsym'
:dso_dlfcn.c:(.text+0x4a1): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make: *** [test-link] Error 1
WARNING: OpenSSL library files found in /usr/local/ssl/lib, but link
fails.
Continuing with SSL support disabled.

I installed openssl 0.9.8e (most recent) and I'm running Hobbit 4.2.0 on
Ubuntu 6.06LTS.  A ./config -t for OpenSSL reveals this:

Operating system: i686-whatever-linux2
Configuring for linux-elf
/usr/bin/perl ./Configure linux-elf

Am I overlooking something seriously obvious?

Thanks,

Brian Thompson
list Henrik Størner · Mon, 11 Jun 2007 22:44:33 +0200 ·
quoted from Brian Thompson
On Mon, Jun 11, 2007 at 04:23:53PM -0400, Thompson, Brian wrote:
Hi all, I've recently got my hobbit server back up and running and now I
need to add SSL support.  I know I can just install it and redo a
configure;make;make install, but I get this error when running
configure:

Checking for OpenSSL ...
Found OpenSSL include files in /usr/local/ssl/include
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_load':dso_dlfcn.c:(.text+0x44): undefined reference to `dlopen'
It seems that your openssl libraries do not automatically pull in the
libdl library when you link with it.

As a workaround, you can change build/Makefile.test-ssl: The "test-link"
command reads
   @$(CC) $(CFLAGS) $(OSSLLIB) -o test-ssl test-ssl.o -lssl -lcrypto $(NETLIBS)
Add a "-ldl" after the "$(NETLIBS)".

That should allow the configure script to complete. After that, you must
change the top-level Makefile: It has a line with
   SSLLIBS = -L/usr/lib -lssl -lcrypto
Change that to
   SSLLIBS = -L/usr/lib -lssl -lcrypto -ldl


Regards,
Henrik
list Brian Thompson · Tue, 12 Jun 2007 08:15:55 -0400 ·
Excellent, that worked great.  Thanks Henrik! 

Brian Thompson

-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Monday, June 11, 2007 4:45 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [BULK] Re: [hobbit] Configure SSL Error
Importance: Low
quoted from Henrik Størner

On Mon, Jun 11, 2007 at 04:23:53PM -0400, Thompson, Brian wrote:
Hi all, I've recently got my hobbit server back up and running and now
I need to add SSL support.  I know I can just install it and redo a 
configure;make;make install, but I get this error when running
configure:

Checking for OpenSSL ...
Found OpenSSL include files in /usr/local/ssl/include
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function
`dlfcn_load':dso_dlfcn.c:(.text+0x44): undefined reference to `dlopen'
It seems that your openssl libraries do not automatically pull in the
libdl library when you link with it.

As a workaround, you can change build/Makefile.test-ssl: The "test-link"
command reads
   @$(CC) $(CFLAGS) $(OSSLLIB) -o test-ssl test-ssl.o -lssl -lcrypto
$(NETLIBS) Add a "-ldl" after the "$(NETLIBS)".

That should allow the configure script to complete. After that, you must
change the top-level Makefile: It has a line with
   SSLLIBS = -L/usr/lib -lssl -lcrypto
Change that to
   SSLLIBS = -L/usr/lib -lssl -lcrypto -ldl


Regards,
Henrik