Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Pre RFC on RFC: Add compiler information to exported a Package Manger's Cached Information.
Date: Wed, 25 Feb 2015 20:38:44
Message-Id: 54EE32D0.8060806@gentoo.org
In Reply to: Re: [gentoo-portage-dev] Pre RFC on RFC: Add compiler information to exported a Package Manger's Cached Information. by "Anthony G. Basile"
1 On 02/25/2015 12:01 PM, Anthony G. Basile wrote:
2 > On 02/25/15 14:51, Anthony G. Basile wrote:
3 >> On 02/22/15 01:30, Zac Medico wrote:
4 >>> On 02/21/2015 10:22 PM, Zac Medico wrote:
5 >>>> If we put the real/canonical libstdc++.so path in the DT_NEEDED
6 >>>> section,
7 >>>> then it will automatically work with existing soname dependency
8 >>>> support.
9 >>>
10 >>> Actually, we'd also have to add a way for you to put the full path of
11 >>> the libstdc++.so in PROVIDES. For example:
12 >>>
13 >>> PROVIDES_ABSOLUTE="/usr/lib/gcc/*/*/libstdc++.so.6"
14 >>>
15 >>
16 >> I guess I don't understand how this would work exactly. What if someone
17 >> has gcc-4.8.3. Builds library libfoo.so which uses c++. Then upgrades
18 >> to gcc-4.9, removes 4.8 and then tries to build bar which is also
19 >> written in c++ and links against libfoo.so. We would have mismatching
20 >> abis. How would this catch it and trigger the correct rebuilds?
21 >>
22 >> Unless I'm misunderstanding your *'s in that line. Are you using
23 >> PROVIDES_ABSOLUTE as a way of recording what version of the compiler
24 >> libfoo.so was build with? So that you'd have a line that says libfoo.so
25 >> links against /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/libstdc++.so, so
26 >> that parsing that line gives 4.8.3?
27 >>
28 >> Also if you had the absolute path in VDB somewhere, like in PROVIDES,
29 >> then you don't need it in the elf's rpath which would make me feel
30 >> better.
31 >>
32 >
33 > Actually no, you'd still need rpath for the elf itslef otherwise you can
34 > still link against the wrong version of libstdc++.so. Note in my
35 > following example that even though I build test.cpp with 4.7.3 I still
36 > wind up linking aginast 4.8.3.
37
38 If DT_NEEDED contains the absolute libstdc++.so path, it's guaranteed to
39 link against the correct version, regardless of rpath.
40 --
41 Thanks,
42 Zac

Replies

Subject Author
Re: [gentoo-portage-dev] Pre RFC on RFC: Add compiler information to exported a Package Manger's Cached Information. "Anthony G. Basile" <basile@××××××××××××××.edu>