What is easiest way to build a BSD 8 binary on a BSD 7 box?
Peter Steele
psteele at maxiscale.com
Mon Feb 8 04:10:15 UTC 2010
>You could check that the tool is actually linked to the correct libraries with ldd(1). If all else fails, you could try building a full FreeBSD 8 jail or chroot.
>However running FBSD 8 userland on a 7 kernel is unsupported so I have no idea if that will actually work well enough to build software...
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 library modules. That'll be more work but it needs to be done to confirm this approach works. I checked the binaries built on BSD7 and a real BSD8 system and there are clear differences:
BSD7 binary:
libm.so.5 => /lib/libm.so.5 (0x800724000)
libreadline.so.7 => /usr/local/lib/compat/libreadline.so.7 (0x800843000)
libncurses.so.7 => /usr/local/lib/compat/libncurses.so.7 (0x800980000)
libcrypto.so.5 => /usr/local/lib/compat/libcrypto.so.5 (0x800acc000)
libdevinfo.so.4 => /usr/local/lib/compat/libdevinfo.so.4 (0x800d5e000)
libkvm.so.4 => /usr/local/lib/compat/libkvm.so.4 (0x800e60000)
libutil.so.7 => /usr/local/lib/compat/libutil.so.7 (0x800f68000)
libthr.so.3 => /lib/libthr.so.3 (0x801077000)
libc.so.7 => /lib/libc.so.7 (0x80118f000)
BSD8 binary:
libm.so.5 => /lib/libm.so.5 (0x800724000)
* libreadline.so.8 => /lib/libreadline.so.8 (0x800843000)
* libncurses.so.8 => /lib/libncurses.so.8 (0x800981000)
* libcrypto.so.6 => /lib/libcrypto.so.6 (0x800acd000)
* libdevinfo.so.5 => /usr/lib/libdevinfo.so.5 (0x800d67000)
* libkvm.so.5 => /lib/libkvm.so.5 (0x800e69000)
* libutil.so.8 => /lib/libutil.so.8 (0x800f71000)
libthr.so.3 => /lib/libthr.so.3 (0x801081000)
libc.so.7 => /lib/libc.so.7 (0x801199000)
I suspect the libkvm library is the culprit. This list though is what I need to aim for using the sysroot approach.
More information about the freebsd-questions
mailing list