linux compatibility layer and ld-linux.so.2 and gentoo
Chad Leigh -- Shire.Net LLC
chad at shire.net
Fri Apr 30 12:26:17 PDT 2004
I am trying to build a gentoo based base system on 5.2-CURRENT, since
the few linux boxes we have to run are gentoo based and I like to keep
things the same...
Anyway, i am running into a problem. They have a bootstrap.sh step
that rebuilds gcc and glibc and a bunch of stuff after you install
I get this error:
CPP='gcc -E -x c-header'
rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o
/bin/sh: line 1:
linux.so.2: cannot execute binary file
xbootparam_prot.stmp] Error 126
make: *** Waiting for unfinished jobs....
make: Leaving directory
make: *** [sunrpc/others] Error 2
make: Leaving directory
make: *** [all] Error 2
!!! ERROR: sys-libs/glibc-2.3.2-r9 failed.
!!! Function src_compile, Line 499, Exitcode 2
!!! (no error message)
The problem is that on a real linux system you can "execute"
ld-linux.so.2 but that does not work on FreeBSD compatibility. If you
execute it directly on a linux system (I have tried a gentoo and
mandrake system) you get this:
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library
This program usually lives in the file `/lib/ld.so', and special
in executable files using ELF shared libraries tell the system's program
loader to load the helper program from this file. This helper program
the shared libraries needed by the program executable, prepares the
to run, and runs it. You may invoke this helper program directly from
command line to load and run an ELF executable file; this is like
that file itself, but always uses this helper program from the file you
specified, instead of the helper program file specified in the
file you run. This is mostly of use for maintainers to test new
of this helper program; chances are you did not intend to run this
--list list all dependencies and how they are resolved
--verify verify that given object really is a
object we can handle
--library-path PATH use given PATH instead of content of the
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object
Anyone know how to get around this in setting up a linux base system on
FreeBSD using linux compatibility? I do have COMPAT_LINUX and a few
other things in my FreeBSD kernel.
More information about the freebsd-questions