LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   undefined reference to dlopen, dlclose, dlsym and dlerror (https://www.linuxquestions.org/questions/slackware-14/undefined-reference-to-dlopen-dlclose-dlsym-and-dlerror-350945/)

patrickdepingui 08-07-2005 06:16 PM

undefined reference to dlopen, dlclose, dlsym and dlerror
 
After a harddisk crash I had to reinstall my system. Now I'm having problems compiling programs, like modlogan 0.8.13.

./configure runs okay, but during make I get the error:

mplugins.o(.text+0xed): In function `mplugins_load_plugins':
/usr/src/modlogan-0.8.13/src/mplugins.c:127: undefined reference to `dlopen'
mplugins.o(.text+0x11c):/usr/src/modlogan-0.8.13/src/mplugins.c:142: undefined reference to `dlsym'
mplugins.o(.text+0x2f5):/usr/src/modlogan-0.8.13/src/mplugins.c:134: undefined reference to `dlerror'
mplugins.o(.text+0x43c): In function `mplugins_free':
/usr/src/modlogan-0.8.13/src/mplugins.c:212: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[3]: *** [modlogan] Error 1
make[3]: Leaving directory `/usr/src/modlogan-0.8.13/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/modlogan-0.8.13/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/modlogan-0.8.13'
make: *** [all] Error 2


In the configure output I see:
checking for dlopen... no
checking for dlopen in -ldl... no
checking for dlopen in -lsvld... no
checking for dld_link in -ldld... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool


I have these packages installed:
glib-1.2.10, glib2-2.6.5, glibc-2.3.5, glibc-solibs-2.3.5, glibc-zoneinfo-2.3.5, libtool-1.5.14

I don't know where to start, the system is fresh...
I got the same errors with checkinstall.

Thanks for any directions.

rjlee 08-07-2005 06:25 PM

This looks like a problem with the libdl package, or possibly the libdb-devel package if you have one of those. libdb handles dynamic linking, and implements these functions in the files /usr/lib/libdl.a and /usr/lib/libdl.so

(Re)install libdbl and I think that should fix it.

patrickdepingui 08-07-2005 06:50 PM

libdl seemed to be in the glibc en glibc-solibs packages. Reinstalling the glibc package solved the problem indeed.

Thanks for the hint!

jkaidor 02-09-2010 09:57 PM

Quote:

Originally Posted by patrickdepingui (Post 1787409)
libdl seemed to be in the glibc en glibc-solibs packages. Reinstalling the glibc package solved the problem indeed.

Thanks for the hint!

*** Did you just reinstall it from the distribution, or did you have to get the source and compile it?

- Jerry Kaidor

patrickdepingui 02-12-2010 01:10 AM

This was a very long time ago, but I'm pretty sure that I just reinstalled the package that came with Slackware.

jkaidor 02-14-2010 08:55 AM

Quote:

Originally Posted by patrickdepingui (Post 3861168)
This was a very long time ago, but I'm pretty sure that I just reinstalled the package that came with Slackware.

*** Thanks, Patrick. I did resolve the problem, and here's what I did:

* Inside the "src/osdep/unix" directory,
I modified Makefile - the "slx" ( Shadow Linux ) target to include "-ldl" in the BASELDFLAGS list.

BTW, the package I was trying to build was UW IMAP.

- Jerry Kaidor


All times are GMT -5. The time now is 12:12 AM.