Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943753 - app-crypt/mhash-0.9.9.9-r3 - error: conflicting types for 'mhash_keygen_uses_hash_algorithm'; have '_Bool(keygenid)' {aka '_Bool(enum __keygenid)'} (gcc15) (c23-porting)
Summary: app-crypt/mhash-0.9.9.9-r3 - error: conflicting types for 'mhash_keygen_uses_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 944053 (view as bug list)
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-18 11:30 UTC by immolo
Modified: 2024-12-01 22:14 UTC (History)
2 users (show)

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


Attachments
build.log (mhash.build.log,29.78 KB, text/x-log)
2024-11-18 11:30 UTC, immolo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description immolo 2024-11-18 11:30:02 UTC
Created attachment 908967 [details]
build.log

GCC15 Snapshot 15.0.0_pre20241117

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/mutils -I../include -O2 -march=native -pipe -flto -c keygen.c  -fPIC -DPIC -o .libs/keygen.o
keygen.c:29:16: error: conflicting types for 'mhash_keygen_uses_hash_algorithm'; have '_Bool(keygenid)' {aka '_Bool(enum __keygenid)'}
   29 | mutils_boolean mhash_keygen_uses_hash_algorithm(keygenid type)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from keygen.c:25:
./mhash_int.h:50:16: note: previous declaration of 'mhash_keygen_uses_hash_algorithm' with type '_Bool(void)'
   50 | mutils_boolean mhash_keygen_uses_hash_algorithm();
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
keygen.c:37:16: error: conflicting types for 'mhash_keygen_uses_count'; have '_Bool(keygenid)' {aka '_Bool(enum __keygenid)'}
   37 | mutils_boolean mhash_keygen_uses_count(keygenid type)
      |                ^~~~~~~~~~~~~~~~~~~~~~~
./mhash_int.h:49:16: note: previous declaration of 'mhash_keygen_uses_count' with type '_Bool(void)'
   49 | mutils_boolean mhash_keygen_uses_count();
      |                ^~~~~~~~~~~~~~~~~~~~~~~
keygen.c:45:16: error: conflicting types for 'mhash_keygen_uses_salt'; have '_Bool(keygenid)' {aka '_Bool(enum __keygenid)'}
   45 | mutils_boolean mhash_keygen_uses_salt(keygenid type)
      |                ^~~~~~~~~~~~~~~~~~~~~~
./mhash_int.h:48:16: note: previous declaration of 'mhash_keygen_uses_salt' with type '_Bool(void)'
   48 | mutils_boolean mhash_keygen_uses_salt();
      |                ^~~~~~~~~~~~~~~~~~~~~~
keygen.c:67:15: error: conflicting types for 'mhash_get_keygen_salt_size'; have 'uint32_t(keygenid)' {aka 'unsigned int(enum __keygenid)'}
   67 | mutils_word32 mhash_get_keygen_salt_size(keygenid type)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
./mhash_int.h:46:15: note: previous declaration of 'mhash_get_keygen_salt_size' with type 'uint32_t(void)' {aka 'unsigned int(void)'}
   46 | mutils_word32 mhash_get_keygen_salt_size();
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
keygen.c:87:15: error: conflicting types for 'mhash_get_keygen_name'; have 'uint8_t *(hashid)' {aka 'unsigned char *(enum __hashid)'}
   87 | mutils_word8 *mhash_get_keygen_name(hashid type)
      |               ^~~~~~~~~~~~~~~~~~~~~
./mhash_int.h:45:15: note: previous declaration of 'mhash_get_keygen_name' with type 'uint8_t *(void)' {aka 'unsigned char *(void)'}
   45 | mutils_word8 *mhash_get_keygen_name();
      |               ^~~~~~~~~~~~~~~~~~~~~
keygen.c:118:14: error: conflicting types for 'mhash_keygen'; have 'uint32_t(keygenid,  hashid,  uint64_t,  void *, uint32_t,  void *, uint32_t,  uint8_t *, uint32_t)' {aka 'unsigned int(enum __keygenid,  enum __hashid,  long unsigned int,  void *, unsigned int,  void *, unsigned int,  unsigned char *, unsigned int)'}
  118 | mutils_error mhash_keygen(keygenid algorithm, hashid opt_algorithm,
      |              ^~~~~~~~~~~~
./mhash_int.h:43:14: note: previous declaration of 'mhash_keygen' with type 'uint32_t(void)' {aka 'unsigned int(void)'}
   43 | mutils_error mhash_keygen();
      |              ^~~~~~~~~~~~
keygen.c:171:14: error: conflicting types for 'mhash_keygen_ext'; have 'uint32_t(keygenid,  KEYGEN,  void *, uint32_t,  uint8_t *, uint32_t)' {aka 'unsigned int(enum __keygenid,  struct __KEYGEN,  void *, unsigned int,  unsigned char *, unsigned int)'}
  171 | mutils_error mhash_keygen_ext(keygenid algorithm, KEYGEN data,
      |              ^~~~~~~~~~~~~~~~
./mhash_int.h:44:14: note: previous declaration of 'mhash_keygen_ext' with type 'uint32_t(void)' {aka 'unsigned int(void)'}
   44 | mutils_error mhash_keygen_ext();
      |              ^~~~~~~~~~~~~~~~
make[1]: *** [Makefile:508: keygen.lo] Error 1

# emerge --info

Portage 3.0.66.1 (python 3.13.0-final-0, default/linux/amd64/23.0/desktop, gcc-15, glibc-9999, 6.11.5-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.11.5-gentoo-dist-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.39.9000
KiB Mem:    65744184 total,  29871732 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 18 Nov 2024 02:18:33 +0000
Head commit of repository gentoo: a98edd7e14736ea3f88ef1f5459080da417f9961

Head commit of repository cosmic-overlay: 202dd98f93ca5281fbf128a8fd16c24b6b44e970

Timestamp of repository edgets: Sun, 17 Nov 2024 05:33:36 +0000
Head commit of repository edgets: d740bb7b9949991e8c321b1f8406655ae8ab142e

Timestamp of repository guru: Sun, 17 Nov 2024 13:33:23 +0000
Head commit of repository guru: 0b4deaa6c737fcf006a3e175c439cd28247d9c3b

Timestamp of repository parona-overlay: Sun, 17 Nov 2024 06:18:41 +0000
Head commit of repository parona-overlay: 4ff5e5a355f215650807725a178448a3552d5a78

Timestamp of repository sft: Sun, 17 Nov 2024 05:33:30 +0000
Head commit of repository sft: c1069259d91f13421af756033c9dac91ff0c0833

Timestamp of repository steam-overlay: Sun, 17 Nov 2024 05:33:32 +0000
Head commit of repository steam-overlay: 443e064b607a92dbad15243732698edc0b411b43

Timestamp of repository wayland-desktop: Sun, 17 Nov 2024 05:33:37 +0000
Head commit of repository wayland-desktop: de46a80a5b8e00e5426f3a0930a7b7137f72eb33

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo, 1.17-r1::gentoo
dev-build/cmake:           3.31.0::gentoo
dev-build/libtool:         2.5.3::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           9999::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.10_p1::gentoo, 3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust-bin:         1.81.0-r100::gentoo, 1.82.0-r100::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.40::gentoo
sys-devel/binutils:        2.42-r1::gentoo, 2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           17.0.6::gentoo, 18.1.8-r6::gentoo
sys-devel/gcc:             12.3.1_p20240502::gentoo, 13.3.1_p20241025::gentoo, 14.1.1_p20240518::gentoo, 15.0.0_pre20241117::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo, 18.1.5::gentoo
sys-devel/llvm:            17.0.6::gentoo, 18.1.8-r6::gentoo, 19.1.3::gentoo
sys-kernel/linux-headers:  6.11::gentoo (virtual/os-headers)
sys-libs/glibc:            9999::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

cosmic-overlay
    location: /var/db/repos/cosmic-overlay
    sync-type: git
    sync-uri: https://github.com/fsvm88/cosmic-overlay.git
    masters: gentoo
    volatile: False

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

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

local
    location: /var/db/repos/local
    masters: gentoo
    volatile: False

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

py3_13
    location: /var/db/repos/py3_13
    masters: gentoo
    volatile: False

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

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

wayland-desktop
    location: /var/db/repos/wayland-desktop
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
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"
CXXFLAGS="-O2 -march=native -pipe -flto"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 -march=native -pipe -flto"
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 merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted 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 -march=native -pipe -flto"
GENTOO_MIRRORS="https://mirror.bytemark.co.uk/gentoo/     https://mirrors.gethosted.online/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
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="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt dbus dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp opus pam pango pcre pdf pgo pipewire png policykit ppds pulseaudio qml readline sdl seccomp sound spell ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland webp wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_12 python3_13" QEMU_SOFTMMU_TARGETS="aarch64 i386 x86_64 ppc m68k sh4 sh4eb hppa alpha" QEMU_USER_TARGETS="m68k sh4 sh4eb aarch64 hppa riscv64 riscv32 alpha ppc64le" RUBY_TARGETS="ruby32" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, 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, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Larry the Git Cow gentoo-dev 2024-11-19 03:52:55 UTC
The bug has been closed via the following commit(s):

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

commit d2facc542948cfb79193220e7beb9d1c9837df8a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-19 03:48:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-19 03:52:22 +0000

    sys-devel/gcc: backport C23 fix to 15.0.0_pre20241117
    
    Backport a -std=gnu23/-std=c23 fix to 15.0.0_pre20241117 which prevented
    coersion from _Bool to NULL. Note that this is still dodgy code and some
    are proposing this be banned in a future C version (maybe even C2y), but
    it shouldn't be rejected in this version at least.
    
    I've added Closes tags for all bugs which, at a glance, look related,
    but I haven't re-tested them all and one or two might need reopening.
    
    Bug: https://gcc.gnu.org/PR112556
    Closes: https://bugs.gentoo.org/943862
    Closes: https://bugs.gentoo.org/943861
    Closes: https://bugs.gentoo.org/943843
    Closes: https://bugs.gentoo.org/943811
    Closes: https://bugs.gentoo.org/943809
    Closes: https://bugs.gentoo.org/943753
    Closes: https://bugs.gentoo.org/943715
    Closes: https://bugs.gentoo.org/943704
    Closes: https://bugs.gentoo.org/942958
    Signed-off-by: Sam James <sam@gentoo.org>

 ...llow-bool-and-enum-null-pointer-constants.patch | 244 +++++++++++++++++++++
 sys-devel/gcc/gcc-15.0.0_pre20241117-r2.ebuild     |  54 +++++
 2 files changed, 298 insertions(+)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-19 03:55:35 UTC
I think this one is legit (but please check).
Comment 3 immolo 2024-11-20 04:02:26 UTC
*** Bug 944053 has been marked as a duplicate of this bug. ***
Comment 4 immolo 2024-12-01 22:14:02 UTC
This one is confirmed fixed with the above commit:

============================================================================
Testsuite summary for MHASH 0.9.9
============================================================================
# TOTAL: 5
# PASS:  5

sys-devel/gcc: 15.0.0_pre20241124::gentoo