* [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected @ 2017-09-21 2:01 Marty E. Plummer 2017-09-28 14:23 ` Thomas Deutschmann 2017-09-28 19:35 ` Mike Gilbert 0 siblings, 2 replies; 11+ messages in thread From: Marty E. Plummer @ 2017-09-21 2:01 UTC (permalink / raw To: gentoo-dev Greetings, So, I filed bug #631468 regarding sys-libs/ncurses's ebuild deleting *.dll.a files unconditionally if USE=static-libs is not set; this is a problem as mingw-w64 uses these files at link time (-lncurses needs libncurses.dll.a to link and libncurses6.dll at runtime). arfrever suggests I send a mail here, as there are other packages which may be affected by this issue and perhaps a more generalized fix is required instead of an explicit fix in sys-libs/ncurses and other ebuilds that may require it. Thoughts? Regards, Marty ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-21 2:01 [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected Marty E. Plummer @ 2017-09-28 14:23 ` Thomas Deutschmann 2017-09-28 14:43 ` Ian Stakenvicius 2017-09-28 15:08 ` Mike Gilbert 2017-09-28 19:35 ` Mike Gilbert 1 sibling, 2 replies; 11+ messages in thread From: Thomas Deutschmann @ 2017-09-28 14:23 UTC (permalink / raw To: gentoo-dev [-- Attachment #1.1: Type: text/plain, Size: 292 bytes --] Hi, sounds like we should convert to prune_libtool_files usage from ltprune.eclass. However, the eclass says > # Discouraged. Whenever possible, please use much simpler: > # find "${D}" -name '*.la' -delete || die So this would need clarification. -- Regards, Thomas [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 981 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-28 14:23 ` Thomas Deutschmann @ 2017-09-28 14:43 ` Ian Stakenvicius 2017-09-28 15:43 ` Mike Gilbert 2017-09-28 15:08 ` Mike Gilbert 1 sibling, 1 reply; 11+ messages in thread From: Ian Stakenvicius @ 2017-09-28 14:43 UTC (permalink / raw To: gentoo-dev [-- Attachment #1.1: Type: text/plain, Size: 540 bytes --] On 28/09/17 10:23 AM, Thomas Deutschmann wrote: > Hi, > > sounds like we should convert to prune_libtool_files usage from > ltprune.eclass. > > However, the eclass says > >> # Discouraged. Whenever possible, please use much simpler: >> # find "${D}" -name '*.la' -delete || die > > So this would need clarification. > > *.la shouldn't be matching *.dll.a , this seems like a globbing error if that find command is what's being used. Maybe we've just been erroneously not escaping the '.' in the find command?? [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 248 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-28 14:43 ` Ian Stakenvicius @ 2017-09-28 15:43 ` Mike Gilbert 0 siblings, 0 replies; 11+ messages in thread From: Mike Gilbert @ 2017-09-28 15:43 UTC (permalink / raw To: Gentoo Dev On Thu, Sep 28, 2017 at 10:43 AM, Ian Stakenvicius <axs@gentoo.org> wrote: > On 28/09/17 10:23 AM, Thomas Deutschmann wrote: >> Hi, >> >> sounds like we should convert to prune_libtool_files usage from >> ltprune.eclass. >> >> However, the eclass says >> >>> # Discouraged. Whenever possible, please use much simpler: >>> # find "${D}" -name '*.la' -delete || die >> >> So this would need clarification. >> >> > > *.la shouldn't be matching *.dll.a , this seems like a globbing error > if that find command is what's being used. Maybe we've just been > erroneously not escaping the '.' in the find command?? *.la doesn't match *.dll.a. The ncurses ebuild has this dubious line of code: use static-libs || find "${ED}"/usr/ -name '*.a' -delete ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-28 14:23 ` Thomas Deutschmann 2017-09-28 14:43 ` Ian Stakenvicius @ 2017-09-28 15:08 ` Mike Gilbert 1 sibling, 0 replies; 11+ messages in thread From: Mike Gilbert @ 2017-09-28 15:08 UTC (permalink / raw To: Gentoo Dev On Thu, Sep 28, 2017 at 10:23 AM, Thomas Deutschmann <whissi@gentoo.org> wrote: > Hi, > > sounds like we should convert to prune_libtool_files usage from > ltprune.eclass. > > However, the eclass says > >> # Discouraged. Whenever possible, please use much simpler: >> # find "${D}" -name '*.la' -delete || die > > So this would need clarification. That was my initial reaction as well, until I re-read the email. This is about removing static libraries (*.a), not libtool archives (*.la). ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-21 2:01 [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected Marty E. Plummer 2017-09-28 14:23 ` Thomas Deutschmann @ 2017-09-28 19:35 ` Mike Gilbert 2017-09-29 1:36 ` Marty E. Plummer 1 sibling, 1 reply; 11+ messages in thread From: Mike Gilbert @ 2017-09-28 19:35 UTC (permalink / raw To: Gentoo Dev On Wed, Sep 20, 2017 at 10:01 PM, Marty E. Plummer <hanetzer@startmail.com> wrote: > arfrever suggests I send a mail here, as there are other packages which > may be affected by this issue and perhaps a more generalized fix is > required instead of an explicit fix in sys-libs/ncurses and other ebuilds > that may require it. I think the solution here is to remove those overly broad "find -delete" statements and replace them with something safer. Ideally the build system(s) would be patched to not compile static libs in the first place. If that's not possible, perhaps an eclass function could be created to safely remove static libs. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-28 19:35 ` Mike Gilbert @ 2017-09-29 1:36 ` Marty E. Plummer 2017-09-29 8:29 ` [gentoo-dev] " Michael Haubenwallner 0 siblings, 1 reply; 11+ messages in thread From: Marty E. Plummer @ 2017-09-29 1:36 UTC (permalink / raw To: gentoo-dev On Thu, Sep 28, 2017 at 07:35:20PM +0000, Mike Gilbert wrote: > On Wed, Sep 20, 2017 at 10:01 PM, Marty E. Plummer > <hanetzer@startmail.com> wrote: > > arfrever suggests I send a mail here, as there are other packages which > > may be affected by this issue and perhaps a more generalized fix is > > required instead of an explicit fix in sys-libs/ncurses and other ebuilds > > that may require it. > > I think the solution here is to remove those overly broad "find > -delete" statements and replace them with something safer. > > Ideally the build system(s) would be patched to not compile static > libs in the first place. > > If that's not possible, perhaps an eclass function could be created to > safely remove static libs. > Honestly I already have a pr up that fixes this particular package's issue, fairly simple fix https://github.com/gentoo/gentoo/pull/5734 --- a/sys-libs/ncurses/ncurses-6.0-r1.ebuild +++ b/sys-libs/ncurses/ncurses-6.0-r1.ebuild @@ -241,7 +241,8 @@ multilib_src_install() { # Provide a link for -lcurses. ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die fi - use static-libs || find "${ED}"/usr/ -name '*.a' -delete + # don't delete '*.dll.a', needed for linking #631468 + use static-libs || find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete # Build fails to create this ... dosym ../share/terminfo /usr/$(get_libdir)/terminfo and done as far as that goes. Only other issue is the bad symlinking in the original bug report. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-dev] Re: sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-29 1:36 ` Marty E. Plummer @ 2017-09-29 8:29 ` Michael Haubenwallner 2017-09-29 8:33 ` Marty E. Plummer 0 siblings, 1 reply; 11+ messages in thread From: Michael Haubenwallner @ 2017-09-29 8:29 UTC (permalink / raw To: gentoo-dev; +Cc: Marty E. Plummer On 09/29/2017 03:36 AM, Marty E. Plummer wrote: > On Thu, Sep 28, 2017 at 07:35:20PM +0000, Mike Gilbert wrote: >> On Wed, Sep 20, 2017 at 10:01 PM, Marty E. Plummer >> <hanetzer@startmail.com> wrote: >>> arfrever suggests I send a mail here, as there are other packages which >>> may be affected by this issue and perhaps a more generalized fix is >>> required instead of an explicit fix in sys-libs/ncurses and other ebuilds >>> that may require it. >> >> I think the solution here is to remove those overly broad "find >> -delete" statements and replace them with something safer. >> >> Ideally the build system(s) would be patched to not compile static >> libs in the first place. >> >> If that's not possible, perhaps an eclass function could be created to >> safely remove static libs. >> > Honestly I already have a pr up that fixes this particular package's > issue, fairly simple fix https://github.com/gentoo/gentoo/pull/5734 > > --- a/sys-libs/ncurses/ncurses-6.0-r1.ebuild > +++ b/sys-libs/ncurses/ncurses-6.0-r1.ebuild > @@ -241,7 +241,8 @@ multilib_src_install() { > # Provide a link for -lcurses. > ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die > fi > - use static-libs || find "${ED}"/usr/ -name '*.a' -delete > + # don't delete '*.dll.a', needed for linking #631468 > + use static-libs || find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete In prefix overlay we have this version: use static-libs || find "${ED}"/usr/ -name '*.a' -not -name "*$(get_libname)" -delete /haubi/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-dev] Re: sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-29 8:29 ` [gentoo-dev] " Michael Haubenwallner @ 2017-09-29 8:33 ` Marty E. Plummer 2017-09-29 9:29 ` Michael Haubenwallner 0 siblings, 1 reply; 11+ messages in thread From: Marty E. Plummer @ 2017-09-29 8:33 UTC (permalink / raw To: Michael Haubenwallner; +Cc: gentoo-dev On Fri, Sep 29, 2017 at 08:29:07AM +0000, Michael Haubenwallner wrote: > On 09/29/2017 03:36 AM, Marty E. Plummer wrote: > > On Thu, Sep 28, 2017 at 07:35:20PM +0000, Mike Gilbert wrote: > >> On Wed, Sep 20, 2017 at 10:01 PM, Marty E. Plummer > >> <hanetzer@startmail.com> wrote: > >>> arfrever suggests I send a mail here, as there are other packages which > >>> may be affected by this issue and perhaps a more generalized fix is > >>> required instead of an explicit fix in sys-libs/ncurses and other ebuilds > >>> that may require it. > >> > >> I think the solution here is to remove those overly broad "find > >> -delete" statements and replace them with something safer. > >> > >> Ideally the build system(s) would be patched to not compile static > >> libs in the first place. > >> > >> If that's not possible, perhaps an eclass function could be created to > >> safely remove static libs. > >> > > Honestly I already have a pr up that fixes this particular package's > > issue, fairly simple fix https://github.com/gentoo/gentoo/pull/5734 > > > > --- a/sys-libs/ncurses/ncurses-6.0-r1.ebuild > > +++ b/sys-libs/ncurses/ncurses-6.0-r1.ebuild > > @@ -241,7 +241,8 @@ multilib_src_install() { > > # Provide a link for -lcurses. > > ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die > > fi > > - use static-libs || find "${ED}"/usr/ -name '*.a' -delete > > + # don't delete '*.dll.a', needed for linking #631468 > > + use static-libs || find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete > > In prefix overlay we have this version: > > use static-libs || find "${ED}"/usr/ -name '*.a' -not -name "*$(get_libname)" -delete > > /haubi/ Won't work here, as $(get_libname) returns .dll in this case, which is why the symlinking is busted ^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-dev] Re: sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-29 8:33 ` Marty E. Plummer @ 2017-09-29 9:29 ` Michael Haubenwallner 2017-09-29 10:51 ` Michał Górny 0 siblings, 1 reply; 11+ messages in thread From: Michael Haubenwallner @ 2017-09-29 9:29 UTC (permalink / raw To: gentoo-dev; +Cc: Marty E. Plummer On 09/29/2017 10:33 AM, Marty E. Plummer wrote: > On Fri, Sep 29, 2017 at 08:29:07AM +0000, Michael Haubenwallner wrote: >> On 09/29/2017 03:36 AM, Marty E. Plummer wrote: >>> On Thu, Sep 28, 2017 at 07:35:20PM +0000, Mike Gilbert wrote: >>>> On Wed, Sep 20, 2017 at 10:01 PM, Marty E. Plummer >>>> <hanetzer@startmail.com> wrote: >>>>> arfrever suggests I send a mail here, as there are other packages which >>>>> may be affected by this issue and perhaps a more generalized fix is >>>>> required instead of an explicit fix in sys-libs/ncurses and other ebuilds >>>>> that may require it. >>>> >>>> I think the solution here is to remove those overly broad "find >>>> -delete" statements and replace them with something safer. >>>> >>>> Ideally the build system(s) would be patched to not compile static >>>> libs in the first place. >>>> >>>> If that's not possible, perhaps an eclass function could be created to >>>> safely remove static libs. >>>> >>> Honestly I already have a pr up that fixes this particular package's >>> issue, fairly simple fix https://github.com/gentoo/gentoo/pull/5734 >>> >>> --- a/sys-libs/ncurses/ncurses-6.0-r1.ebuild >>> +++ b/sys-libs/ncurses/ncurses-6.0-r1.ebuild >>> @@ -241,7 +241,8 @@ multilib_src_install() { >>> # Provide a link for -lcurses. >>> ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die >>> fi >>> - use static-libs || find "${ED}"/usr/ -name '*.a' -delete >>> + # don't delete '*.dll.a', needed for linking #631468 >>> + use static-libs || find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete >> >> In prefix overlay we have this version: >> >> use static-libs || find "${ED}"/usr/ -name '*.a' -not -name "*$(get_libname)" -delete >> > Won't work here, as $(get_libname) returns .dll in this case, which is > why the symlinking is busted Indeed! Although I do believe get_libname should return the (dynamically) linkable file name rather than the dynamically loadable one, because a build system's target often is the dynamically linkable file, creating the loadable as side effect. Note that only COFF based systems (AIX, Windows) may distinguish (dynamically) linkable and loadable files. Additionally (although unused in Prefix), AIX allows for one single file libN.a containing Shared Objects, which can be statically linked too! And for winnt I've yet to decide the value for $(get_libname) as the Import Library: Candidates are ".so", ".dll.a", ".dll.lib" - as I do support all of them in the msvc wrapper ("parity") to reduce the need of patching various build systems for now... So probably the real safe one here is (in case get_libname may return ".a"): use static-libs || find "${ED}"/usr/ -name '*.a' -not -name '*.dll.a' -not -name "*$(get_libname)" -delete OR: Really have some function prune_static_libs to remove library files serving as Static Library only - neither as Import Library nor Shared Library: Implemented for some platforms to ignore the file name but inspect the content instead. Remember: This is (related but) different from prune_libtool_libs, which suggests the find "${D}" -name '*.la' -delete alternative only. /haubi/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] Re: sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected 2017-09-29 9:29 ` Michael Haubenwallner @ 2017-09-29 10:51 ` Michał Górny 0 siblings, 0 replies; 11+ messages in thread From: Michał Górny @ 2017-09-29 10:51 UTC (permalink / raw To: gentoo-dev, Michael Haubenwallner; +Cc: Marty E. Plummer Dnia 29 września 2017 11:29:03 CEST, Michael Haubenwallner <haubi@gentoo.org> napisał(a): >On 09/29/2017 10:33 AM, Marty E. Plummer wrote: >> On Fri, Sep 29, 2017 at 08:29:07AM +0000, Michael Haubenwallner >wrote: >>> On 09/29/2017 03:36 AM, Marty E. Plummer wrote: >>>> On Thu, Sep 28, 2017 at 07:35:20PM +0000, Mike Gilbert wrote: >>>>> On Wed, Sep 20, 2017 at 10:01 PM, Marty E. Plummer >>>>> <hanetzer@startmail.com> wrote: >>>>>> arfrever suggests I send a mail here, as there are other packages >which >>>>>> may be affected by this issue and perhaps a more generalized fix >is >>>>>> required instead of an explicit fix in sys-libs/ncurses and other >ebuilds >>>>>> that may require it. >>>>> >>>>> I think the solution here is to remove those overly broad "find >>>>> -delete" statements and replace them with something safer. >>>>> >>>>> Ideally the build system(s) would be patched to not compile static >>>>> libs in the first place. >>>>> >>>>> If that's not possible, perhaps an eclass function could be >created to >>>>> safely remove static libs. >>>>> >>>> Honestly I already have a pr up that fixes this particular >package's >>>> issue, fairly simple fix https://github.com/gentoo/gentoo/pull/5734 >>>> >>>> --- a/sys-libs/ncurses/ncurses-6.0-r1.ebuild >>>> +++ b/sys-libs/ncurses/ncurses-6.0-r1.ebuild >>>> @@ -241,7 +241,8 @@ multilib_src_install() { >>>> # Provide a link for -lcurses. >>>> ln -sf libncurses$(get_libname) >"${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die >>>> fi >>>> - use static-libs || find "${ED}"/usr/ -name '*.a' -delete >>>> + # don't delete '*.dll.a', needed for linking #631468 >>>> + use static-libs || find "${ED}"/usr/ -name '*.a' ! -name >'*.dll.a' -delete >>> >>> In prefix overlay we have this version: >>> >>> use static-libs || find "${ED}"/usr/ -name '*.a' -not -name >"*$(get_libname)" -delete >>> >> Won't work here, as $(get_libname) returns .dll in this case, which >is >> why the symlinking is busted > >Indeed! Although I do believe get_libname should return the >(dynamically) linkable file >name rather than the dynamically loadable one, because a build system's >target often is >the dynamically linkable file, creating the loadable as side effect. >Note that only COFF >based systems (AIX, Windows) may distinguish (dynamically) linkable and >loadable files. Why not add a separate function to avoid this ambiguity? > >Additionally (although unused in Prefix), AIX allows for one single >file libN.a containing >Shared Objects, which can be statically linked too! > >And for winnt I've yet to decide the value for $(get_libname) as the >Import Library: >Candidates are ".so", ".dll.a", ".dll.lib" - as I do support all of >them in the msvc >wrapper ("parity") to reduce the need of patching various build systems >for now... > >So probably the real safe one here is (in case get_libname may return >".a"): > >use static-libs || find "${ED}"/usr/ -name '*.a' -not -name '*.dll.a' >-not -name "*$(get_libname)" -delete > >OR: Really have some function prune_static_libs to remove library files >serving as >Static Library only - neither as Import Library nor Shared Library: >Implemented >for some platforms to ignore the file name but inspect the content >instead. > >Remember: This is (related but) different from prune_libtool_libs, >which suggests the find "${D}" -name '*.la' -delete alternative only. > >/haubi/ -- Best regards, Michał Górny (by phone) ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-09-29 10:51 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-09-21 2:01 [gentoo-dev] sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected Marty E. Plummer 2017-09-28 14:23 ` Thomas Deutschmann 2017-09-28 14:43 ` Ian Stakenvicius 2017-09-28 15:43 ` Mike Gilbert 2017-09-28 15:08 ` Mike Gilbert 2017-09-28 19:35 ` Mike Gilbert 2017-09-29 1:36 ` Marty E. Plummer 2017-09-29 8:29 ` [gentoo-dev] " Michael Haubenwallner 2017-09-29 8:33 ` Marty E. Plummer 2017-09-29 9:29 ` Michael Haubenwallner 2017-09-29 10:51 ` Michał Górny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox