1 |
Dnia 29 września 2017 11:29:03 CEST, Michael Haubenwallner <haubi@g.o> napisał(a): |
2 |
>On 09/29/2017 10:33 AM, Marty E. Plummer wrote: |
3 |
>> On Fri, Sep 29, 2017 at 08:29:07AM +0000, Michael Haubenwallner |
4 |
>wrote: |
5 |
>>> On 09/29/2017 03:36 AM, Marty E. Plummer wrote: |
6 |
>>>> On Thu, Sep 28, 2017 at 07:35:20PM +0000, Mike Gilbert wrote: |
7 |
>>>>> On Wed, Sep 20, 2017 at 10:01 PM, Marty E. Plummer |
8 |
>>>>> <hanetzer@×××××××××.com> wrote: |
9 |
>>>>>> arfrever suggests I send a mail here, as there are other packages |
10 |
>which |
11 |
>>>>>> may be affected by this issue and perhaps a more generalized fix |
12 |
>is |
13 |
>>>>>> required instead of an explicit fix in sys-libs/ncurses and other |
14 |
>ebuilds |
15 |
>>>>>> that may require it. |
16 |
>>>>> |
17 |
>>>>> I think the solution here is to remove those overly broad "find |
18 |
>>>>> -delete" statements and replace them with something safer. |
19 |
>>>>> |
20 |
>>>>> Ideally the build system(s) would be patched to not compile static |
21 |
>>>>> libs in the first place. |
22 |
>>>>> |
23 |
>>>>> If that's not possible, perhaps an eclass function could be |
24 |
>created to |
25 |
>>>>> safely remove static libs. |
26 |
>>>>> |
27 |
>>>> Honestly I already have a pr up that fixes this particular |
28 |
>package's |
29 |
>>>> issue, fairly simple fix https://github.com/gentoo/gentoo/pull/5734 |
30 |
>>>> |
31 |
>>>> --- a/sys-libs/ncurses/ncurses-6.0-r1.ebuild |
32 |
>>>> +++ b/sys-libs/ncurses/ncurses-6.0-r1.ebuild |
33 |
>>>> @@ -241,7 +241,8 @@ multilib_src_install() { |
34 |
>>>> # Provide a link for -lcurses. |
35 |
>>>> ln -sf libncurses$(get_libname) |
36 |
>"${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die |
37 |
>>>> fi |
38 |
>>>> - use static-libs || find "${ED}"/usr/ -name '*.a' -delete |
39 |
>>>> + # don't delete '*.dll.a', needed for linking #631468 |
40 |
>>>> + use static-libs || find "${ED}"/usr/ -name '*.a' ! -name |
41 |
>'*.dll.a' -delete |
42 |
>>> |
43 |
>>> In prefix overlay we have this version: |
44 |
>>> |
45 |
>>> use static-libs || find "${ED}"/usr/ -name '*.a' -not -name |
46 |
>"*$(get_libname)" -delete |
47 |
>>> |
48 |
>> Won't work here, as $(get_libname) returns .dll in this case, which |
49 |
>is |
50 |
>> why the symlinking is busted |
51 |
> |
52 |
>Indeed! Although I do believe get_libname should return the |
53 |
>(dynamically) linkable file |
54 |
>name rather than the dynamically loadable one, because a build system's |
55 |
>target often is |
56 |
>the dynamically linkable file, creating the loadable as side effect. |
57 |
>Note that only COFF |
58 |
>based systems (AIX, Windows) may distinguish (dynamically) linkable and |
59 |
>loadable files. |
60 |
|
61 |
Why not add a separate function to avoid this ambiguity? |
62 |
|
63 |
> |
64 |
>Additionally (although unused in Prefix), AIX allows for one single |
65 |
>file libN.a containing |
66 |
>Shared Objects, which can be statically linked too! |
67 |
> |
68 |
>And for winnt I've yet to decide the value for $(get_libname) as the |
69 |
>Import Library: |
70 |
>Candidates are ".so", ".dll.a", ".dll.lib" - as I do support all of |
71 |
>them in the msvc |
72 |
>wrapper ("parity") to reduce the need of patching various build systems |
73 |
>for now... |
74 |
> |
75 |
>So probably the real safe one here is (in case get_libname may return |
76 |
>".a"): |
77 |
> |
78 |
>use static-libs || find "${ED}"/usr/ -name '*.a' -not -name '*.dll.a' |
79 |
>-not -name "*$(get_libname)" -delete |
80 |
> |
81 |
>OR: Really have some function prune_static_libs to remove library files |
82 |
>serving as |
83 |
>Static Library only - neither as Import Library nor Shared Library: |
84 |
>Implemented |
85 |
>for some platforms to ignore the file name but inspect the content |
86 |
>instead. |
87 |
> |
88 |
>Remember: This is (related but) different from prune_libtool_libs, |
89 |
>which suggests the find "${D}" -name '*.la' -delete alternative only. |
90 |
> |
91 |
>/haubi/ |
92 |
|
93 |
|
94 |
-- |
95 |
Best regards, |
96 |
Michał Górny (by phone) |