Thanks Stephen! On 11.1.2021 23.48, Stephen Kitt wrote:
I agree it would be better to patch the script. However you don’t have to make the package multiarch-compliant; you can install your library in a package-private directory, the same on all architectures, and leave it at that. That said, given that i386 libstrangle would be useful on amd64, alongside amd64 libstrangle, it might be better to look into the Rpath token expansions which are supported by ld.so in LD_PRELOAD, e.g. $PLATFORM — although it doesn’t fully match the multiarch requirements. (See man ld.so for details.)
I ended up putting the libraries in /usr/lib/libstrangle/<triplet> and pointing to them in the script with LD_LIBRARY_PATH.
Regards, Linus Vanas