From vince@bigbang.DNALOGIC.NET  Sat Jun 28 05:53:44 2003
Return-Path: <vince@bigbang.DNALOGIC.NET>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7980937B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Jun 2003 05:53:44 -0700 (PDT)
Received: from bigbang.DNALOGIC.NET (adsl-208-201-244-224.sonic.net [208.201.244.224])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C6A1443FEA
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Jun 2003 05:53:43 -0700 (PDT)
	(envelope-from vince@bigbang.DNALOGIC.NET)
Received: from bigbang.DNALOGIC.NET (smmsp@localhost.DNALOGIC.NET [127.0.0.1])
	by bigbang.DNALOGIC.NET (8.12.9/8.12.9) with ESMTP id h5SCrgUQ041356
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Jun 2003 05:53:43 -0700 (PDT)
	(envelope-from vince@bigbang.DNALOGIC.NET)
Received: (from root@localhost)
	by bigbang.DNALOGIC.NET (8.12.9/8.12.9/Submit) id h5SCrgN8041355;
	Sat, 28 Jun 2003 05:53:42 -0700 (PDT)
Message-Id: <200306281253.h5SCrgN8041355@bigbang.DNALOGIC.NET>
Date: Sat, 28 Jun 2003 05:53:42 -0700 (PDT)
From: Vincent Poy <vince@bigbang.DNALOGIC.NET>
Reply-To: Vincent Poy <vince@bigbang.DNALOGIC.NET>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /usr/ports/emulators/linux_base isn't working properly
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         53874
>Category:       kern
>Synopsis:       [linux] /usr/ports/emulators/linux_base isn't working properly when SVR4 emulation is enabled
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-emulation
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 28 06:00:25 PDT 2003
>Closed-Date:    Thu Dec 29 15:37:06 GMT 2005
>Last-Modified:  Thu Dec 29 15:37:06 GMT 2005
>Originator:     Vincent Poy
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
DNA Logic Corporation - http://www.DNALOGIC.NET - San Francisco, California USA
>Environment:
System: FreeBSD bigbang.DNALOGIC.NET 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Tue Jun 24 18:22:58 PDT 2003 vince@bigbang.DNALOGIC.NET:/usr/obj/usr/src/sys/BIGBANG i386


	
>Description:
The /usr/ports/emulators/linux_base seems to be linked to the wrong 
libraries and path as I tried it on various machines and 
if I did /compat/linux/bin/ls - it would:

root@bigbang [5:50am][/usr/compat/linux] >> /compat/linux/bin/ls
ELF interpreter /compat/svr4/lib/ld-linux.so.2 not found
Abort
root@bigbang [5:50am][/usr/compat/linux] >> 

Doing a ln -sf /compat/svr4 /compat/linux didn't work as that creates a
core dump.

compiling linux-sun-jdk has the same problem too.

root@bigbang [5:51am][/usr/ports/java/jdk13] >> make
===>   jdk-1.3.1p8_2 depends on executable: gm4 - found
===>   jdk-1.3.1p8_2 depends on executable: zip - found
===>   jdk-1.3.1p8_2 depends on file: /usr/X11R6/lib/libXm.so - found
===>   jdk-1.3.1p8_2 depends on file: /usr/local/linux-sun-jdk1.3.1/bin/javac - not found
===>    Verifying install for /usr/local/linux-sun-jdk1.3.1/bin/javac in /usr/ports/java/linux-sun-jdk13
===>  Extracting for linux-sun-jdk-1.3.1.08
>How-To-Repeat:
/compat/linux/bin/ls
as one example.

Another one is trying to compile linux-sun-jdk.

cd /usr/ports/java/linux-sun-jdk13
make clean all

>Fix:

	


>Release-Note:
>Audit-Trail:

From: Vincent Poy <vince@bigbang.DNALOGIC.NET>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/53874: /usr/ports/emulators/linux_base isn't working
 properly
Date: Sun, 29 Jun 2003 00:41:50 -0700 (PDT)

 	I figured this out.  It seems loading the svr4 module breaks
 anything relating to linux.
 
 
 Cheers,
 Vince - vince@DNALOGIC.NET - President/CEO              ________   __ ____
 Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
 DNA Logic Corporation - http://www.DNALOGIC.NET        / / / /  | /  | __] ]
 San Francisco, California USA                         / / / / / |/ / | __] ]
 HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____]
 Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-bugs 
Responsible-Changed-By: osa 
Responsible-Changed-When: Mon Nov 24 12:25:29 PST 2003 
Responsible-Changed-Why:  
AFAIK it is not a ports-specific problem. 
On my -CURRENT box I can reproduce it as following: 

$ kldload linux 
then install linux_base (if its don't already installed) 
$ cd ~ 
$ /compat/linux/bin/ls -l 
.....<good listing> 

# kldload /boot/kernel/svr4.ko 
$ /compat/linux/bin/ls -l 
ELF interpreter /compat/svr4/lib/ld-linux.so.2 not found 
zsh: abort      /compat/linux/bin/ls -al 
# kldunload svr4.ko 
$ $ /compat/linux/bin/ls -l 
.....<good listing again> 


http://www.freebsd.org/cgi/query-pr.cgi?pr=53874 
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Nov 29 14:33:34 PST 2003 
Responsible-Changed-Why:  
Assign to proper responsible. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53874 
Responsible-Changed-From-To: freebsd-ports-bugs->emulation 
Responsible-Changed-By: trevor 
Responsible-Changed-When: Mon Feb 2 01:35:37 PST 2004 
Responsible-Changed-Why:  
not a ports problem 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53874 

From: Florent Thoumie <flz@FreeBSD.org>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/53874
Date: Thu, 14 Apr 2005 19:11:08 +0200

 	I've closed ports/51711 since it describes the same issue and 
 	was in ports category.
 
 -- 
 Florent Thoumie
 flz@FreeBSD.org
 

From: John Baldwin <jhb@freebsd.org>
To: bug-followup@freebsd.org, vince@bigbang.dnalogic.net
Cc:  
Subject: Re: kern/53874: [linux] /usr/ports/emulators/linux_base isn't working properly when SVR4 emulation is enabled
Date: Wed, 23 Nov 2005 09:13:35 -0500

 The problem appears to be that SVR4 and Linux a.out binaries both use the s=
 ame=20
 format, thus the order that the different image activators are tried in=20
 matters.  I suspect that if you kldload svr4.ko first and then kldload=20
 linux.ko that it might work, but that no svr4 binaries would work at that=20
 point.  The only way this can be fixed is if someone can figure out a way t=
 o=20
 distinguish a SVR4 a.out binary from a Linux a.out binary.
 
 =2D-=20
 John Baldwin <jhb@FreeBSD.org> =A0<>< =A0http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org
State-Changed-From-To: open->closed 
State-Changed-By: netchild 
State-Changed-When: Thu Dec 29 15:33:44 UTC 2005 
State-Changed-Why:  
We only ship with ELF executables in the default linux base and any 
update to the default linux base will only support ELF too. 
So, close this PR since a.out is outdated and no widespread support 
is needed. Interested parties most likely have to fix this themselve or 
better use different boxes for different emulation needs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53874 
>Unformatted:
 >> Checksum OK for j2sdk-1_3_1_08-linux-i586.bin.
 ===>   linux-sun-jdk-1.3.1.08 depends on file: /compat/linux/lib/libc.so.6 - found
 ELF interpreter /compat/svr4/lib/ld-linux.so.2 not found
 Abort trap
 *** Error code 134
 
 Stop in /usr/ports/java/linux-sun-jdk13.
 *** Error code 1
 
 Stop in /usr/ports/java/jdk13.
 
