Problem with porting of an application which depends on linux libs.

Brandon S. Allbery KF8NH allbery at
Fri Sep 5 16:40:27 PDT 2003

On Fri, 2003-09-05 at 19:16, Martin Jessa wrote:
> The libdl library is included in glibc which is located in
> /usr/compat/linux/lib/
> How can I use this library with my port?
> I suspect it isn't possible to link freebsd executables against linux libs.
> Or is it?
> Error message:
> checking for dlsym in -ldl... no
> configure: error: libdl is required
> ===>  Script "configure" failed unexpectedly.

The short answer is "the application is Linux-specific".

The longer one:  dlsym() happens to be in -ldl on Linux, but is in -lc
on FreeBSD. needs to be modified to check for dlsym() being
in libc, and only if it's not found try looking in -ldl; then autoconf
needs to be re-run to generate a new configure script.

But this should be taken as a warning that there may be other hidden
Linux-specific issues to deal with; the fix is *never* to try to link
against Linux compatibility libraries, but to port the application to
use the appropriate FreeBSD libraries and services.

brandon s. allbery    [linux,solaris,freebsd,perl]     allbery at
system administrator      [WAY too many hats]        allbery at
electrical and computer engineering, carnegie mellon univ.         KF8NH
URGENT!  E-xpedient nuked APK subdomains; is DEAD.  Sorry.

More information about the freebsd-ports mailing list