Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95622 - gcc-config doesn't copy libgcc_s.so for multilib GCC installation
Summary: gcc-config doesn't copy libgcc_s.so for multilib GCC installation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: AMD64 Linux
: Highest blocker (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-09 17:38 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2005-12-30 03:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to make gcc-config discard all the multilib paths (gcc-config-multilib.patch,572 bytes, patch)
2005-06-09 17:39 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2005-06-09 17:38:18 UTC
Currently gcc-config has a big bug which prevents it from copy libgcc_s.so libraries from the compiler's libraries' directory into /lib, making a system with binaries compiled with mixed version of GCC fail.

The problem is that when it looks to copy the files, it uses the LDPATH variable found on /etc/env.d/gcc/ configuration file, which, on multilib systems, it's not a single path but a list of paths splitted by ':' chars (as usual for lists on unix vars).
The result is that the libgcc_s.so files aren't copied at all and they make the system break when it's built with mixed version of gcc.

The attached patch makes gcc-config discard every path but the first one, removing all the rest of the string after the first : char. After this is done, gcc-config can find libgcc_s.so files and copy them as needed.

Regards, Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-06-09 17:39:16 UTC
Created attachment 60960 [details, diff]
Patch to make gcc-config discard all the multilib paths
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2005-07-09 02:12:53 UTC
is this bug already fixed?
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-09 03:46:48 UTC
I dont know why it should copy it in the first place, as all versions of gcc's
LDPATH should be in /etc/ld.so.conf ...
Comment 4 SpanKY gentoo-dev 2005-07-09 17:54:09 UTC
it needs to copy it because some systems link binaries against libgcc_s.so.1
which are installed in /

this first came up on arm and happens sometimes on ia64/amd64 ...
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-11 02:38:21 UTC
Not an issue with --as-needed it seems :/
Comment 6 SpanKY gentoo-dev 2005-07-11 15:17:53 UTC
--as-needed def improves the situation but it isnt fool proof ... that's why we
should def make sure that libgcc_s.so.1 makes in into /
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-13 03:43:07 UTC
PITA either way, especially if you migth be using diff versions of gcc that
might have slight abi changes without a major version change on the library.
Comment 8 iryoku 2005-07-30 11:04:56 UTC
Please note that gcc-config should not copy libgcc_s.so.1 to /lib but symlink 
it, otherwise prelink will fail miserably, see this thread: 
http://forums.gentoo.org/viewtopic-t-292379-highlight-prelink+gccconfig.html 
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-30 11:10:14 UTC
Just symlinking it will break if binaries on /bin are linked against it. 
Comment 10 SpanKY gentoo-dev 2005-12-30 03:05:38 UTC
fixed in gcc-config-1.3.13, thanks for the patch