1 |
On 24/09/2015 20:12, Fernando Rodriguez wrote: |
2 |
> On Tuesday, August 25, 2015 7:58:44 PM Alan McKinnon wrote: |
3 |
>> On 25/08/2015 19:43, Fernando Rodriguez wrote: |
4 |
>>> On Tuesday, August 25, 2015 12:30:09 PM Alan McKinnon wrote: |
5 |
>>>> On 25/08/2015 04:28, Fernando Rodriguez wrote: |
6 |
>>>>> On Monday, August 24, 2015 9:31:38 PM Alan McKinnon wrote: |
7 |
>>>>>> Does anyone have an opinion to offer on bug 501468? |
8 |
>>>>>> |
9 |
>>>>>> https://bugs.gentoo.org/show_bug.cgi?id=501468 |
10 |
>>>>>> |
11 |
>>>>>> It's been annoying me for a week now with this message: |
12 |
>>>>>> |
13 |
>>>>>> !!! existing preserved libs: |
14 |
>>>>>>>>> package: www-client/firefox-40.0.2 |
15 |
>>>>>> * - /usr/lib64/firefox/libmozalloc.so |
16 |
>>>>>> * used by /usr/lib64/thunderbird/components/libdbusservice.so |
17 |
>>>>>> (mail-client/thunderbird-38.2.0) |
18 |
>>>>>> * used by /usr/lib64/thunderbird/components/libmozgnome.so |
19 |
>>>>>> (mail-client/thunderbird-38.2.0) |
20 |
>>>>>> * used by |
21 |
>>>>>> /usr/lib64/thunderbird/distribution/extensions/{e2fda1a4-762b-4020- |
22 |
> b5ad- |
23 |
>>>>> a41df1933103}/components/libcalbasecomps.so |
24 |
>>>>>> (mail-client/thunderbird-38.2.0) |
25 |
>>>>>> * used by 4 other files |
26 |
>>>>>> |
27 |
>>>>>> |
28 |
>>>>>> Both Mozilla products ship this file: |
29 |
>>>>>> |
30 |
>>>>>> $ locate libmozalloc |
31 |
>>>>>> /usr/lib64/firefox/libmozalloc.so |
32 |
>>>>>> /usr/lib64/thunderbird/libmozalloc.so |
33 |
>>>>>> |
34 |
>>>>>> and according to preserved libs, thunderbird linked to the firefox copy. |
35 |
>>>>>> The only offered solution on the bug is to use a MASK variable, which |
36 |
>>>>>> seems to me an ugly hammer to swat a fly. |
37 |
>>>>>> |
38 |
>>>>>> I was wondering if there's a better way been developed in the last |
39 |
> year. |
40 |
>>>>> |
41 |
>>>>> Actually, now I have a general idea of what's going on and that sounds |
42 |
>>> like an |
43 |
>>>>> acceptable solution but perhaps I could be better. This is what happens: |
44 |
>>>>> |
45 |
>>>>> 1. revdep-rebuild uses ldd to find breakage. It finds breakage in |
46 |
>>>>> libdbusservice.so because firefox uses tricks to preload the library from |
47 |
>>> it's |
48 |
>>>>> directory. |
49 |
>>>>> 2. revdep-rebuild find that thunderbird provides the library and thinks |
50 |
> it |
51 |
>>>>> needs to be rebuild. (And wrongly tells you that firefox links against |
52 |
> it). |
53 |
>>>>> |
54 |
>>>>> A better way would be: |
55 |
>>>>> |
56 |
>>>>> 1. same as step 1 above |
57 |
>>>>> 2. revdep-rebuild checks the package that provides the broken binary (in |
58 |
>>> this |
59 |
>>>>> case the firefox package), if this package also provides the missing |
60 |
>>> library |
61 |
>>>>> then it's safe to ignore the problem. |
62 |
>>>>> 3. same as step 2 above. |
63 |
>>>>> |
64 |
>>>>> Another solution is to make patch firefox to use RPATH so ldd can find the |
65 |
>>>>> labraries, this would also make prelink work better with firefox but it's |
66 |
>>>>> probably not ideal to mantain. |
67 |
>>>> |
68 |
>>>> |
69 |
>>>> that does make sense. In my case, it's not revdep-rebuild causing |
70 |
>>>> problems, it's the preserved-rebuild message at the end of emerge -v |
71 |
>>>> |
72 |
>>>> At this level is there a difference? |
73 |
>>> |
74 |
>>> I don't know the details but it seems to me that portage either uses |
75 |
> revdep- |
76 |
>>> rebuild to find breakage (without scanning the whole system) before |
77 |
> deleting |
78 |
>>> the old libs for good or duplicates some of it's logic. Come to think of |
79 |
> it, |
80 |
>>> the SEARCH_DIR_MASK may not be ideal because if I understand what it does |
81 |
>>> correctly then real breakage in firefox won't be detected. |
82 |
>>> |
83 |
>> |
84 |
>> My thought too. To me, SEARCH_DIR_MASK is fine for things like |
85 |
>> /opt/skype because it's binary and either works or it doesn't, and when |
86 |
>> it doesn't there's not much I can do about it. |
87 |
>> |
88 |
>> It may be the least sucky of all available solutions, but it's still |
89 |
>> swatting a fly with a hammer |
90 |
> |
91 |
> I may have found a better solution. I patched my ebuild [1], but you should |
92 |
> be able to just add the following to LDFLAGS in /etc/portage/env: |
93 |
> |
94 |
> Wl,-rpath,/usr/lib/firefox,-rpath,/usr/lib/firefox/components,- |
95 |
> rpath,/usr/lib/browser/components |
96 |
> |
97 |
> If you do the same for thunderbird (adjusting the library dirs) you should be |
98 |
> able to remove the SEARCH_DIR_MASK. I also patched the ebuild not to install |
99 |
> that file on /etc/revdep-rebuild. If you use prelink firefox will start a little |
100 |
> faster on a slow machine. |
101 |
> |
102 |
> You can tell if it worked by running: |
103 |
> |
104 |
> # ldd /usr/lib/firefox/components/libdbusservice.so | grep libxul |
105 |
> |
106 |
> It should output something like: |
107 |
> |
108 |
> libxul.so => /usr/lib64/firefox/libxul.so (0x00007fcc22eb8000) |
109 |
> |
110 |
> instead of: |
111 |
> |
112 |
> libxul.so => not found |
113 |
> |
114 |
> |
115 |
> [1] https://github.com/fernando-rodriguez/portage-overlay/blob/master/www-client/firefox/firefox-41.0.ebuild#L254 |
116 |
> |
117 |
|
118 |
|
119 |
Thanks, using env/ files worked a charm. @preserved-rebuild is no longer |
120 |
confused. |
121 |
|
122 |
For the record and the archives, I think you hand-typed the env strings |
123 |
and got the inevitable typos. Here's what the files must be for anyone |
124 |
else having the same problem. Contents on one line (mailer line wrapping |
125 |
...): |
126 |
|
127 |
# cat /etc/portage/env/mail-client/thunderbird-38.2.0 |
128 |
LDFLAGS="${LDFLAGS} |
129 |
-Wl,-rpath,/usr/lib/thunderbird,-rpath,/usr/lib/thunderbird/components" |
130 |
# cat /etc/portage/env/www-client/firefox-41.0 |
131 |
LDFLAGS="${LDFLAGS} |
132 |
-Wl,-rpath,/usr/lib/firefox,-rpath,/usr/lib/firefox/components,-rpath,/usr/lib/firefox/browser/components" |
133 |
|
134 |
|
135 |
-- |
136 |
Alan McKinnon |
137 |
alan.mckinnon@×××××.com |