From owner-freebsd-questions@FreeBSD.ORG Tue Feb 9 16:22:03 2010 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 083A6106566B for ; Tue, 9 Feb 2010 16:22:03 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505e.appriver.com [98.129.35.9]) by mx1.freebsd.org (Postfix) with ESMTP id C03F48FC13 for ; Tue, 9 Feb 2010 16:22:02 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.14 X-Note-Reverse-DNS: ht01.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G173 G174 G175 G176 G180 G181 G192 G279 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.14] (HELO ht01.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.3.2) with ESMTPS id 23195373; Tue, 09 Feb 2010 10:22:05 -0600 Received: from mbx03.exg5.exghost.com ([169.254.1.200]) by ht01.exg5.exghost.com ([98.129.23.14]) with mapi; Tue, 9 Feb 2010 10:22:00 -0600 From: Peter Steele To: Peter Steele , Pieter de Goeje , "freebsd-questions@freebsd.org" Date: Tue, 9 Feb 2010 10:21:59 -0600 Thread-Topic: What is easiest way to build a BSD 8 binary on a BSD 7 box? Thread-Index: AcqoXvsilpAc2Jr/RcGrpUI3DrXDZgAEpZlgAB0MVWA= Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2B9B@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B24D6@MBX03.exg5.exghost.com> <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2501@MBX03.exg5.exghost.com> <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B255E@MBX03.exg5.exghost.com> <201002080233.59464.pieter@degoeje.nl> <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B258A@MBX03.exg5.exghost.com> In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B258A@MBX03.exg5.exghost.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Subject: RE: What is easiest way to build a BSD 8 binary on a BSD 7 box? 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, 09 Feb 2010 16:22:03 -0000 >I suspect I know the problem. The tool I'm building links with a bunch of = other libraries we've developed, which I didn't write. I only modified the = makefile of my >own code. I'm going to have to tweak the makefiles of a dozen different li= brary modules. Unfortunately the problem isn't quite as simple as using sysroot. The probl= em with sysroot is symbolic links. Unlike chroot which makes everything ref= erence the new root, including absolute paths, sysroot only does one level = of redirection. So for example if my BSD8 root is located under /repo/bsd8,= I can point sysroot there but libkvm doesn't link because of this: $ ll /repo/bsd8/usr/lib/libkvm* -r--r--r-- 1 root wheel 59630 Feb 7 14:43 /repo/bsd/bsd8/usr/lib/libkvm= .a lrwxr-xr-x 1 root wheel 16 Feb 9 07:26 /repo/bsd8/usr/lib/libkvm.so = -> /lib/libkvm.so.5 -r--r--r-- 1 root wheel 61352 Feb 7 14:43 /repo/bsd/bsd8/usr/lib/libkvm= _p.a The link points to a non-existent library outside of the BSD 8 tree (libkvm= is libkvm.so.4 under BSD 7). There are several libraries that fall victim = to this symbolic link issue that breaks the sysroot option. I've tried copy= ing the linked BSD 8 libraries to the /lib directory under my BSD 7 system = and solves the symbolic link problem, but now I'm getting an undefined symb= ol.=20 It might make more sense to use chroot to do this, although that has compli= cations of its own in that I need to install more packages into my BSD8 rep= ository...