Bug#634821: libgcc1: filename change breaks old gcc
Package: libgcc1
Version: 4.6.0-12
Severity: important
Justification: breaks related software
X-Debbugs-Cc: Andrew Chittenden <andyc@bluearc.com>
Hi,
As Andy noticed[*], moving libgcc_s.so.1 from /lib to /lib/$arch
breaks versions of gcc from before that move.
$ echo 'int main(void) { return 0; }' | gcc-4.3 -x c -
/usr/bin/ld: error: cannot open /usr/lib/gcc/x86_64-linux-gnu/4.3.5/libgcc_s.so: No such file or directory
/usr/bin/ld: error: cannot open /usr/lib/gcc/x86_64-linux-gnu/4.3.5/libgcc_s.so: No such file or directory
collect2: ld returned 1 exit status
The cause: such gcc versions include a symlink with the path to
libgcc hardcoded.
$ readlink /usr/lib/gcc/x86_64-linux-gnu/4.3.5/libgcc_s.so
/lib/libgcc_s.so.1
(The same considerations apply to libgomp.so.1, though that might
be less noticeable.)
Questions:
1. Is there any GCC command-line option that people can use to work
around this kind of thing (e.g., to add a directory to the front of
the search order)?
2. Would it make sense to introduce a new package libgcc1-multiarch
and make libgcc1 into a compatibility package that ships a symlink
/lib/libgcc_s.so.1 -> /lib/$arch/libgcc_s.so.1
for the sake of smooth partial upgrades?
3. Any other thoughts?
Thanks and hope that helps,
Jonathan
[*] http://bugs.debian.org/629819
Reply to: