``` /bin/sh ./libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -std=c++11 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5 .4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/u sr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/incl ude/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5 .4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/u sr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-swit ches -fdiagnostics-details -Wall -Wcast-qual -Wextra -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wswitch -Wwrite-strings -DNDEBUG -Wctor-dtor-privacy -Wno-d eprecated -Wno-non-template-friend -Wno-pmf-conversions -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo -Wsynth -O3 -march=native -flto=jobserver -fno-semantic-interposit ion -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-detail s -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -o kyua kyua-main.o libcli.la libdrivers.la libengine.la libstore.la libmodel.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libmodel.la libutils.la -llua5.4 -llutok -llua5.4 - llutok -llua5.4 -llutok -lsqlite3 libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libengine_execenv.la libmodel.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libstore.la libmodel.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libmodel.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libengine.la libstore.la libmodel.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libmodel.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libengine_execenv.la libmodel.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libfreebsd.la libutils.la -llua5.4 -llutok -llua5.4 -llutok -llua5.4 -llutok -lsqlite3 libtool: link: x86_64-pc-linux-gnu-g++ -std=c++11 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -I/usr/include/lua5.4 -O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-details -Wall -Wcast-qual -Wextra -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wswitch -Wwrite-strings -DNDEBUG -Wctor-dtor-privacy -Wno-deprecated -Wno-non-template-friend -Wno-pmf-conversions -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo -Wsynth -O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-details -Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -o kyua kyua-main.o ./.libs/libcli.a ./.libs/libdrivers.a ./.libs/libengine.a ./.libs/libstore.a ./.libs/libengine_execenv.a ./.libs/libmodel.a ./.libs/libfreebsd.a ./.libs/libutils.a //usr/lib/gcc/x86_64-pc-linux-gnu/15/libatomic.so -llua5.4 -llutok -lsqlite3 -pthread -Wl,-rpath -Wl,//usr/lib/gcc/x86_64-pc-linux-gnu/15 ./utils/config/nodes.hpp:120:7: error: virtual table of type 'struct typed_leaf_node' violates one definition rule [-Werror=odr[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-odr]] 120 | class typed_leaf_node : public leaf_node { | ^ ./utils/config/nodes.hpp:120:7: note: the conflicting type defined in another translation unit 120 | class typed_leaf_node : public leaf_node { | ^ <built-in>: note: virtual method '__cxa_pure_virtual' ./utils/config/nodes.ipp:225:1: note: ought to match virtual method 'validate' but does not 225 | config::typed_leaf_node< ValueType >::validate( | ^ lto1: some warnings being treated as errors lto-wrapper: fatal error: x86_64-pc-linux-gnu-g++ returned 1 exit status compilation terminated. ``` ---- # emerge --info Portage 3.0.66.1 (python 3.13.1-final-0, default/linux/amd64/23.0/hardened, gcc-15, glibc-2.40-r7, 6.12.8-gentoo-dist-hardened x86_64) ================================================================= System uname: Linux-6.12.8-gentoo-dist-hardened-x86_64-AMD_Ryzen_9_PRO_7940HS_w-_Radeon_780M_Graphics-with-glibc2.40 KiB Mem: 64424972 total, 20732568 free KiB Swap: 25051128 total, 25023064 free Timestamp of repository gentoo: Mon, 13 Jan 2025 03:03:25 +0000 Head commit of repository gentoo: 2263ab54f6c46c62cdcb91e9c7c6d440e66ecbe5 Timestamp of repository kde: Sun, 12 Jan 2025 16:18:14 +0000 Head commit of repository kde: 52335a303b3ca1eab398d295d0e31466183ba024 Timestamp of repository sam_c: Mon, 06 Jan 2025 20:33:20 +0000 Head commit of repository sam_c: ab0f7dc49f8179902e29e308ff3bef2deaf8f990 sh dash 0.5.12-r1 ld GNU ld (Gentoo 9999 p1) 2.43.50.20250112 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.71-r7::gentoo, 2.72-r1::gentoo dev-build/automake: 1.17-r1::gentoo dev-build/cmake: 3.31.4-r1::gentoo dev-build/libtool: 2.5.4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.6.1::gentoo dev-java/java-config: 2.3.4::gentoo dev-lang/perl: 5.40.0-r1::gentoo dev-lang/python: 3.12.8_p1::gentoo, 3.13.1_p1::gentoo dev-lang/rust-bin: 1.83.0::gentoo, 1.84.0::gentoo llvm-core/clang: 18.1.8-r6::gentoo, 19.1.6::gentoo llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.6::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/sandbox: 2.42::gentoo sys-apps/systemd: 257.1::gentoo sys-devel/binutils: 2.43-r2::gentoo, 9999::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 15.0.9999::gentoo sys-devel/gcc-config: 2.12.1::gentoo sys-kernel/linux-headers: 6.12::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 volatile: False kde location: /var/db/repos/kde sync-type: git sync-uri: https://github.com/gentoo-mirror/kde.git masters: gentoo volatile: False sam_c location: /var/db/repos/sam_c sync-type: git sync-uri: https://github.com/gentoo-mirror/sam_c.git masters: gentoo volatile: False Binary Repositories: gentoobinhost priority: 1 sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64 Installed sets: @sam-emacs, @sam-fonts, @sam-fortune ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-details" 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="-O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-details" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--keep-going --jobs=4 --load-average=4 --implicit-system-deps=n --with-bdeps=y --usepkg=y" 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="-O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-details" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg clean-logs config-protect-if-modified distlocks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-details" GENTOO_MIRRORS="https://mirror.bytemark.co.uk/gentoo/ https://mirrors.gethosted.online/gentoo/ https://www.mirrorservice.org/sites/distfiles.gentoo.org/" LANG="en_GB.UTF-8" LDFLAGS="-O3 -march=native -flto=jobserver -fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always -Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasing -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -fdiagnostics-details -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0" LEX="flex" LINGUAS="en en_GB" MAKEOPTS="-j4 -l4" PKGDIR="/var/cache/binpkgs" PORTAGE_COMPRESS="xz" 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" RUSTFLAGS="-C target-cpu=native -C link-arg=-Wl,-z,pack-relative-relocs" SHELL="/bin/bash" USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo caps cdda cdr cet compress-xz crypt cups dbus declarative dist-kernel dri dts dvd dvdr emacs encode exif filecaps flac gdbm gif gpm gtk gui hardened iconv icu ipv6 jpeg kde kf6compat kwallet lcms libnotify libtirpc lto mad mng modules-compress mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pgo pic pie pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound spell ssl ssp startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb verify-sig vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xtpax xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_13" 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 avx512_bf16 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl 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_13" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeon radeonsi" 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, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 916439 [details] build.log
The previous version was fine I think, need to see what broke it (added the ODR violation).
It needs -fno-semantic-interposition too. (BTW, the repeated lua -I and -l looks suspicious.)
Bisect says: commit 4c63c1ecdf6c6ae95a50a97041927c4f31d22d9b (HEAD) Author: Minsoo Choo <minsoochoo0122@proton.me> Date: Sun Mar 10 18:29:01 2024 -0400 Fix build failure on macOS Using libtool instead of relying on GNU make's implicit rules for static libraries should be preferred on macOS as libtool provides appropriate linker flags for building kyua's shared objects. Fixes #219 Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Smells a bit like some definition (-DXXX) gets lost?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e089b30a9eb24208fc37ef1e561b0f9031c131d commit 9e089b30a9eb24208fc37ef1e561b0f9031c131d Author: Sam James <sam@gentoo.org> AuthorDate: 2025-01-14 14:57:08 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-01-14 14:57:47 +0000 dev-util/kyua: filter LTO for now I don't yet understand what's going wrong so filter LTO until investigated; bisected it to a build system change and it feels like some macro is/isn't being set consistently now (we've had that before) which causes -Wodr warnings. Bug: https://bugs.gentoo.org/948053 Signed-off-by: Sam James <sam@gentoo.org> dev-util/kyua/kyua-0.14.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f9bf9b7864852284a7ad6e48e96cf4cc4085fcb commit 3f9bf9b7864852284a7ad6e48e96cf4cc4085fcb Author: Sam James <sam@gentoo.org> AuthorDate: 2025-05-12 00:35:42 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-05-12 00:36:48 +0000 dev-util/kyua: filter -fno-semantic-interposition w/ LTO Investigation is needed to see whether -Wodr is legitimate here. Closes: https://bugs.gentoo.org/948053 Signed-off-by: Sam James <sam@gentoo.org> dev-util/kyua/kyua-0.14.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)