Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Feb 2010 13:22:13 -0600
From:      Peter Steele <psteele@maxiscale.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   What is easiest way to build a BSD 8 binary on a BSD 7 box?
Message-ID:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB383B24D6@MBX03.exg5.exghost.com>

next in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B9397B189EB6E46A5EE7B4C8A4BB7CB383B24D6>