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>

next in thread | previous in thread | raw e-mail | index | archive | help
--=_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 <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
--=_503019b313e64cf62341f24dc1e09e2c
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family: Verdana,Gen=
eva,sans-serif'>
<p id=3D"reply-intro">On 2023-04-10 01:47, Po-Chuan Hsieh wrote:</p>
<blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2=
px solid; margin: 0">
<div id=3D"replybody1">
<div dir=3D"ltr">
<div>Hi,</div>
<br />
<div class=3D"v1gmail_quote">
<div class=3D"v1gmail_attr" dir=3D"ltr">On Fri, Apr 7, 2023 at 5:36=E2=80=
=AFAM Dima Panov &lt;<a href=3D"mailto:fluffy@freebsd.org" rel=3D"noreferre=
r">fluffy@freebsd.org</a>&gt; wrote:</div>
<blockquote class=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid #cccccc; padding-left: 1ex;">Moin-moin!<br /><br />On 0=
6.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, Alexe=
y Dokuchaev wrote:<br />&gt;&gt;&gt; On Wed, Apr 05, 2023 at 02:20:21PM +02=
00, Guido Falsi wrote:<br />&gt;&gt;&gt;&gt; On 05/04/23 08:15, Daniel Engb=
erg wrote:<br />&gt;&gt;&gt;&gt;&gt; commit 72ad532057c9f9fb6fa370c80f663c0=
05e9dd021<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;&g=
t;&nbsp; &nbsp; &nbsp; &nbsp; - Use upstream's short test for "make test"<b=
r />&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; &n=
bsp; &nbsp; &nbsp; &nbsp;267652<br />&gt;&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbs=
p; &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; (abrid=
ged 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;&g=
t;&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; &nb=
sp; &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, th=
e 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 sun=
poet@ should revert it and merge only needed<br />&gt;&gt;&gt; parts thereo=
f properly.<br /><br />Nope.<br />This commit unmasked the real problem of =
using autocrap tools to build<br />zstd -- a broken static library.<br />Is=
sue 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=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-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 />An=
yway, number of consumers which require cmake'd zstd will grow in near futu=
re.<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=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid #cccccc; padding-left: 1ex;"><br />&gt;&gt;<br />&gt;&g=
t; 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=3D"https://bugs.freebsd.org/=
bugzilla/show_bug.cgi?id=3D270664" target=3D"_blank" rel=3D"noopener norefe=
rrer">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270664</a><br />&=
gt; <br />&gt; Ah, good to know it's being taken care of, thanks for sharin=
g!<br /><br />Nope. This patch not fixes anything but masking the real issu=
e 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=3D"https://t.me/FluffyBSD" target=3D"_blank" rel=3D"noopener norefe=
rrer">https://t.me/FluffyBSD</a>)<br />(desktop, kde, x11, office, ports-se=
cteam)@FreeBSD team</blockquote>
<blockquote class=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid #cccccc;">Hi,</blockquote>
<blockquote class=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid #cccccc;">According to upstream this is not a good idea=
,</blockquote>
<blockquote class=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid #cccccc;"><a href=3D"https://github.com/facebook/zstd/i=
ssues/2233#issuecomment-655600389">https://github.com/facebook/zstd/issues/=
2233#issuecomment-655600389</a></blockquote>
<blockquote class=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid #cccccc;">Best regards,</blockquote>
<blockquote class=3D"v1gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid #cccccc;">Daniel</blockquote>
</div>
</div>
</div>
</blockquote>
<p><br /></p>

</body></html>

--=_503019b313e64cf62341f24dc1e09e2c--



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