The package installs its libraries to $(get_libdir) but looks for them in /lib. This fails on a system where host libdir != 'lib' (e.g. the 'proper' multilib). $ tsocks mosh 127.0.0.1 ERROR: ld.so: object '/lib/libtsocks.so' from LD_PRELOAD cannot be preloaded: ignored. $ qlist tsocks | grep lib /lib64/libtsocks.so.1 /lib64/libtsocks.so /lib64/libtsocks.so.1.8
I suspect the right thing for tsocks to do is to omit the path completely from LD_PRELOAD. It's currently setting LD_PRELOAD=/lib/libtsocks.so. My ld.so(8) says the usual search rules are used for LD_PRELOAD, which means a name with a "/" in it is treated as a path, but one without is looked up in ld.so.cache and friends, and sure enough LD_PRELOAD=libtsocks.so.1 seems to load it. The advantage (I haven't tested this bit) is it has a chance to work on a multilib system: if you install a 32-bit and 64-bit libtsocks.so.1 in their respective libdirs LD_PRELOAD=libtsocks.so.1 *should* do the right thing whether the binary invoked is 32-bit or 64-bit.
(In reply to Marien Zwart from comment #1) > I suspect the right thing for tsocks to do is to omit the path completely > from LD_PRELOAD. correct > > It's currently setting LD_PRELOAD=/lib/libtsocks.so. My ld.so(8) says the > usual search rules are used for LD_PRELOAD, which means a name with a "/" in > it is treated as a path, but one without is looked up in ld.so.cache and > friends, and sure enough LD_PRELOAD=libtsocks.so.1 seems to load it. correct, I've tested this, it just works > > The advantage (I haven't tested this bit) is it has a chance to work on a > multilib system: if you install a 32-bit and 64-bit libtsocks.so.1 in their > respective libdirs LD_PRELOAD=libtsocks.so.1 *should* do the right thing > whether the binary invoked is 32-bit or 64-bit. haven't tested this, but probably you are right here.
Fixed in tsocks-1.8_beta5-r7 (at least works for me on both ~amd64 and ~x86).