BZ #96: NetBSD dlopen configure failure

Status fields:

creation_ts:2008-08-13 17:20
component:build system
version:0.99.2
rep_platform:i386
op_sys:NetBSD
bug_status:RESOLVED
resolution:FIXED
reporter:rjs@netbsd.org
During configure stage get an error when attempting to find libdl, the dlopen
function can be called under NetBSD without specifying an extra library.

Comment #1 by twisti@complang.tuwien.ac.at on 2008-08-13 17:29:51

I see.  So, dlopen is in the libc?

Comment #2 by twisti@complang.tuwien.ac.at on 2008-08-13 17:36:44

As:

http://netbsd.gw.com/cgi-bin/man-cgi?dlopen++NetBSD-4.0

states:

NAME
     dlopen, dlclose, dlsym, dladdr, dlctl, dlerror -- dynamic link interface

LIBRARY
     (These functions are not in a library.  They are included in every dynam-
     ically linked program automatically.)

I wonder if we should AC_MSG_WARN on all systems or only check for this library on
systems we know that it must exist.

Comment #3 by twisti@complang.tuwien.ac.at on 2008-08-14 13:06:10

Here is the fix: http://mips.complang.tuwien.ac.at/hg/cacao/rev/5e3aa2eb333e

Comment #4 by arved+cacao@arved.at on 2008-08-16 22:37:46

Same on FreeBSD, and AFAIK at least some versions of OpenBSD.

Maybe first check if dlopen works without -ldl, then if it works with -ldl and then
error out

Comment #5 by twisti@complang.tuwien.ac.at on 2008-08-28 21:55:41

IRIX has dlopen and friends in libc.  Maybe I should implement what Tilman suggests.

Comment #6 by twisti@complang.tuwien.ac.at on 2008-09-18 14:59:36

I added FreeBSD too: http://mips.complang.tuwien.ac.at/hg/cacao/rev/d14d363e1f27