From owner-freebsd-ports@FreeBSD.ORG Fri Sep 5 16:40:27 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4421E16A4BF for ; Fri, 5 Sep 2003 16:40:27 -0700 (PDT) Received: from bache.ece.cmu.edu (BACHE.ECE.CMU.EDU [128.2.129.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7016043FEA for ; Fri, 5 Sep 2003 16:40:26 -0700 (PDT) (envelope-from allbery@ece.cmu.edu) Received: by bache.ece.cmu.edu (Postfix, from userid 953) id 49B75B7; Fri, 5 Sep 2003 19:40:25 -0400 (EDT) Received: from [128.2.138.72] (VPN72.ECE.CMU.EDU [128.2.138.72]) by bache.ece.cmu.edu (Postfix) with ESMTP id E054BAB; Fri, 5 Sep 2003 19:40:21 -0400 (EDT) From: "Brandon S. Allbery KF8NH" To: freebsd@yazzy.org In-Reply-To: <21881.193.215.241.28.1062803807.squirrel@mail.yazzy.org> References: <21881.193.215.241.28.1062803807.squirrel@mail.yazzy.org> Content-Type: text/plain Message-Id: <1062805199.25955.6.camel@pyanfar.ece.cmu.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Fri, 05 Sep 2003 19:40:00 -0400 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-35.6 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: ports@freebsd.org Subject: Re: Problem with porting of an application which depends on linux libs. X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2003 23:40:27 -0000 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/libdl.so.2 > 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. config.in 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@kf8nh.com system administrator [WAY too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon univ. KF8NH URGENT! E-xpedient nuked APK subdomains; kf8nh.apk.net is DEAD. Sorry.