[Pkg-privacy-maintainers] Bug#902792: torsocks: does not support and fails catastrophically with muliarch

Hefee hefee at debian.org
Tue Mar 4 23:01:16 GMT 2025


Hey,

thax for your bug report. Actually it is a little while and the initial issue 
is still not been fixed :-(

Your patch will not work, as $LIB cannot tell what binary arch will be called 
and do not know anything from multiarch. At least I read the documentation 
like this.

But let's focus on the first step is to get torsocks multi-arch ready, so it 
can be installed as multi-arch: same.

That one is quite easy:
* the lib is already installed at the correct place *check* 
* all other files are arch independent *check*
* the only file we need to care about is /usr/bin/torsocks.
I use here the easy solution to move the binary to /usr/bin/$
{MULTI_ARCH_TRIPPLET}-torsocks

Okay now it is possible to install torsocks:amd64 and torsocks:i386 parallel.

@helmut:

But as a enduser I just want to use /usr/bin/torsocks, so I need a wrapper 
script. I would use the "easy" solution ans just use the main architecture 
(dpkg --print-architecture), but how to get the multi-arch-name for the main 
architecture? 
Or are you aware of any other solution to make use the correct torsocks script 
/LD_PRELOAD?

Regards,

hefee

On Sun, 1 Jul 2018 00:42:51 +0300 "Yuriy M. Kaminskiy" 
<yumkam+debian at gmail.com> wrote:
> Package: torsocks
> Version: 2.2.0-1+deb9u1
> Severity: important
> Tags: patch
> 
> Dear Maintainer,
> 
> On multi-arch systems, torsocks fails catastrophically with
> other-arch binaries.
> 
> E.g. with torsocks:i386 and wget:amd64,
> 
>     torsocks wget https://check.torproject.org
> 
> just spits
> 
> ERROR: ld.so: object '/usr/lib/i386-linux-gnu/torsocks/libtorsocks.so'
> from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32):
> ignored.
> 
> and happily continue connecting bypassing tor.
> 
>     * What outcome did you expect instead?
> 
> It should be possible to co-install torsocks:i386 and torsocks:amd64,
> and then it should work with both :amd64 and :i386 binaries.
> (I'd like to point out to glibc ld.so feature to replace '$LIB' in
> LD_PRELOAD and LD_LIBRARY_PATH with path to multi-arched /lib/ directory).
> Some (very rough) patch attached (warning: only checked on linux; I have 
> no idea if this will work on hurd or kfreebsd).
> 
> -- System Information:
> Debian Release: 9.4
>    APT prefers stable-updates
>    APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 
> 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'stable')
> Architecture: i386 (x86_64)
> Foreign Architectures: amd64
> 
> Kernel: Linux 4.9.0-6-amd64 (SMP w/2 CPU cores)
> Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R), 
> LANGUAGE=ru_RU.KOI8-R (charmap=KOI8-R)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> 
> Versions of packages torsocks depends on:
> ii  libc6  2.24-11+deb9u3
> 
> Versions of packages torsocks recommends:
> ii  tor  0.3.3.7-1~bpo9+1
> 
> torsocks suggests no packages.
> 
> -- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-maintainers/attachments/20250305/c3cb8aa0/attachment.sig>


More information about the Pkg-privacy-maintainers mailing list