From owner-freebsd-questions@FreeBSD.ORG Mon Feb 8 00:51:40 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 D9ACA1065672 for ; Mon, 8 Feb 2010 00:51:40 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505a.appriver.com [98.129.35.4]) by mx1.freebsd.org (Postfix) with ESMTP id A10298FC0C for ; Mon, 8 Feb 2010 00:51:40 +0000 (UTC) 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 26600067 for freebsd-questions@freebsd.org; Sun, 07 Feb 2010 18:51:37 -0600 Received: from mbx03.exg5.exghost.com ([169.254.1.200]) by ht01.exg5.exghost.com ([98.129.23.14]) with mapi; Sun, 7 Feb 2010 18:51:38 -0600 From: Peter Steele To: "freebsd-questions@freebsd.org" Date: Sun, 7 Feb 2010 18:51:37 -0600 Thread-Topic: What is easiest way to build a BSD 8 binary on a BSD 7 box? Thread-Index: AcqnlMllVthFcU6xTR+spCSJ9MZBIAAC/B6gAC0PNjA= Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B255E@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B24D6@MBX03.exg5.exghost.com> <201002070227.48003.pieter@degoeje.nl> <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2501@MBX03.exg5.exghost.com> In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B2501@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 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: Mon, 08 Feb 2010 00:51:40 -0000 >The easiest way would probably be the following. > ># SOMEDIR=3D/path/to/fbsd8buildenv ># mkdir -p ${SOMEDIR} ># cd /path/to/FreeBSD-8.0/src ># make buildworld ># make installworld DESTDIR=3D${SOMEDIR} > >Then adding --sysroot=3D${SOMEDIR} to all invocations of gcc/ld and/or lib= eral use of -I and -L gcc options should do the trick. > >For example: ># export CFLAGS=3D"-I${SOMEDIR}/usr/include -L${SOMEDIR}/lib -L${SOMEDIR}/= usr/lib # make I've done this and it's clearly working, at least in the sense I can tell t= he libraries are coming from my BSD 8 repository. My makefile is generating= gcc commands that look like this: gcc -m64 -DHAVE_INT64_T --sysroot=3D/usr/local/buildrepo/bsd/v8/obj -L/usr/= local/buildrepo/bsd/v8/obj/usr/lib ... I know it's working because if I rename the directory pointed to by sysroot= the link fails. My tool is still failing though in exactly the same way in= a call to kvm_read. The same call works fine when the tool is built on a B= SD 8 box. Is there anything else I need to do to make sure the BSD 7 built = binary is a fully complaint BSD 8 binary?