From owner-freebsd-questions@FreeBSD.ORG Tue Sep 15 12:29:08 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070F61065695 for ; Tue, 15 Sep 2009 12:29:08 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id C56A28FC18 for ; Tue, 15 Sep 2009 12:29:07 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id E1AF37E818; Tue, 15 Sep 2009 04:29:19 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Tue, 15 Sep 2009 14:29:04 +0200 User-Agent: KMail/1.12.1 (FreeBSD/8.0-BETA4; KDE/4.3.1; i386; ; ) References: <20090914145447.K63280@cloud.ccsf.cc.ca.us> <200909150117.03050.mel.flynn+fbsd.questions@mailing.thruhere.net> <20090914173958.C21417@cloud.ccsf.cc.ca.us> In-Reply-To: <20090914173958.C21417@cloud.ccsf.cc.ca.us> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200909151429.04818.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: "Joe R. Jah" Subject: Re: libnsl.so.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2009 12:29:08 -0000 On Tuesday 15 September 2009 02:43:32 Joe R. Jah wrote: > On Tue, 15 Sep 2009, Mel Flynn wrote: > > Date: Tue, 15 Sep 2009 01:17:02 +0200 > > From: Mel Flynn > > To: freebsd-questions@freebsd.org > > Cc: Joe R. Jah > > Subject: Re: libnsl.so.1 > > > > On Tuesday 15 September 2009 00:02:50 Joe R. Jah wrote: > > > Hello all, > > > > > > I want to install a dispather module from Day Communique software on > > > apache22. The binaray mod_dispatcher.so is provided by Day as a 64 bit > > > *NIX compatible module to place in apache22 module directory. The > > > mocule requires a shared library missing from system: > > > > > > --8<-- > > > # apachectl -t > > > httpd: Syntax error on line 827 of /usr/local/etc/apache22/httpd.conf: > > > Cannot load /usr/local/libexec/apache22/mod_dispatcher.so into server: > > > Shared object "libnsl.so.1" not found, required by "mod_dispatcher.so" > > > --8<-- > > > > > > Does anyone know where to download libnsl.so.1, or from what port it > > > can be installed? > > > > nsl=name service library. All of it's functions are in FreeBSD implement > > in libc. If this mod_dispatcher.so is indeed loadable by FreeBSD's > > linker, then you can provide a dummy libnsl.so.1, like so: > > > > $ cat <'EOF' >BSDmakefile > > SHLIB=nsl > > SHLIB_MAJOR=1 > > NO_MAN=yes > > SRCS=nsl.c > > > > .include > > EOF > > $ cat <'EOF' >nsl.c > > int nsl_dummy(void); > > > > int nsl_dummy(void) { return 0; } > > EOF > > > > $ make; sudo make LIBDIR=/usr/local/lib install > > > > The symbols it's looking for should be provided by libc, but if there's > > any undefined ones, this trickery gets a little dangerous and you're > > better off asking the developers for a native FreeBSD version. > > Thank you Mel. You were right about undefined ones; Here's what I get: > > --8<-- > apachectl -t > httpd: Syntax error on line 826 of /usr/local/etc/apache22/httpd.conf: > Cannot load /usr/local/libexec/apache22/mod_dispatcher.so into server: > /usr/local/libexec/apache22/mod_dispatcher.so: Undefined symbol "__strdup" > --8<-- > > Any more trickeries?;-) Sure, add #define __strdup strdup to nsl.c, however this road is not likely to end soon. It seems to be compiled for a linux system, at least for a SYSV system, while FreeBSD follows '4.4BSD'. -- Mel