Package: fakeroot
Version: 1.18.4-2

Hi fakeroot developers,

If @LDPRELOADVAR@ is already set, scripts/fakeroot.in separates LIBS with a space. This works fine for LD_PRELOAD on GNU/Linux, but not for DYLD_INSERT_LIBRARIES on Mac OS X, which must be colon-separated. So if you already have a library in DYLD_INSERT_LIBRARIES, this breaks usage of fakeroot:

dyld: could not load inserted library: 
/Users/gthomas/src/debian/b/lib/libfakeroot.dylib /tmp/d.dylib

/Users/gthomas/src/debian/b/bin/fakeroot: line 181: 75294 Trace/BPT trap: 5 FAKEROOTKEY=$FAKEROOTKEY DYLD_INSERT_LIBRARIES="$LIB" "$@"

Fortunately, glibc permits separating LD_PRELOAD with either a space or a colon (see the comment near line 1658 or so in elf/rtld.c, and the changelog entry of 1998-02-01). So I propose that you make scripts/fakeroot.in line 168 use a colon, which will fix the bug on OS X and continue to work fine on GNU platforms. (Because glibc tokenizes at _both_ spaces and colons, there is no problem if the existing LD_PRELOAD variable includes multiple preloads separated by spaces.)

I don't know if fakeroot supports any platforms that require @LDPRELOADVAR@ to be space-separated and not colon-separated, which would make my suggested fix not work.

--
Geoffrey Thomas
http://ldpreload.com
geo...@ldpreload.com


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to