From nobody Mon Apr 10 08:02:41 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pw1fv4KvKz44wxs; Mon, 10 Apr 2023 08:02:47 +0000 (UTC) (envelope-from diizzy@FreeBSD.org) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pw1ft55DTz3LN4; Mon, 10 Apr 2023 08:02:46 +0000 (UTC) (envelope-from diizzy@FreeBSD.org) Authentication-Results: mx1.freebsd.org; none Received: (Authenticated sender: daniel.engberg@pyret.net) by mail.gandi.net (Postfix) with ESMTPA id 3E3BAC0003; Mon, 10 Apr 2023 08:02:41 +0000 (UTC) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Date: Mon, 10 Apr 2023 10:02:41 +0200 From: Daniel Engberg To: Po-Chuan Hsieh Cc: Dima Panov , Alexey Dokuchaev , Guido Falsi , ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 72ad532057c9 - main - archivers/zstd: Add CMake config files and adjust Makefile In-Reply-To: References: <202304050615.3356FKNq062154@gitrepo.freebsd.org> <7accd096-7871-29ad-0824-c035504d01b0@FreeBSD.org> Message-ID: X-Sender: diizzy@FreeBSD.org Content-Type: multipart/alternative; boundary="=_503019b313e64cf62341f24dc1e09e2c" X-Rspamd-Queue-Id: 4Pw1ft55DTz3LN4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --=_503019b313e64cf62341f24dc1e09e2c Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed On 2023-04-10 01:47, Po-Chuan Hsieh wrote: > Hi, > > On Fri, Apr 7, 2023 at 5:36 AM Dima Panov wrote: > >> Moin-moin! >> >> On 06.04.2023 16:32, Alexey Dokuchaev wrote: >>> On Thu, Apr 06, 2023 at 03:19:55PM +0200, Guido Falsi wrote: >>>> On 06/04/23 15:17, Alexey Dokuchaev wrote: >>>>> On Wed, Apr 05, 2023 at 02:20:21PM +0200, Guido Falsi wrote: >>>>>> On 05/04/23 08:15, Daniel Engberg wrote: >>>>>>> commit 72ad532057c9f9fb6fa370c80f663c005e9dd021 >>>>>>> >>>>>>> archivers/zstd: Add CMake config files and adjust Makefile >>>>>>> >>>>>>> - Use upstream's short test for "make test" >>>>>>> - Use verbose output by default during build >>>>>>> * Tweak Makefile to follow Porters Handbook more closely >>>>>>> * Install CMake files (taken from CMake build framework) >>>>>>> >>>>>>> PR: 267652 >>>>>>> Reported by: fluffy >>>>>>> Approved by: portmgr (maintainer timeout, 1+ month) >>>>>> >>>>>> Looks like this, un[luckily], causes a failure with devel/qt6-base >>>>>> (abridged error, full log if needed): >>>>>> >>>>>> ld: error: relocation R_X86_64_32 cannot be used against local >>>>>> symbol; >>>>>> recompile with -fPIC >>>>>>>>> defined in /usr/local/lib/libzstd.a(zstd_common.o) >>>>>>>>> referenced by zstd_common.c >>>>>>>>> zstd_common.o:(ZSTD_versionString) in archive >>>>> >>>>> Yeah, I'm seeing this as well. Admittedly, the whole commit looks >>>>> dubious to me, with all these out-of-blue new files and gratuitous >>>>> changes. I guess sunpoet@ should revert it and merge only needed >>>>> parts thereof properly. >> >> Nope. >> This commit unmasked the real problem of using autocrap tools to build >> zstd -- a broken static library. >> Issue was not raised before 'cause cmake configs was absent and qt6 >> (and may be other consumers) hooks up only shared lib. > > It should be fixed in ports 454e3c91ae9105a9af1939c9632424083ed3bbdb. > I've tested unmodified devel/qt6-base and it builds fine. > >> Just to be clear -- I have a version of port converted to pure cmake >> build and >> it produce a valid static library which correctly liked by any >> consumer. >> >> Anyway, number of consumers which require cmake'd zstd will grow in >> near future. >> openimageio/opencolorio/opnehadinglanguage are already require it to >> push >> new versions to the ports tree. > > Please let me know if more ports are broken. > >>>> >>>> I have only reported the issue as an early warning, as I said. >>>> >>>> Regarding qt6-base a fix has already been proposed here by diizzy: >>>> >>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270664 >>> >>> Ah, good to know it's being taken care of, thanks for sharing! >> >> Nope. This patch not fixes anything but masking the real issue with >> broken >> libzstd.a by prefer dynamic library over static to link. >> >> -- >> Sincerely, >> Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD) >> (desktop, kde, x11, office, ports-secteam)@FreeBSD team > >> Hi, > >> According to upstream this is not a good idea, > >> https://github.com/facebook/zstd/issues/2233#issuecomment-655600389 > >> Best regards, > >> Daniel --=_503019b313e64cf62341f24dc1e09e2c Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

On 2023-04-10 01:47, Po-Chuan Hsieh wrote:

Hi,

On Fri, Apr 7, 2023 at 5:36=E2=80= =AFAM Dima Panov <fluffy@freebsd.org> wrote:
Moin-moin!

On 0= 6.04.2023 16:32, Alexey Dokuchaev wrote:
> On Thu, Apr 06, 2023 at = 03:19:55PM +0200, Guido Falsi wrote:
>> On 06/04/23 15:17, Alexe= y Dokuchaev wrote:
>>> On Wed, Apr 05, 2023 at 02:20:21PM +02= 00, Guido Falsi wrote:
>>>> On 05/04/23 08:15, Daniel Engb= erg wrote:
>>>>> commit 72ad532057c9f9fb6fa370c80f663c0= 05e9dd021
>>>>>
>>>>>    =     archivers/zstd: Add CMake config files and adjust Makefile>>>>>       
>>>>&g= t;        - Use upstream's short test for "make test">>>>>        - Use verbose output by= default during build
>>>>>        = * Tweak Makefile to follow Porters Handbook more closely
>>>&= gt;>        * Install CMake files (taken from CMake = build framework)
>>>>>       
>>>>>        PR:      &n= bsp;      267652
>>>>>    &nbs= p;   Reported by:    fluffy
>>>>>  =       Approved by:    portmgr (maintainer timeout,= 1+ month)
>>>>
>>>> Looks like this, un[= luckily], causes a failure with devel/qt6-base
>>>> (abrid= ged error, full log if needed):
>>>>
>>>>= ld: error: relocation R_X86_64_32 cannot be used against local symbol;
>>>> recompile with -fPIC
>>>>    = >>> defined in /usr/local/lib/libzstd.a(zstd_common.o)
>&g= t;>>    >>> referenced by zstd_common.c
>&= gt;>>    >>>          &nb= sp;    zstd_common.o:(ZSTD_versionString) in archive
>>= ;>
>>> Yeah, I'm seeing this as well.  Admittedly, th= e whole commit looks
>>> dubious to me, with all these out-of= -blue new files and gratuitous
>>> changes.  I guess sun= poet@ should revert it and merge only needed
>>> parts thereo= f properly.

Nope.
This commit unmasked the real problem of = using autocrap tools to build
zstd -- a broken static library.
Is= sue was not raised before 'cause cmake configs was absent and qt6
(and= may be other consumers) hooks up only shared lib.
 
It should be fixed in ports 454e3c91ae9105a9af1939c9632424083ed3bbdb.<= /div>
I've tested unmodified devel/qt6-base and it builds fine.
 

Just to be clear -- = I have a version of port converted to pure cmake build and
it produce = a valid static library which correctly liked by any consumer.

An= yway, number of consumers which require cmake'd zstd will grow in near futu= re.
openimageio/opencolorio/opnehadinglanguage are already require it = to push
new versions to the ports tree.
 
Please let me know if more ports are broken.
 

>>
>&g= t; I have only reported the issue as an early warning, as I said.
>= >
>> Regarding qt6-base a fix has already been proposed here = by diizzy:
>>
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270664
&= gt;
> Ah, good to know it's being taken care of, thanks for sharin= g!

Nope. This patch not fixes anything but masking the real issu= e with broken
libzstd.a by prefer dynamic library over static to link.=



--
Sincerely,
Dima (fluffy@FreeBSD.org, = https://t.me/FluffyBSD)
(desktop, kde, x11, office, ports-se= cteam)@FreeBSD team
Hi,
According to upstream this is not a good idea= ,
https://github.com/facebook/zstd/issues/= 2233#issuecomment-655600389
Best regards,
Daniel


--=_503019b313e64cf62341f24dc1e09e2c--