Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2023 10:02:41 +0200
From:      Daniel Engberg <diizzy@FreeBSD.org>
To:        Po-Chuan Hsieh <sunpoet@sunpoet.net>
Cc:        Dima Panov <fluffy@freebsd.org>, Alexey Dokuchaev <danfe@freebsd.org>, Guido Falsi <madpilot@freebsd.org>, 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
Message-ID:  <cb6cecf2275bf88e42058904532a2d03@FreeBSD.org>
In-Reply-To: <CAMHz58SPsX5ZffMa8hkvgV36%2B-T1Dq%2BV80Yd5yymMz=sPRvnUQ@mail.gmail.com>
References:  <202304050615.3356FKNq062154@gitrepo.freebsd.org> <7accd096-7871-29ad-0824-c035504d01b0@FreeBSD.org> <ZC7GUhyVa%2Bjbpe1S@FreeBSD.org> <e77963c0-fdd0-5fc5-049d-aa7853ef5c51@FreeBSD.org> <ZC7KBj7lKm8VRtmn@FreeBSD.org> <b468b6e6-cbbe-86cf-9eed-8c945717c798@FreeBSD.org> <CAMHz58SPsX5ZffMa8hkvgV36%2B-T1Dq%2BV80Yd5yymMz=sPRvnUQ@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]


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

> Hi,
> 
> On Fri, Apr 7, 2023 at 5:36 AM Dima Panov <fluffy@freebsd.org> 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
[-- Attachment #2 --]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p id="reply-intro">On 2023-04-10 01:47, Po-Chuan Hsieh wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div dir="ltr">
<div>Hi,</div>
<br />
<div class="v1gmail_quote">
<div class="v1gmail_attr" dir="ltr">On Fri, Apr 7, 2023 at 5:36 AM Dima Panov &lt;<a href="mailto:fluffy@freebsd.org" rel="noreferrer">fluffy@freebsd.org</a>&gt; wrote:</div>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">Moin-moin!<br /><br />On 06.04.2023 16:32, Alexey Dokuchaev wrote:<br />&gt; On Thu, Apr 06, 2023 at 03:19:55PM +0200, Guido Falsi wrote:<br />&gt;&gt; On 06/04/23 15:17, Alexey Dokuchaev wrote:<br />&gt;&gt;&gt; On Wed, Apr 05, 2023 at 02:20:21PM +0200, Guido Falsi wrote:<br />&gt;&gt;&gt;&gt; On 05/04/23 08:15, Daniel Engberg wrote:<br />&gt;&gt;&gt;&gt;&gt; commit 72ad532057c9f9fb6fa370c80f663c005e9dd021<br />&gt;&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; archivers/zstd: Add CMake config files and adjust Makefile<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; - Use upstream's short test for "make test"<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; - Use verbose output by default during build<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; * Tweak Makefile to follow Porters Handbook more closely<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; * Install CMake files (taken from CMake build framework)<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; PR:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;267652<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; Reported by:&nbsp; &nbsp; fluffy<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; Approved by:&nbsp; &nbsp; portmgr (maintainer timeout, 1+ month)<br />&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt; Looks like this, un[luckily], causes a failure with devel/qt6-base<br />&gt;&gt;&gt;&gt; (abridged error, full log if needed):<br />&gt;&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt; ld: error: relocation R_X86_64_32 cannot be used against local symbol;<br />&gt;&gt;&gt;&gt; recompile with -fPIC<br />&gt;&gt;&gt;&gt;&nbsp; &nbsp; &gt;&gt;&gt; defined in /usr/local/lib/libzstd.a(zstd_common.o)<br />&gt;&gt;&gt;&gt;&nbsp; &nbsp; &gt;&gt;&gt; referenced by zstd_common.c<br />&gt;&gt;&gt;&gt;&nbsp; &nbsp; &gt;&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zstd_common.o:(ZSTD_versionString) in archive<br />&gt;&gt;&gt;<br />&gt;&gt;&gt; Yeah, I'm seeing this as well.&nbsp; Admittedly, the whole commit looks<br />&gt;&gt;&gt; dubious to me, with all these out-of-blue new files and gratuitous<br />&gt;&gt;&gt; changes.&nbsp; I guess sunpoet@ should revert it and merge only needed<br />&gt;&gt;&gt; parts thereof properly.<br /><br />Nope.<br />This commit unmasked the real problem of using autocrap tools to build<br />zstd -- a broken static library.<br />Issue was not raised before 'cause cmake configs was absent and qt6<br />(and may be other consumers) hooks up only shared lib.</blockquote>
<div>&nbsp;</div>
<div>It should be fixed in ports 454e3c91ae9105a9af1939c9632424083ed3bbdb.</div>
<div>I've tested unmodified devel/qt6-base and it builds fine.</div>
<div>&nbsp;</div>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><br />Just to be clear -- I have a version of port converted to pure cmake build and<br />it produce a valid static library which correctly liked by any consumer.<br /><br />Anyway, number of consumers which require cmake'd zstd will grow in near future.<br />openimageio/opencolorio/opnehadinglanguage are already require it to push<br />new versions to the ports tree.</blockquote>
<div>&nbsp;</div>
<div>Please let me know if more ports are broken.</div>
<div>&nbsp;</div>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><br />&gt;&gt;<br />&gt;&gt; I have only reported the issue as an early warning, as I said.<br />&gt;&gt;<br />&gt;&gt; Regarding qt6-base a fix has already been proposed here by diizzy:<br />&gt;&gt;<br />&gt;&gt; <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270664" target="_blank" rel="noopener noreferrer">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270664</a><br />&gt; <br />&gt; Ah, good to know it's being taken care of, thanks for sharing!<br /><br />Nope. This patch not fixes anything but masking the real issue with broken<br />libzstd.a by prefer dynamic library over static to link.<br /><br /><br /><br />-- <br />Sincerely,<br />Dima (fluffy@FreeBSD.org, <a href="https://t.me/FluffyBSD" target="_blank" rel="noopener noreferrer">https://t.me/FluffyBSD</a>)<br />(desktop, kde, x11, office, ports-secteam)@FreeBSD team</blockquote>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc;">Hi,</blockquote>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc;">According to upstream this is not a good idea,</blockquote>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc;"><a href="https://github.com/facebook/zstd/issues/2233#issuecomment-655600389">https://github.com/facebook/zstd/issues/2233#issuecomment-655600389</a></blockquote>;
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc;">Best regards,</blockquote>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc;">Daniel</blockquote>
</div>
</div>
</div>
</blockquote>
<p><br /></p>

</body></html>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cb6cecf2275bf88e42058904532a2d03>