Bug 51711

Summary: /usr/ports/emulators/linux_base will not install
Product: Ports & Packages Reporter: Dan Strick <strick>
Component: Individual Port(s)Assignee: Trevor Johnson <trevor>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Dan Strick 2003-05-03 05:00:25 UTC
	One of the programs invoked by the emulators/linux_base port Makefile
	after most or all of the rpms are installed returns a bad exit code.
	I forget which program it is or what the return code was.
	These things may not be obvious from the console output produced by
	the Makefile.  I am no longer able to reproduce the problem because
	I have completed the linux_base installation and have installed a lot
	of software that uses it and fear that reinstalling it may screw
	everything up.

	This problem occurs for both the "linux_base" and "linux_base-6" ports.
	Different programs fail with different error messages in each case,
	but the effects are very similar.

Fix: 

Unload the svr4 kernel module and reattempt the port installation.

	I observe that virtually all the elf files in the linux_base
	distribution are branded as "SVR4" and the Makefile rebrands
	only a couple of them as "Linux".

	The obvious suspicion is that the Linux emulator cannot generally
	work reliably if the SystemV emulator is enabled.
	Is this correct?  (Or is it just me?)
	Should the linux_base Makefile rebrand every elf file from the
	linux_base distfiles as "Linux"?
How-To-Repeat: 	Make sure /usr/compat/linux is empty or non-existant.
	Do:
		cd /usr/ports/emulators/linux_base
		make install
Comment 1 Dan Strick 2003-05-03 07:59:14 UTC
I just discovered that I kept a copy of the tail end of the output from
a port "make install" that failed:

	>> Checksum OK for rpm/popt-1.6.2-8.i386.rpm.
	>> Checksum OK for rpm/readline-4.1-9.i386.rpm.
	>> Checksum OK for rpm/setserial-2.17-2.i386.rpm.
	>> Checksum OK for rpm/slang-1.4.2-2.i386.rpm.
	>> Checksum OK for rpm/sh-utils-2.0-13.i386.rpm.
	>> Checksum OK for rpm/rpm-4.0.2-8.i386.rpm.
	>> Checksum OK for rpm/freetype-2.0.1-4.i386.rpm.
	>> Checksum OK for rpm/XFree86-libs-4.0.3-5.i386.rpm.
	>> Checksum OK for rpm/glibc-common-2.2.4-31.i386.rpm.
	>> Checksum OK for rpm/glibc-2.2.4-31.i386.rpm.
	>> Checksum OK for rpm/zlib-1.1.3-25.7.i386.rpm.
	>> Checksum OK for rpm/libstdc++-2.96-112.7.1.i386.rpm.
	===>  Patching for linux_base-7.1_2
	===>   linux_base-7.1_2 depends on executable: rpm - found
	===>  Configuring for linux_base-7.1_2
	===>  Installing for linux_base-7.1_2
	kern.fallback_elf_brand: 3 -> 3
	glibc-common-2.2.4-31.i386.rpm
	glibc-2.2.4-31.i386.rpm
	execution of glibc-2.2.4-31 script failed, exit status 0
	*** Error code 1

	Stop in /fs/u4d/ports-4.8/emulators/linux_base.
	10.499u 9.621s 1:21.06 24.8%    1680+2579k 14+683io 0pf+0w

	Left core file: /compat/linux/glibc_post_upgra.core

Dan Strick

P.S. I no longer have a copy of the core file.
Comment 2 Trevor Johnson freebsd_committer freebsd_triage 2004-02-06 20:00:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->trevor
Comment 3 Trevor Johnson freebsd_committer freebsd_triage 2004-02-06 20:02:26 UTC
State Changed
From-To: open->analyzed

PR 53874 seems to describe the same bug.  Perhaps the linux_base 
ports could check whether the svr4 module is loaded.
Comment 4 Florent Thoumie freebsd_committer freebsd_triage 2005-04-14 18:04:59 UTC
State Changed
From-To: analyzed->closed

ports/53874 describes the same bug with a little more information. 
Close this one and add a note in the audit trail of the other 
to point out this PR.