From owner-freebsd-questions@FreeBSD.ORG Mon Feb 13 14:18:37 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1504916A420 for ; Mon, 13 Feb 2006 14:18:37 +0000 (GMT) (envelope-from trix@basement.net) Received: from fran.basement.net (fran.basement.net [66.139.76.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1D7043D45 for ; Mon, 13 Feb 2006 14:18:35 +0000 (GMT) (envelope-from trix@basement.net) Received: from [192.168.15.239] (67-108-187-151.rpt.bna.sparkplugbb.com [67.108.187.151]) (authenticated bits=0) by fran.basement.net (8.12.8/8.12.8) with ESMTP id k1DEISb3015671; Mon, 13 Feb 2006 08:18:33 -0600 Message-ID: <43F09534.3040506@basement.net> Date: Mon, 13 Feb 2006 08:18:28 -0600 From: Trix Farrar Organization: Basement.NET User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20060210212539.31C8E16A420@hub.freebsd.org> In-Reply-To: <20060210212539.31C8E16A420@hub.freebsd.org> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/mixed; boundary="------------040304090208030407080404" Cc: Dan Langille Subject: Re: Contents of freebsd-questions Digest, Vol 123, Issue 19 ([PATCH] (/usr/lib/libxpg4.so.3 missing - Did I miss a memo?) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: trix@basement.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 14:18:37 -0000 This is a multi-part message in MIME format. --------------040304090208030407080404 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 10 Feb 2006 15:37:56 -0500, Kris Kennaway wrote: > On Fri, Feb 10, 2006 at 02:02:17PM -0600, Trix Farrar wrote: >> > On my network, I have several hosts that were originally installed with >> > FreeBSD 5.2.1-RELEASE, 5.3-RELEASE, and 5.4-RELEASE. All of these have >> > been updated now to 6.0-RELEASE-p4. One host was originally installed >> > from 6.0-RELEASE media and subsequently updated to p4. All works well. >> > >> > I took a cue from The FreeBSD Handbook; 21.5 Tracking for Multiple >> > Machines, and have a central build host for the network. On this >> > machine, I do my make buildworld, make buildkernel and building of >> > packages to ports. That way I can just install port packages on the >> > non-build machine. > > If you do this, you need to make sure you're generating compatible > binaries. In this case, you seem to be generating binaries that are > targetted for an older release than FreeBSD 6.0. In order to run 5.x > binaries on FreeBSD 6.0, you need to install the compat5x port and > build with the corresponding kernel option. > >> > * How can I know whether or not it is save to delete libxpg4.a, >> > libxpg4.so, libxpg4.so.3, and libxpg4_p.a from /usr/lib on the machines >> > where they are present? > > Use the libchk port. > >> > * Why would bacula (or anything else, for that matter) even try to link >> > to this library in the first place? (Ok, I'll admit that I'm being lazy >> > on this one because I haven't really researched it yet) > > I'm guessing you are running an old 5.x binary from before the > removal. A 6.0 binary of bacula indeed will not try to link to this > nonexistent library. > I think I found the answer, at least as it relates to Bacula: libxpg4.so.3 used to be built up until FreeBSD 5.4, so a system that was originally installed before 6.0 would have that library lying around because it doesn't get deleted in the process of upgrading to/through 5.0-RELEASE. 6.0 systems, no longer have the source for this library (because it has been a dummy to satisfy link dependencies for some time), so it is no longer built or installed. Bacula's configure.in script specifically adds a link to libxpg4 as part of the build processes - - even though there are no functions to call in this library. On a 6.0 system, this would silently fail and all would be well. On pre-6.0 system, this would silently succeed and all would be well. It's when you try to cross systems that problems pop up. By applying the attached patch (which deletes 3 lines from autoconf/configure.in), the entire issue goes away. Would this be an issue for a PR or just a note to the Bacula developers? The lines I propose to delete are commented as a FreeBSD-specific hook. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD8JUtUn6S0hqD4tsRApolAKCoi93ZUsGgIhdzLD8IxyY6ZuEgygCbBGxw cggOIgfqSqJ2nIY/TVNKfKc= =Nh0n -----END PGP SIGNATURE----- --------------040304090208030407080404 Content-Type: text/x-patch; name="bacula-1.38.5-noxpg4.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bacula-1.38.5-noxpg4.patch" diff -ru bacula-1.38.5-old/autoconf/configure.in bacula-1.38.5/autoconf/configure.in --- bacula-1.38.5-old/autoconf/configure.in Wed Dec 14 15:43:16 2005 +++ bacula-1.38.5/autoconf/configure.in Mon Feb 13 08:10:57 2006 @@ -1557,9 +1557,6 @@ # AC_FUNC_FNMATCH dnl use local version -dnl# FreeBSD needs to link libxpg4 -AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]) -AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"]) AC_CHECK_LIB(sun, getpwnam) --------------040304090208030407080404--