Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885485 - net-libs/nghttp2-1.51.0: fails to compile with =sys-devel/autoconf-9999 (leading up to autoconf-2.72), caused by AX_PTHREAD patch (../config.h:429:15: error: two or more data types in declaration specifiers)
Summary: net-libs/nghttp2-1.51.0: fails to compile with =sys-devel/autoconf-9999 (lead...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 893434
  Show dependency tree
 
Reported: 2022-12-11 18:37 UTC by Sam James
Modified: 2024-02-09 06:16 UTC (History)
0 users

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


Attachments
build.log (file_885485.txt,58.12 KB, text/plain)
2022-12-11 18:37 UTC, Sam James
Details
config.log (file_885485.txt,188.20 KB, text/plain)
2022-12-11 18:39 UTC, Sam James
Details
pthread-as_if.patch (file_885485.txt,647 bytes, patch)
2023-02-07 03:49 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 18:37:15 UTC
Created attachment 841495 [details]
build.log

In file included from /usr/powerpc-unknown-linux-gnu/tmp/portage/net-libs/nghttp2-1.51.0/work/nghttp2-1.51.0/lib/nghttp2_map.h:30,
                 from /usr/powerpc-unknown-linux-gnu/tmp/portage/net-libs/nghttp2-1.51.0/work/nghttp2-1.51.0/lib/nghttp2_map.c:26:
../config.h:429:15: error: two or more data types in declaration specifiers
  429 | #define gid_t int
      |               ^~~
In file included from /usr/powerpc-unknown-linux-gnu/tmp/portage/net-libs/nghttp2-1.51.0/work/nghttp2-1.51.0/lib/nghttp2_pq.h:29,
                 from /usr/powerpc-unknown-linux-gnu/tmp/portage/net-libs/nghttp2-1.51.0/work/nghttp2-1.51.0/lib/nghttp2_pq.c:25:
../config.h:429:15: error: two or more data types in declaration specifiers
  429 | #define gid_t int
      |               ^~~
../config.h:466:15: error: two or more data types in declaration specifiers
  466 | #define uid_t int
      |               ^~~
../config.h:466:15: error: two or more data types in declaration specifiers
  466 | #define uid_t int
      |               ^~~
[...]

----

# powerpc-unknown-linux-gnu-emerge --info
Portage 3.0.41 (python 3.11.1-final-0, default/linux/ppc/17.0, gcc-12, unavailable, 5.15.82-gentoo-dist-hardened x86_64)
=================================================================
System uname: Linux-5.15.82-gentoo-dist-hardened-x86_64-AMD_Ryzen_9_3950X_16-Core_Processor-with-glibc2.36
KiB Mem:    65765020 total,  19557204 free
KiB Swap:    8290300 total,   7336956 free
Timestamp of repository gentoo: Sun, 11 Dec 2022 17:01:49 +0000
sh dash 0.5.11.5
ld GNU ld (Gentoo 2.39 p5) 2.39.0
ccache version 4.7.4 [disabled]
app-shells/bash:           5.2_p12::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/llvm:            15.0.6::gentoo
sys-kernel/linux-headers:  6.0::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r6::gentoo
Repositories:

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

ACCEPT_KEYWORDS="ppc ~ppc"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer"
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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo noman 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"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="reflex"
PKGDIR="/usr/powerpc-unknown-linux-gnu/var/cache/binpkgs/"
PORTAGE_CONFIGROOT="/usr/powerpc-unknown-linux-gnu/"
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="/usr/powerpc-unknown-linux-gnu/tmp/"
SHELL="/bin/bash"
USE="acl big-endian bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd ncurses nls nptl openmp pam pcre ppc readline seccomp split-usr ssl test-rust unicode xattr zlib" ADA_TARGET="gnat_2021" 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" 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" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev mga r128 radeon dummy v4l" 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"
YACC="byacc"
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, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 18:38:19 UTC
In /usr/powerpc-unknown-linux-gnu/tmp/portage/net-libs/nghttp2-1.51.0/work/nghttp2-1.51.0-.ppc/config.h:
>/* Define to 'int' if <sys/types.h> doesn't define. */
>#define uid_t int

.. and of course that shouldn't be defined.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 18:39:20 UTC
Created attachment 841497 [details]
config.log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 18:39:29 UTC
(In reply to Sam James from comment #2)
> Created attachment 841497 [details]
> config.log

configure:25469: checking for uid_t in sys/types.h
configure:25492: result: no

... but no details?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-11 18:49:37 UTC
ah, it's an autoconf issue: https://lists.gnu.org/archive/html/autoconf/2022-11/msg00127.html.

I'll close for now as it's unclear if autoconf or nghttp is to blame. It looks like probably autoconf. It's only in autoconf-9999 though (a release is coming soon).
Comment 5 Bernard Cafarelli gentoo-dev 2022-12-11 20:15:52 UTC
Ack, thanks sam, don't hesitate to reopen if it is nghttp2 to blame!
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-07 03:49:30 UTC
Created attachment 850026 [details, diff]
pthread-as_if.patch

Okay, so, based on the discussion on the mailing list (see links from before in this bug), it's an issue in the applications, not autoconf.

I also found this only happens if we apply our AX_PTHREAD patch. If I comment out the AX_PTHREAD line it adds in configure.ac, everything is fine.

I'm using the attached patch for now. Because of a related (but not the same) issue, the autoconf developers have also updated their docs to strongly encourage using AS_IF rather than shell-if wherever possible: https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=beb6d826338fb854b5c73458a1d52662b04c171c.
Comment 7 Bernard Cafarelli gentoo-dev 2023-03-03 22:32:42 UTC
Thanks in that case I will update our pthread patch - when libnghttp2_asio is dropped upstream it will be good time to clean that or switch to cmake
Comment 8 Larry the Git Cow gentoo-dev 2023-03-03 22:38:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a31eceb1d95b0a7e5c80736e56511aa59cc78c2

commit 7a31eceb1d95b0a7e5c80736e56511aa59cc78c2
Author:     Bernard Cafarelli <voyageur@gentoo.org>
AuthorDate: 2023-03-03 22:35:22 +0000
Commit:     Bernard Cafarelli <voyageur@gentoo.org>
CommitDate: 2023-03-03 22:38:34 +0000

    net-libs/nghttp2: fix automagic deps and cross-compile failure
    
    Closes: https://bugs.gentoo.org/885485
    Closes: https://bugs.gentoo.org/895496
    Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>

 net-libs/nghttp2/Manifest                 |  1 +
 net-libs/nghttp2/nghttp2-1.51.0-r1.ebuild | 79 +++++++++++++++++++++++++++++++
 net-libs/nghttp2/nghttp2-9999.ebuild      |  9 ++--
 3 files changed, 86 insertions(+), 3 deletions(-)
Comment 9 Larry the Git Cow gentoo-dev 2024-02-09 06:16:40 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=bff7bb77cc9d7f8219c95a8e6a35459fec2b458a

commit bff7bb77cc9d7f8219c95a8e6a35459fec2b458a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-09 06:13:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-09 06:13:53 +0000

    wrappers: mipsel-linux-gnu: fix ac_cv_type_uid_t cache value
    
    Reported by matoro when building coreutils for mipsel-unknown-linux-gnu. If
    autoconf-2.72 is used, apparently this shows up, and the coreutils-9.4 dist
    tarball was indeed built with it...
    
    The symptoms are similar to bug #885485 but it's a different cause -- we
    were exporting a dodgy cache value with a missing '$':
    
    ```
    configure:14771: checking for uid_t
    configure:14771: result: {ac_cv_type_uid_t=yes}
    ```
    
    ```
    ac_cv_type_uid_t='{ac_cv_type_uid_t=yes}'
    ```
    
    ```
    $ rg ac_cv_type_uid_t
    wrappers/site/mipsel-linux-gnu:115:ac_cv_type_uid_t={ac_cv_type_uid_t=yes}
    ```
    
    Bug: https://bugs.gentoo.org/885485
    Signed-off-by: Sam James <sam@gentoo.org>

 wrappers/site/mipsel-linux-gnu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)