Bundle private ld-linux.so.2

probono probono at puredarwin.org
Sun Nov 26 03:35:41 CST 2017


Dear all,

I am trying to bundle a 32-bit Windows executable with WINE in a
standalone directory (like a macOS bundle) that should be able to run
on any 64-bit Linux distribution without needing the user to install
anything special on the host system.

While this appears to work well for 64-bit Windows executable with
64-bit WINE, it appears that in order to run 32-bit Windows
applications, 32-bit Windows must be used, which in turn requires
32-bit ld-linux.so.2 and glibc. But most 64-bit systems these days
don't have the 32-bit compatibility libraries installed anymore.

With other programs it is usually possible to manually load the 32-bit
ELF file with a private, bundled version of ld-linux.so.2 like so:

wget -c http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-i386_2.24-9ubuntu2.2_amd64.deb
dpkg -x ./libc6*.deb .

HERE="$(dirname "$(readlink -f "${0}")")"

WINEPREFIX="$HERE/wineprefix/" \
"$HERE/lib32/ld-linux.so.2" --library-path "$HERE/lib32"
"$HERE/wine-stable/bin/wine" \
"$WINEPREFIX/drive_c/Program Files/App/App.exe" "$@"

However, with WINE, this does not work. My guess is that WINE launches
other WINE instances through other mechanisms in the background, which
in turn don't get loaded using the specified
"$HERE/lib32/ld-linux.so.2" and --library-path "$HERE/lib32"

1.) Can you confirm?
2.) Is there any way to tell WINE to use a private, bundled
ld-linux.so.2 (and related glibc and other libraries) instead of
looking for it in the host system?

Reference:
http://www.wildmediaserver.com/download.php (not developed by me)
offers Linux versions which are basically Windows versions that bundle
a minimal WINE subset
but here the application is a 64-bit Windows executable whereas I am
interested in 32-bit.

Thanks,
probono



More information about the wine-devel mailing list