FreeBSD 1.x Binaries Work Except under Chroot

Konstantin Belousov kostikbel at gmail.com
Fri Aug 10 17:07:21 UTC 2012


On Fri, Aug 10, 2012 at 12:06:46PM -0400, Dan Plassche wrote:
> Hello,
> 
> I'm successfully running FreeBSD 1.1.5.1 binaries from a
> directory on an 8.2 system.  The goal is to ultimately setup a
> chroot build environment targeting 1.x for an old 386.  However,
> whenever I chroot to the /freebsd-1.1.5.1 directory tree, the old
> binaries suddenly start failing with linker error messages such
> as this one: "ld.so: whereis: libc.so.1.1".
> 
> I've tried to run ldconfig (static old and new versions) on
> clean copies of /freebsd-1.1.5.1 to correct the problem.  Each
> copy of the tree has libc.so.1.1 under /usr/lib and the full
> /usr/lib/compat/aout (just in case).
> 
> Running the old ldconfig with the -v flag against both library
> directories shows the libraries added and produces a new
> /var/run/ld.so.hints file.  Running that same old ldconfig with
> -r shows "2:-lc.1.1 => /usr/lib/libc.so.1.1 (9-> -1)" but the
> binaries still fail in the chroot.
> 
> The same process with the 8.2 ldconfig (after copying
> in /libexec/ld-elf.so.1 and /lib/libc.so.7 to make it
> work) also fails to resolve the problem after creating the
> aout /var/run/ld.so.hints file for /usr/lib/* and the elf
> /var/run/ld-elf.so.hints file for /lib.
> 
> Would anyone have a suggestion please?  The setup outside of the
> chroot works with the 1.x compat libraries combines with a kernel
> compiled with the compat options and PID_MAX set to 3000.

Try to ktrace the binaries to see what is going on. I suspect that
sources for 1.1.5 are not in our cvs/svn, so it is troublesome to
say anuthing without ktrace dump.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120810/391b316f/attachment.pgp


More information about the freebsd-hackers mailing list