From owner-freebsd-questions@FreeBSD.ORG Sat Feb 6 19:22:16 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 3ABC11065670 for ; Sat, 6 Feb 2010 19:22:16 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505b.appriver.com [98.129.35.5]) by mx1.freebsd.org (Postfix) with ESMTP id 016F48FC14 for ; Sat, 6 Feb 2010 19:22:15 +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 22837433 for freebsd-questions@freebsd.org; Sat, 06 Feb 2010 13:22:14 -0600 Received: from mbx03.exg5.exghost.com ([169.254.1.200]) by ht01.exg5.exghost.com ([98.129.23.14]) with mapi; Sat, 6 Feb 2010 13:22:14 -0600 From: Peter Steele To: "freebsd-questions@freebsd.org" Date: Sat, 6 Feb 2010 13:22:13 -0600 Thread-Topic: What is easiest way to build a BSD 8 binary on a BSD 7 box? Thread-Index: AcqnYa/Q/GEca6C4T/W4ADNerfHyTQ== Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B24D6@MBX03.exg5.exghost.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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: Sat, 06 Feb 2010 19:22:16 -0000 I have a BSD 7 system with the full BSD 8 sources loaded on it, and we use = this box to build our custom BSD 8 kernel and tools. We do not install the = custom code on the BSD 7 box but simply collect the artifacts as a basis fo= r our custom BSD 8 image. I have a standalone tool that has previously been= built on this same BSD 7 system, but it just uses gcc and links against th= e normal BSD 7 libraries that are located on this box. When we run this tool on a BSD 7 box it works fine. However, we've discover= ed one function it performs doesn't work properly. It uses kvm_read to coll= ect network statistics and apparently applications that use this function h= ave to be linked against the libraries of the actual target OS. One easy so= lution of course is to build our tool on a BSD 8 box, and in the long run w= e'll likely go that route as we move away from BSD 7. Right now though our = build server is BSD 7 and we need to build this tool against BSD 8 librarie= s. This obviously can be done since "make world" does exactly that-it build= s everything against 8.0 objects even if the build is done on a BSD 7 box. Without dissecting the magic going on in "make world", can any explain how = I could do the same thing with my standalone tool? Specifically, build it o= n a BSD 7 box but link it against BSD 8 libraries.