Bug 136229 - [linux] emulators/linux_base-f10: certain linux apps look for libraries using a hardcoded path
Summary: [linux] emulators/linux_base-f10: certain linux apps look for libraries using...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-01 19:10 UTC by Alexander Best
Modified: 2010-08-23 23:33 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 Alexander Best 2009-07-01 19:10:02 UTC
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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-07-01 22:35:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->emulation

Over to a group of people who might have a good opinion about this.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2009-07-13 15:55:47 UTC
Responsible Changed
From-To: emulation->freebsd-emulation

Canonicalize assignment.
Comment 3 Alexander Best freebsd_committer freebsd_triage 2010-08-23 23:27:27 UTC
State Changed
From-To: open->closed

Duplicate of 118230.