From owner-freebsd-ports@FreeBSD.ORG Wed Oct 27 16:25:02 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BD2016A4CF; Wed, 27 Oct 2004 16:25:02 +0000 (GMT) Received: from misty.eyesbeyond.com (glewis.dsl.xmission.com [166.70.56.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76B9543D2D; Wed, 27 Oct 2004 16:25:01 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) i9RGOvmQ081614; Wed, 27 Oct 2004 10:24:57 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.12.11/8.12.11/Submit) id i9RGOuVB081613; Wed, 27 Oct 2004 10:24:56 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Wed, 27 Oct 2004 10:24:56 -0600 From: Greg Lewis To: Lars Tunkrans Message-ID: <20041027162456.GA81485@misty.eyesbeyond.com> References: <417ECCFE.7010105@bredband.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417ECCFE.7010105@bredband.net> User-Agent: Mutt/1.4.2.1i cc: ports@freebsd.org cc: marcel@freebsd.org Subject: Re: How I got linux emulation to work for AMD64 on RC1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2004 16:25:02 -0000 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 > > --------------------------------- > --- 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. FWIW. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org