Date: Fri, 30 Apr 2004 13:26:12 -0600 From: "Chad Leigh -- Shire.Net LLC" <chad@shire.net> To: 'freebsd-questions@FreeBSD.ORG ORG' <freebsd-questions@freebsd.org> Subject: linux compatibility layer and ld-linux.so.2 and gentoo Message-ID: <3DB310CE-9ADC-11D8-97F0-003065A70D30@shire.net>
next in thread | raw e-mail | index | archive | help
Hi 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 their stage1. I get this error: CPP='gcc -E -x c-header' /var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/elf/ld- linux.so.2 --library-path /var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere:/var/tmp/ portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/math:/var/tmp/ portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/elf:/var/tmp/portage/ glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/dlfcn:/var/tmp/portage/glibc -2.3.2-r9/work/glibc-2.3.2/buildhere/nss:/var/tmp/portage/glibc-2.3.2- r9/work/glibc-2.3.2/buildhere/nis:/var/tmp/portage/glibc-2.3.2-r9/work/ glibc-2.3.2/buildhere/rt:/var/tmp/portage/glibc-2.3.2-r9/work/glibc -2.3.2/buildhere/resolv:/var/tmp/portage/glibc-2.3.2-r9/work/glibc -2.3.2/buildhere/crypt:/var/tmp/portage/glibc-2.3.2-r9/work/glibc -2.3.2/buildhere/linuxthreads /var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/sunrpc/ rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/sunrpc/ xbootparam_prot.T /bin/sh: line 1: /var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/elf/ld- linux.so.2: cannot execute binary file make[2]: *** [/var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/buildhere/sunrpc/ xbootparam_prot.stmp] Error 126 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2/sunrpc' make[1]: *** [sunrpc/others] Error 2 make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.2-r9/work/glibc-2.3.2' make: *** [all] Error 2 !!! ERROR: sys-libs/glibc-2.3.2-r9 failed. !!! Function src_compile, Line 499, Exitcode 2 !!! (no error message) bash-2.05b# 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: bash-2.05b# /lib/ld-linux.so.2 Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...] You have invoked `ld.so', the helper program for shared library executables. This program usually lives in the file `/lib/ld.so', and special directives in executable files using ELF shared libraries tell the system's program loader to load the helper program from this file. This helper program loads the shared libraries needed by the program executable, prepares the program to run, and runs it. You may invoke this helper program directly from the command line to load and run an ELF executable file; this is like executing that file itself, but always uses this helper program from the file you specified, instead of the helper program file specified in the executable file you run. This is mostly of use for maintainers to test new versions of this helper program; chances are you did not intend to run this program. --list list all dependencies and how they are resolved --verify verify that given object really is a dynamically linked object we can handle --library-path PATH use given PATH instead of content of the environment variable LD_LIBRARY_PATH --inhibit-rpath LIST ignore RUNPATH and RPATH information in object names in LIST bash-2.05b# 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. Thanks Chad
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DB310CE-9ADC-11D8-97F0-003065A70D30>