From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E50481396D0 for ; Fri, 29 Sep 2017 10:51:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2AA652BC02F; Fri, 29 Sep 2017 10:51:45 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4346E0AF0 for ; Fri, 29 Sep 2017 10:51:44 +0000 (UTC) Received: from [10.105.223.145] (public-gprs394677.centertel.pl [37.47.172.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id F2C7934176D; Fri, 29 Sep 2017 10:51:41 +0000 (UTC) Date: Fri, 29 Sep 2017 12:51:36 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: <20170921020139.kp4664tanr7cj77d@proprietary-killer.fossland> <20170929013637.gz7ntmg4fb62mzel@proprietary-killer.fossland> <9ffbcbe2-fc70-aff9-4a9f-1bcaead3f035@gentoo.org> <20170929083346.hmhvulf5oul4daet@proprietary-killer.fossland> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [gentoo-dev] Re: sys-libs/ncurses: erronious deletion of *.dll.a files; possibly other packages affected To: gentoo-dev@lists.gentoo.org,Michael Haubenwallner CC: "Marty E. Plummer" From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= Message-ID: <9C01C163-1EC3-453C-A9CE-2C561E6BF71A@gentoo.org> X-Archives-Salt: 353cdb81-3c92-4ee6-b649-e9ccd06abdbd X-Archives-Hash: f204eb887e2d0cb867a62a7a1c006903 Dnia 29 wrze=C5=9Bnia 2017 11:29:03 CEST, Michael Haubenwallner napisa=C5=82(a): >On 09/29/2017 10:33 AM, Marty E=2E Plummer wrote: >> On Fri, Sep 29, 2017 at 08:29:07AM +0000, Michael Haubenwallner >wrote: >>> On 09/29/2017 03:36 AM, Marty E=2E 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=2E Plummer >>>>> 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=2E >>>>> >>>>> I think the solution here is to remove those overly broad "find >>>>> -delete" statements and replace them with something safer=2E >>>>> >>>>> Ideally the build system(s) would be patched to not compile static >>>>> libs in the first place=2E >>>>> >>>>> If that's not possible, perhaps an eclass function could be >created to >>>>> safely remove static libs=2E >>>>> >>>> Honestly I already have a pr up that fixes this particular >package's >>>> issue, fairly simple fix https://github=2Ecom/gentoo/gentoo/pull/5734 >>>> >>>> --- a/sys-libs/ncurses/ncurses-6=2E0-r1=2Eebuild >>>> +++ b/sys-libs/ncurses/ncurses-6=2E0-r1=2Eebuild >>>> @@ -241,7 +241,8 @@ multilib_src_install() { >>>> # Provide a link for -lcurses=2E >>>> ln -sf libncurses$(get_libname) >"${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die >>>> fi >>>> - use static-libs || find "${ED}"/usr/ -name '*=2Ea' -delete >>>> + # don't delete '*=2Edll=2Ea', needed for linking #631468 >>>> + use static-libs || find "${ED}"/usr/ -name '*=2Ea' ! -name >'*=2Edll=2Ea' -delete >>> >>> In prefix overlay we have this version: >>> >>> use static-libs || find "${ED}"/usr/ -name '*=2Ea' -not -name >"*$(get_libname)" -delete >>> >> Won't work here, as $(get_libname) returns =2Edll 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=2E >Note that only COFF >based systems (AIX, Windows) may distinguish (dynamically) linkable and >loadable files=2E Why not add a separate function to avoid this ambiguity? > >Additionally (although unused in Prefix), AIX allows for one single >file libN=2Ea 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 "=2Eso", "=2Edll=2Ea", "=2Edll=2Elib" - as I do support al= l of >them in the msvc >wrapper ("parity") to reduce the need of patching various build systems >for now=2E=2E=2E > >So probably the real safe one here is (in case get_libname may return >"=2Ea"): > >use static-libs || find "${ED}"/usr/ -name '*=2Ea' -not -name '*=2Edll=2E= 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=2E > >Remember: This is (related but) different from prune_libtool_libs, >which suggests the find "${D}" -name '*=2Ela' -delete alternative only=2E > >/haubi/ --=20 Best regards, Micha=C5=82 G=C3=B3rny (by phone)