Re: quiche dependency issue in FreeBSD

From: Junho Choi <junho.choi_at_gmail.com>
Date: Sun, 14 Jul 2024 12:49:23 UTC
Yann,

I filed a patch to update quiche to 0.22.0, with a correct .so installation.

With this port, I don't get "dnsdist is missing a required shared library:
libquiche.so" any more.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280274

It'd be great if any committer will pick it up!

Best,


On Thu, Jun 27, 2024 at 11:29 AM Junho Choi <junho.choi@gmail.com> wrote:

> quiche 0.22.0 with the soname fix released:
> https://github.com/cloudflare/quiche/releases/tag/0.22.0
>
> On Tue, Apr 30, 2024 at 9:23 PM Junho Choi <junho.choi@gmail.com> wrote:
>
>> I was looking into pkg source and found a relevant line:
>>
>>
>> https://github.com/freebsd/pkg/blob/b0a68a933f42aec97c8f37543bcac41149c28e2e/libpkg/pkg_elf.c#L402-L410
>>
>> It seems to look for soname in the shared libs to be added to "shlibs
>> provided" section, but currently
>> quiche has no soname in the .so file:
>> https://github.com/cloudflare/quiche/issues/598
>>
>> I made a PR to fix this:
>> https://github.com/cloudflare/quiche/pull/1769
>>
>> After that, I made a fix on the port and now it looks ok:
>>
>> Shared Libs provided:
>>     libquiche.so.0
>>
>> Let's see how it is merged. I'll update the quiche port when it's ready.
>>
>> On Tue, Apr 30, 2024 at 12:17 PM Junho Choi <junho.choi@gmail.com> wrote:
>> >
>> > (Cross posting to ports@)
>> >
>> > Yann - yes I can reproduce it but have no idea why.
>> >
>> > It seems quiche doesn't have a "Shared Lib provided" section like
>> > other libs. (see below)
>> >
>> > Other than USE_LDCONFIG, what affects it? Any advice from committers?
>> >
>> > % pkg info quiche
>> > quiche-0.20.1
>> > Name           : quiche
>> > Version        : 0.20.1
>> > Installed on   : Tue Apr 30 03:14:32 2024 UTC
>> > Origin         : net/quiche
>> > Architecture   : FreeBSD:14:amd64
>> > Prefix         : /usr/local
>> > Categories     : net
>> > Licenses       : BSD2CLAUSE
>> > Maintainer     : junho.choi@gmail.com
>> > WWW            : https://crates.io/crates/quiche
>> > Comment        : Savoury implementation of the QUIC transport protocol
>> > and HTTP/3
>> > Options        :
>> >     DOCS           : on
>> >     QLOG           : on
>> > Annotations    :
>> >     FreeBSD_version: 1400097
>> >     build_timestamp: 2024-04-04T20:02:03+0000
>> >     built_by       : poudriere-git-3.4.1-1-g1e9f97d6
>> >     port_checkout_unclean: no
>> >     port_git_hash  : 0e1153d3a5
>> >     ports_top_checkout_unclean: no
>> >     ports_top_git_hash: f5d16d08a6
>> >     repo_type      : binary
>> >     repository     : FreeBSD
>> > Flat size      : 48.2MiB
>> >
>> >
>> > Other example (libnghttp2 has "Shared Lib Provided" section)
>> >
>> > % pkg info libnghttp2
>> > libnghttp2-1.61.0
>> > Name           : libnghttp2
>> > Version        : 1.61.0
>> > Installed on   : Sun Apr 21 12:06:36 2024 UTC
>> > Origin         : www/libnghttp2
>> > Architecture   : FreeBSD:14:amd64
>> > Prefix         : /usr/local
>> > Categories     : www net
>> > Licenses       : MIT
>> > Maintainer     : sunpoet@FreeBSD.org
>> > WWW            : https://nghttp2.org/
>> > Comment        : HTTP/2.0 C Library
>> > Shared Libs provided:
>> >     libnghttp2.so.14
>> > Annotations    :
>> >     FreeBSD_version: 1400097
>> >     build_timestamp: 2024-04-11T01:12:38+0000
>> >     built_by       : poudriere-git-3.4.1-1-g1e9f97d6
>> >     cpe            : cpe:2.3:a:nghttp2:nghttp2:1.61.0:::::freebsd14:x64
>> >     port_checkout_unclean: no
>> >     port_git_hash  : 2b3fb39407
>> >     ports_top_checkout_unclean: no
>> >     ports_top_git_hash: 2910ff97e7
>> >     repo_type      : binary
>> >     repository     : FreeBSD
>> > Flat size      : 801KiB
>> >
>> > On Fri, Apr 26, 2024 at 11:32 AM Yann Kerhervé <yann.kerherve@gmail.com>
>> wrote:
>> > >
>> > > Hello,
>> > >
>> > > I have an issue with `pkg check` reporting a dependency missing:
>> > >
>> > > root@dev:~ # pkg check -d -a
>> > > Checking all packages: 100%
>> > > dnsdist is missing a required shared library: libquiche.so
>> > >
>> > > (in FreeBSD 13.3 and 14.0)
>> > >
>> > > This is bogus:
>> > > root@dev:~ # ldd /usr/local/sbin/dnsdist | grep quiche
>> > > libquiche.so => /usr/local/lib/libquiche.so (0x3af8e91e0000)
>> > >
>> > > It seems like the package build missed that dependency and doesn't
>> report as a shared lib provided by quiche?
>> > >
>> > > # pkg info -b quiche
>> > > quiche-0.20.1:
>> > >
>> > > Should there be a shared lib provided there:
>> > >
>> > > quiche-0.20.1:
>> > >         libquiche.so
>> > >
>> > > I thought that the USE_LDCONFIG= yes in the Makefile was taking care
>> of that automatically. And this is correctly set in the Makefile...
>> > >
>> > > Thanks!
>> > >
>> > > Yann
>> > >
>> > >
>> > >
>> >
>> >
>> > --
>> > Junho Choi <junho dot choi at gmail.com> | https://saturnsoft.net
>>
>>
>>
>> --
>> Junho Choi <junho dot choi at gmail.com> | https://saturnsoft.net
>>
>
>
> --
> Junho Choi <junho dot choi at gmail.com> | https://saturnsoft.net
>


-- 
Junho Choi <junho dot choi at gmail.com> | https://saturnsoft.net