From owner-freebsd-emulation@FreeBSD.ORG Wed Oct 6 14:14:25 2004 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 930BD16A4CE; Wed, 6 Oct 2004 14:14:25 +0000 (GMT) Received: from ares.wolfpond.org (ns1.wolfpond.org [62.212.96.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA8C443D45; Wed, 6 Oct 2004 14:14:23 +0000 (GMT) (envelope-from ftigeot@wolfpond.org) Received: from aoi.wolfpond.org (aoi.wolfpond.org [IPv6:2001:7a8:24db:1:20c:76ff:feb4:27e1]) by ares.wolfpond.org (8.13.1/8.13.1) with ESMTP id i96EEMIf004230; Wed, 6 Oct 2004 16:14:22 +0200 (CEST) (envelope-from ftigeot@aoi.wolfpond.org) Received: from aoi.wolfpond.org (localhost [127.0.0.1]) by aoi.wolfpond.org (8.13.1/8.13.1) with ESMTP id i96EETQk030188; Wed, 6 Oct 2004 16:14:29 +0200 (CEST) (envelope-from ftigeot@aoi.wolfpond.org) Received: (from ftigeot@localhost) by aoi.wolfpond.org (8.13.1/8.13.1/Submit) id i96EET8l030187; Wed, 6 Oct 2004 16:14:29 +0200 (CEST) (envelope-from ftigeot) Date: Wed, 6 Oct 2004 16:14:29 +0200 From: Francois Tigeot To: freebsd-amd64@freebsd.org Message-ID: <20041006141429.GD6180@aoi.wolfpond.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: freebsd-emulation@freebsd.org cc: marcel@freebsd.org Subject: Fallback elf brand and Linux emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 14:14:25 -0000 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I attempted today to install emulators/linux_base on a 5.3-BETA7 amd64 machine. The port successfully set the sysctl kern.fallback_elf_brand to the correct linux value but the rpm installation failed with the following error message: "ELF binary type "0" not known." I did a quick sysctl -a | grep elf which gave me the following values: kern.elf64.fallback_brand: 3 kern.fallback_elf_brand: 3 kern.elf32.fallback_brand: -1 Setting kern.elf32.fallback_brand to 3 allowed the port to install. The same sysctl exists also on the i386 architecture. Is there any reason to use kern.fallback_elf_brand and not kern.elf32.fallback_brand ? I have attached a small patch to allow linux_base to install out-of-the box on amd64. It still seems to work on i386. -- Francois Tigeot --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-linux_base --- 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 RPMDIR= ${DISTDIR}/${DIST_SUBDIR} REMOVE_DIRS= boot dev home root tmp var/tmp usr/local usr/tmp @@ -118,7 +121,7 @@ etc/protocols BRAND_FILES= bin/rpm sbin/ldconfig sbin/sln -FALLBACK_ELF_MIB= kern.fallback_elf_brand +FALLBACK_ELF_MIB= kern.elf32.fallback_brand LINUX_ELF= 3 PREVIOUS_ELF!= /sbin/sysctl -n ${FALLBACK_ELF_MIB} --M9NhX3UHpAaciwkO--