From nobody@FreeBSD.org  Wed Jul  1 18:08:35 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 42B4B106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Jul 2009 18:08:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 168858FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Jul 2009 18:08:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n61I8YQD098255
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 1 Jul 2009 18:08:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n61I8Y8Z098248;
	Wed, 1 Jul 2009 18:08:34 GMT
	(envelope-from nobody)
Message-Id: <200907011808.n61I8Y8Z098248@www.freebsd.org>
Date: Wed, 1 Jul 2009 18:08:34 GMT
From: Alexander Best <alexbestms@math.uni-muenster.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [linux] linux_base* and /usr/compat/linux/usr/(local & X11R6)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         136229
>Category:       kern
>Synopsis:       [linux] emulators/linux_base-f10: certain linux apps look for libraries using a hardcoded path
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-emulation
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 01 18:10:02 UTC 2009
>Closed-Date:    Mon Aug 23 22:33:16 UTC 2010
>Last-Modified:  Mon Aug 23 22:33:16 UTC 2010
>Originator:     Alexander Best
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD moshnroll 8.0-CURRENT FreeBSD 8.0-CURRENT #5 r195173M: Mon Jun 29 22:11:48 CEST 2009     root@moshnroll:/usr/obj/usr/src/sys/ARUNDEL  i386
>Description:
a few linux apps look for certain libraries using a hardcoded path. here's
the output of `/usr/local/lib/quake4/quake4.x86` e.g.:

quake4.x86:
        libSDL-1.2.so.0 => /usr/local/lib/libSDL-1.2.so.0 (0x284dd000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x28584000)
        libdl.so.2 => /lib/libdl.so.2 (0x2859e000)
        libX11.so.6 => /usr/local/lib/libX11.so.6 (0x285a3000)
        libXext.so.6 => /usr/local/lib/libXext.so.6 (0x286a4000)
        libz.so.1 => /lib/libz.so.1 (0x286b4000)
        libstdc++.so.6 => /usr/local/lib/libstdc++.so.6 (0x286c9000)
        libm.so.6 => /lib/libm.so.6 (0x287b9000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x287e2000)
        libc.so.6 => /lib/libc.so.6 (0x287f0000)
        /lib/ld-linux.so.2 (0x284ba000)
        libxcb-xlib.so.0 => /usr/local/lib/libxcb-xlib.so.0 (0x28968000)
        libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x2896b000)
        libXau.so.6 => /usr/local/lib/libXau.so.6 (0x28987000)
        libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x2898a000)

so ports/games/linux-quake4 e.g. looks for them in "/usr/local/lib" others use "/usr/X11R6/lib". these dirs get translated into "/usr/compat/linux/${ACTUAL_DIR}".

but since all libs get installed into "/usr/compat/linux/usr/lib" those apps are unable to find the libs they need and thus fail.

how about changing all the linux_base* ports so they create symlinks to local and X11R6. this is how my /usr/compat/linux/usr dir looks like (`ls -la`):

total 1
drwxr-xr-x  12 root  wheel   512  1 Jul 19:50 .
drwxr-xr-x  17 root  wheel   512 28 Jun 14:57 ..
lrwxr-xr-x   1 root  wheel     6  1 Jul 19:50 X11R6 -> ../usr
drwxr-xr-x   2 root  wheel  3072 28 Jun 21:48 bin
drwxr-xr-x   2 root  wheel   512  7 Jun 11:04 etc
drwxr-xr-x   2 root  wheel   512  7 Jun 11:04 games
drwxr-xr-x   2 root  wheel   512  7 Jun 11:04 include
drwxr-xr-x   4 root  wheel   512  7 Jun 11:04 kerberos
drwxr-xr-x  17 root  wheel  7680  1 Jul 19:45 lib
drwxr-xr-x   3 root  wheel   512  7 Jun 11:05 libexec
lrwxr-xr-x   1 root  wheel     5 11 Jun 18:39 local -> X11R6
drwxr-xr-x   2 root  wheel   512 28 Jun 21:23 sbin
drwxr-xr-x  24 root  wheel   512 18 Jun 00:19 share
drwxr-xr-x   3 root  wheel   512  7 Jun 11:04 src
lrwxr-xr-x   1 root  wheel     8  7 Jun 11:05 tmp -> /var/tmp
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->emulation 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Jul 1 21:35:12 UTC 2009 
Responsible-Changed-Why:  
Over to a group of people who might have a good opinion about this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136229 
Responsible-Changed-From-To: emulation->freebsd-emulation 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jul 13 14:55:47 UTC 2009 
Responsible-Changed-Why:  
Canonicalize assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136229 
State-Changed-From-To: open->closed 
State-Changed-By: arundel 
State-Changed-When: Mon Aug 23 22:27:27 UTC 2010 
State-Changed-Why:  
Duplicate of 118230. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136229 
>Unformatted:
