Re: Reflector 'make' errors on Sun 4.1.3

Christopher Davis (
Thu, 15 Dec 1994 20:12:34 -0500

JCL> == John C Lund <>

JCL> ld: Undefined symbol
JCL> _dlopen
JCL> _dlclose
JCL> _dlsym
JCL> *** Error code 2

This isn't a reflector bug. From BIND 4.9.3-BETA12patch2's shres/PROBLEMS:

* undefined symbols _dlopen, _dlclose, _dlsym (unless you -ldl)

You've previously rebuilt your shared library using Sun's instructions
(/usr/lib/shlib.etc/README). (See also next topic.)

Sun's /usr/lib/shlib.etc/Makefile usually does not include -ldl when
building the new shared library. Unfortunately, this means that if you
ever rebuild the shared library without adding -ldl, you will need to add
-ldl to *every* compilation on that machine from then on.

This is often the case when you have installed resolv+ or made other
changes to; since Sun's shipped /usr/lib/shlib.etc/Makefile, and
even the copy included with most "jumbo libc patches", doesn't include the
-ldl, you may have already found this problem.

Solution: The file shres/sun-Makefile.patch2 will add -ldl to the
appropriate lines in /usr/lib/shlib.etc/Makefile, as will some (but not
all!) versions of the various "jumbo libc" patches. The lines beginning
with "ld -assert" should both end with "-ldl".