Date: Wed, 27 Oct 2004 20:16:26 +0200 From: Francois Tigeot <ftigeot@wolfpond.org> To: Greg Lewis <glewis@eyesbeyond.com> Cc: Lars Tunkrans <lars.tunkrans@bredband.net> Subject: Re: How I got linux emulation to work for AMD64 on RC1 Message-ID: <20041027181626.GA24520@aoi.wolfpond.org> In-Reply-To: <20041027162456.GA81485@misty.eyesbeyond.com> References: <417ECCFE.7010105@bredband.net> <20041027162456.GA81485@misty.eyesbeyond.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 27, 2004 at 10:24:56AM -0600, Greg Lewis wrote: > On Wed, Oct 27, 2004 at 12:17:34AM +0200, Lars Tunkrans wrote: > > This is a step by step guide to get linux emulation to run > > on AMD64 5.3-RC1 using the standard emulators/linux_base port. > > Well, it will get you Linux/ia32 emulation, not Linux/amd64 emulation. > > [...] > > > 5.) Patch /usr/ports/emulators/linux_base/Makefile with > > Francois Tigeot's patch. > > > > Put the patch below in /usr/ports/emulators/linux_base/patchfile > > run: > > > > # patch -p0 < patchfile > > > > ---------------<snip>------------------ > > --- Makefile.orig Wed Oct 6 15:13:33 2004 > > +++ Makefile Wed Oct 6 16:05:51 2004 > > @@ -110,6 +110,9 @@ > > RPM= LC_ALL=C rpm > > RPMFLAGS= --root ${LINUXBASE} --dbpath ${DBPATH} --nodeps \ > > --replacepkgs --ignoreos --ignorearch > > +.if (${ARCH} == "amd64") > > +RPMFLAGS+= --noscripts > > +.endif > > This explains why you need to run ldconfig later on. Essentially, judging > from this and the brandelf lines in the ldconfig step the kernel doesn't > automatically recognise the executables as Linux executables. Is that the > only reason for turning scripts off or are there bigger problems with the > pre/post install scripts? > > This is a hack at best and potentially results in the port not quite being > configured correctly, depending on what the scripts actually do (most do > little, from memory, although quite a few run ldconfig, so this may be ok). > A more complete fix would either have the executables recognised as Linux > executables automatically (and remove the --noscripts flag) or execute > all the scripts in the post-install phase of the port after the brandelf > operations. Yes, this is a hack. Some scripts from the glibc-2.2.4-33 rpm fail to install when run on an amd64 machine. I have no idea why. The scripts fail even if kern.elf32.fallback_brand is set prior to their execution. The above mentionned patch was just created in 5 minutes and is far from optimal. -- Francois Tigeot
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041027181626.GA24520>