Gentoo Archives: gentoo-portage-dev

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

Replies