Ubuntu Multiarch
March 16, 2012 —
BarryK
I have started to update Woof to build from Ubuntu Precise Pangolin binary packages, and have run into an awkward problem.
Libraries that were previously in /lib and /usr/lib, are now in /lib/i386-linux-gnu and /usr/lib/i386-linux-gnu.
Or, in the case of x86 64-bit libs, /lib/x86_64-linux-gnu and /usr/lib/x86_64-linux-gnu.
The rationale behind this is explained here:
https://wiki.ubuntu.com/MultiarchSpec
This change is not even a standard. It causes a lot of problems in Woof.
I would rather everything stayed in standard locations, so I am hacking it so that the libraries get placed in /lib and /usr/lib, with these symlinks:
# ln -s ./ /lib/i386-linux-gnu
# ln -s ./ /usr/lib/i386-linux-gnu
...that is, /lib/i386-linux-gnu is a link to /lib, and /usr/lib/i386-linux-gnu is a link to /usr/lib.
I think that the symlinks will fix some cases where Ubuntu packages expect stuff to be in /lib/i386-linux-gnu and /usr/lib/i386-linux-gnu.
I am still working on some details of this.
Comments
easy fixUsername: technosaurus
[code]cd /usr/lib ln -s . i386-linux-gnu[/code] I have been doing this with X11R7 for a while and Rob Landley does it in aboriginal for /etc /lib /bin and /sbin as well as the /usr/local counterparts ... Not only does his method simplify things, but it also speeds up execution by shortening $PATH and $LD_LIBRARY_PATH (see strace output) An alternative could be to keep them in place and symlink them individually, thus allowing you to do a switcheroo. If only autotools would allow you to change the builtin soname via an env variable at build time, all this would be moot.
Same thing, just looks different
Username: BarryK
"technosaurus, What I have done, "ln -s ./ /usr/lib/i386-linux-gnu" is the same thing. Or, I could have done "ln -s . /usr/lib/i386-linux-gnu", same thing, or I could have done "cd /usr/lib" first then done "ln -s . i386-linux-gnu".
Tags: woof