undefined reference to dlopen, dlclose, dlsym and dlerror
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.