Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 867985 - =net-misc/curl-7.85.0 fails to build with error: 'quiche_recv_info' has no member named 'to'
Summary: =net-misc/curl-7.85.0 fails to build with error: 'quiche_recv_info' has no me...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matt Jolly
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-09-02 08:07 UTC by Olivier Huber
Modified: 2023-02-16 05:08 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,179.49 KB, text/x-log)
2022-09-02 08:07 UTC, Olivier Huber
Details
revert upstream patch (curl-revert-unreleased-quiche.patch,1.84 KB, patch)
2022-09-03 10:21 UTC, Olivier Huber
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Huber 2022-09-02 08:07:54 UTC
Created attachment 802657 [details]
build.log

From build.log:
/dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c: In function 'Curl_quic_connect':
/dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c:316:58: warning: passing argument 7 of 'quiche_conn_new_with_tls' from incompatible pointer type [-Wincompatible-pointer-types]
  316 |                                       qs->local_addrlen, addr, addrlen,
      |                                                          ^~~~
      |                                                          |
      |                                                          const struct sockaddr *
In file included from /dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c:28:
/usr/include/quiche.h:269:54: note: expected 'quiche_config *' {aka 'struct Config *'} but argument is of type 'const struct sockaddr *'
  269 |                                       quiche_config *config, void *ssl,
      |                                       ~~~~~~~~~~~~~~~^~~~~~
/dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c:316:64: warning: passing argument 8 of 'quiche_conn_new_with_tls' makes pointer from integer without a cast [-Wint-conversion]
  316 |                                       qs->local_addrlen, addr, addrlen,
      |                                                                ^~~~~~~
      |                                                                |
      |                                                                socklen_t {aka unsigned int}
/usr/include/quiche.h:269:68: note: expected 'void *' but argument is of type 'socklen_t' {aka 'unsigned int'}
  269 |                                       quiche_config *config, void *ssl,
      |                                                              ~~~~~~^~~
/dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c:313:14: error: too many arguments to function 'quiche_conn_new_with_tls'
  313 |   qs->conn = quiche_conn_new_with_tls((const uint8_t *) qs->scid,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/quiche.h:266:14: note: declared here
  266 | quiche_conn *quiche_conn_new_with_tls(const uint8_t *scid, size_t scid_len,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~
/dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c: In function 'process_ingress':
/dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c:490:14: error: 'quiche_recv_info' has no member named 'to'
  490 |     recv_info.to = (struct sockaddr *) &qs->local_addr;
      |              ^
/dev/shm/portage/net-misc/curl-7.85.0/work/curl-7.85.0/lib/vquic/quiche.c:491:15: error: 'quiche_recv_info' has no member named 'to_len'; did you mean 'from_len'?
  491 |     recv_info.to_len = qs->local_addrlen;
      |               ^~~~~~
      |               from_len
make[2]: *** [Makefile:3067: vquic/libcurl_la-quiche.lo] Error 1


As of now, no obvious patches upstream on github.

emerge --info net-libs/quiche net-misc/curl
Portage 3.0.35 (python 3.10.6-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-12.2.0, glibc-2.35-r8, 5.19.4-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.19.4-gentoo-dist-x86_64-AMD_Ryzen_7_5700U_with_Radeon_Graphics-with-glibc2.35
KiB Mem:    32253380 total,  23563172 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 02 Sep 2022 07:30:01 +0000
Head commit of repository gentoo: de73ed6e1529b631ac54167b45288ac65dd76d3d
Timestamp of repository guru: Sat, 27 Aug 2022 06:46:53 +0000
Head commit of repository guru: 16ae850dc9e3dd223b188daa655effe1f1aba7da

Timestamp of repository steam-overlay: Wed, 24 Aug 2022 05:02:42 +0000
Head commit of repository steam-overlay: 8b05e59621ebcb56a84fd4cab93d546094a1f08c

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           2.7.18_p15-r1::gentoo, 3.9.13_p4::gentoo, 3.10.6_p2::gentoo
dev-lang/rust-bin:         1.62.1::gentoo
dev-util/cmake:            3.24.1::gentoo
dev-util/meson:            0.63.1::gentoo
sys-apps/baselayout:       2.8-r2::gentoo
sys-apps/openrc:           0.45.2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.6-r1::gentoo
sys-devel/gcc:             11.3.0::gentoo, 12.2.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.19::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

xhub-repo
    location: /var/db/repos/xhub-repo
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="https://ftp.fau.de/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/dev/shm"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities adns alsa amd64 audit avif bcrypt berkdb blake2 bluetooth bluray boost branding brightness-control brotli bzip2 cacert cairo caps cdda cdr chm cli colord cplugins crypt cscope cups curl dbus declarative dia djvu dri dts dvd dvdr ed25519 egl eglfs elf elogind encode eps epub eselect-ldso evdev exif ffmpeg fftw fits flac fontconfig fontforge fortran gcrypt gdbm gif gles gles2 gmp gold gpm graphviz gsl gtk gui heif highlight http2 iconv icu idn imagemagick ipv6 jack jpeg jpeg2k json kde kms kwallet ladspa lapack lapacke latex lcms libbsd libglvnd libnotify libsamplerate libtirpc lm-sensors lua lv2 lz4 lzma mad markdown metis mms mng mobi mp3 mp4 mpeg mtp multilib ncurses nls nptl octave ogg openexr opengl openmp pam pango pcre pdf perl pipewire plasma plugins pm-utils png policykit postscript ppds pthread pulseaudio python qml qt5 quiche raw readline rtmp sasl screencast sctp sdl seccomp semantic-desktop sparse speex spell split-usr sqlite ssh ssl startup-notification svg svt-av1 szip terminal theora threads thunderbolt tiff tools touchpad truetype udev udisks unicode upower usb utils v4l vaapi vdpau vim-syntax vorbis vulkan wayland webp widgets x264 xar xattr xcb xml xpm xv xvid xxhash yaml z3 zimg zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF X86 WebAssembly" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="lua5-1 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10 python3_9" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

net-libs/quiche-0.14.0::gentoo was built with the following:
USE="-debug" ABI_X86="(64) -32 (-x32)"
CFLAGS="-O2 -march=native -pipe -fPIC"
CXXFLAGS="-O2 -march=native -pipe -fPIC"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"


net-misc/curl-7.84.0::gentoo was built with the following:
USE="brotli ftp http2 idn imap ipv6 openssl pop3 progress-meter quiche rtmp smtp ssh ssl tftp threads zstd -adns -alt-svc -gnutls -gopher -hsts -kerberos -ldap -mbedtls (-nghttp3) -nss -samba -sslv3 -static-libs -telnet -test -verify-sig" ABI_X86="(64) -32 (-x32)" CURL_SSL="openssl -gnutls -mbedtls -nss"
FEATURES="userpriv unmerge-logs userfetch distlocks preserve-libs unmerge-orphans ipc-sandbox usersync binpkg-dostrip config-protect-if-modified unknown-features-warn sfperms news usersandbox buildpkg-live binpkg-docompress sandbox assume-digests xattr network-sandbox pid-sandbox protect-owned ebuild-locks multilib-strict parallel-fetch strict fixlafiles merge-sync qa-unresolved-soname-deps binpkg-multi-instance binpkg-logs"
Comment 1 Martin Rapavý 2022-09-03 07:03:29 UTC
It ought to be masked for now, as this version has adapted to changes in the master tree of an as-yet-unreleased version of quiche like this:
https://github.com/curl/curl/commit/2086b69b5787dffbdfdf29223322119885546bb5
and "fixed" it for themselves, while breaking it for everyone else who does not build it against the master tree of quiche.

Bad release engineering on their part.
Comment 2 Martin Rapavý 2022-09-03 07:06:11 UTC
Correction: ... and they have "fixed" it for themselves...
Comment 3 Olivier Huber 2022-09-03 10:21:22 UTC
Created attachment 803056 [details, diff]
revert upstream patch

Reverting the offending patch found by Martin let me cleanly compile curl.

However, testing with `curl --http3 https://quic.tech:8443` results in an interesting segfault in /usr/lib64/libquiche.so ...

On another machine that is ~amd64 up-to-date except curl, I can't compile =net-misc/curl-7.84.0 against =net-libs/quiche-0.14.0: the configure script barks because of quiche ...

can anyone test if the above command work with =net-misc/curl-7.84.0 ?
Comment 4 Martin Rapavý 2022-09-03 11:07:22 UTC
curl --version
curl 7.84.0 (x86_64-pc-linux-gnu) libcurl/7.84.0 (GnuTLS/3.7.7) (mbedTLS/2.28.1) (NSS/3.82) OpenSSL/1.1.1q zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 c-ares/1.18.1 libidn2/2.3.3 libssh2/1.10.0 nghttp2/1.48.0 quiche/0.14.0 librtmp/2.3 OpenLDAP/2.4.59
Release-Date: 2022-06-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

curl --http3 https://quic.tech:8443                                                                                                                                                                    
zsh: segmentation fault (core dumped)  curl --http3 https://quic.tech:8443
Comment 5 Anthony Basile gentoo-dev 2022-09-03 13:43:17 UTC
(In reply to Martin Rapavý from comment #1)
> It ought to be masked for now, as this version has adapted to changes in the
> master tree of an as-yet-unreleased version of quiche like this:

Isn't it sufficient to just mask USE=quiche?
Comment 6 Anthony Basile gentoo-dev 2022-09-03 13:47:11 UTC
(In reply to Anthony Basile from comment #5)
> (In reply to Martin Rapavý from comment #1)
> > It ought to be masked for now, as this version has adapted to changes in the
> > master tree of an as-yet-unreleased version of quiche like this:
> 
> Isn't it sufficient to just mask USE=quiche?

To be clear, I mean adding the following line to profiles/base/package.use.mask

>=net-misc/curl-7.85.0 quiche

Thus only masking the USE flag for >=net-misc/curl-7.85.0.
Comment 7 Martin Rapavý 2022-09-03 14:38:44 UTC
(In reply to Anthony Basile from comment #6)
> (In reply to Anthony Basile from comment #5)

In that case, this new version would be offered to users as an [U]pgrade, but without quiche, so a new version without quiche would replace a version with quiche, even for users who might overlook the change, but would otherwise prefer an older version with quiche.

I wonder if this is actually desirable. It would depend on whether the benefits of the new fixes outweighed the loss of functionality, or not.

From this point of view, the patch reversing their build failure would appear as the best of both worlds. (But, obviously, if anyone should then rely on >=curl-7.85 supporting the connection migration feature in quiche, it could be a problem. But I believe this to be quite unlikely.)
Comment 8 Olivier Huber 2022-09-03 14:46:30 UTC
(In reply to Martin Rapavý from comment #7)
> (In reply to Anthony Basile from comment #6)
> > (In reply to Anthony Basile from comment #5)
> 
> In that case, this new version would be offered to users as an [U]pgrade,
> but without quiche, so a new version without quiche would replace a version
> with quiche, even for users who might overlook the change, but would
> otherwise prefer an older version with quiche.
> 
> I wonder if this is actually desirable. It would depend on whether the
> benefits of the new fixes outweighed the loss of functionality, or not.
> 
> From this point of view, the patch reversing their build failure would
> appear as the best of both worlds. (But, obviously, if anyone should then
> rely on >=curl-7.85 supporting the connection migration feature in quiche,
> it could be a problem. But I believe this to be quite unlikely.)

The fact that curl --http3 https://quic.tech:8443, which uses quiche as far as I understand, also failed for you casts doubts whether curl[quiche] makes sense right now. I found this command as a way to test quiche in curl. Maybe someone can test the quiche/http3 support in curl and report whether and when it was working. Otherwise, masking it won't result in a loss of functionality.
Comment 9 Anthony Basile gentoo-dev 2022-09-03 21:22:18 UTC
(In reply to Olivier Huber from comment #8)

> when it was working. Otherwise, masking it won't result in a loss of
> functionality.

That's the point.  I don't know that it ever worked right.  There has never been a stable version of net-libs/quiche in the tree and no stabilization testing of curl has ever involved quiche.  So, going forward, I could leave the status quo, so that the issue would only be encountered on a ~arch system, or I could hard mask quiche on curl.  I lean towards the latter.

I'm cc-ing candrews who maintains quiche and may shed light.
Comment 10 Olivier Huber 2023-01-29 19:10:36 UTC
The compilation error is gone. However, curl --http3 https://quic.tech:8443 still results in a segfault in libquiche.so
Comment 11 Olivier Huber 2023-01-29 19:14:00 UTC
(In reply to Olivier Huber from comment #10)
> The compilation error is gone. However, curl --http3 https://quic.tech:8443
> still results in a segfault in libquiche.so

Sorry for the noise, the above holds for =net-misc/curl-7.87.0-r2 and =net-libs/quiche-0.16.0
Comment 12 Larry the Git Cow gentoo-dev 2023-02-16 05:08:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c6ec8d4579f9fbb2b3fbfb93de2abb7893cb42f

commit 1c6ec8d4579f9fbb2b3fbfb93de2abb7893cb42f
Author:     Matt Jolly <Matt.Jolly@footclan.ninja>
AuthorDate: 2023-02-09 23:37:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-16 05:08:27 +0000

    net-misc/curl: add 7.88.0
    
    drop ipv6 and quiche USE
    
    Using quiche requires building cURL with the same SSL flavour
    as the quiche library (i.e. BoringSSL). This is currently
    unsupported on Gentoo.
    
    Drop `ipv6` USE; it doesn't require additional deps and `--ipv4`
    can be used at runtime to force connectivity in dual-stack configurations.
    
    Closes: https://bugs.gentoo.org/881711
    Closes: https://bugs.gentoo.org/792234
    Closes: https://bugs.gentoo.org/847451
    Closes: https://bugs.gentoo.org/867985
    Closes: https://bugs.gentoo.org/835851
    
    Signed-off-by: Matt Jolly <Matt.Jolly@footclan.ninja>
    Closes: https://github.com/gentoo/gentoo/pull/29511
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/curl/Manifest                             |   2 +
 net-misc/curl/curl-7.88.0.ebuild                   | 298 +++++++++++++++++++++
 .../files/curl-7.88.0-test-gnuserv-tls-srp.patch   |  39 +++
 .../curl-7.88.0-test-uninitialised-value.patch     |  30 +++
 4 files changed, 369 insertions(+)