Bug 53874 - [linux] /usr/ports/emulators/linux_base isn't working properly when SVR4 emulation is enabled
Summary: [linux] /usr/ports/emulators/linux_base isn't working properly when SVR4 emul...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 5.1-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-28 14:00 UTC by Vincent Poy
Modified: 2005-12-29 15:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Poy 2003-06-28 14:00:25 UTC
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
Comment 1 Vincent Poy 2003-06-29 08:41:50 UTC
	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
Comment 2 Sergey A. Osokin freebsd_committer freebsd_triage 2003-11-24 20:25:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-bugs

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>
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2003-11-29 22:33:34 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

Assign to proper responsible.
Comment 4 Trevor Johnson freebsd_committer freebsd_triage 2004-02-02 09:35:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->emulation

not a ports problem
Comment 5 Florent Thoumie freebsd_committer freebsd_triage 2005-04-14 18:11:08 UTC
	I've closed ports/51711 since it describes the same issue and 
	was in ports category.

-- 
Florent Thoumie
flz@FreeBSD.org
Comment 6 John Baldwin freebsd_committer freebsd_triage 2005-11-23 14:13:35 UTC
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
Comment 7 Alexander Leidinger freebsd_committer freebsd_triage 2005-12-29 15:33:44 UTC
State Changed
From-To: open->closed

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.