I use the newest gcc and cmake(both 9999 version) to build a cpp file with c++ 23 std module with libstdc++ Reproducible: Always Steps to Reproduce: 1. Write a cmake project and use c++ 23 std module with libstdc++(example like URL https://gitlab.kitware.com/cmake/cmake/-/issues/26609) 2. mkdir build && cd build && cmake .. -G Ninja Actual Results: CMake Error at build/CMakeFiles/3.31.20250115-gd973339-dirty/CMakeCXXCompiler.cmake:101 (target_sources): Cannot find source file: /usr/lib/gcc/x86_64-pc-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:91 (include) CMakeLists.txt:8 (project) CMake Error in CMakeLists.txt: No SOURCES given to target: __CMAKE__CXX23@synth_a7f66412c2c0 Expected Results: build without error Portage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-15, glibc-2.40-r5, 6.12.8-gentoo-dist x86_64) ================================================================= System uname: Linux-6.12.8-gentoo-dist-x86_64-AMD_Ryzen_9_7940HX_with_Radeon_Graphics-with-glibc2.40 KiB Mem: 98000804 total, 91447876 free KiB Swap: 100663292 total, 100663292 free Timestamp of repository gentoo: Wed, 15 Jan 2025 07:00:00 +0000 Head commit of repository gentoo: 09531453ff7a62877006e0d20052c842eab86d5b Timestamp of repository guru: Tue, 14 Jan 2025 17:18:19 +0000 Head commit of repository guru: 872aa2fed715c1af7450c53c69a28bf0bcbe35b6 sh bash 5.2_p37 ld GNU ld (Gentoo 2.43 p3) 2.43.1 ccache version 4.10.2 [enabled] app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 9999::gentoo dev-build/libtool: 2.5.4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.5.2::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.8::gentoo, 3.13.1::gentoo dev-lang/rust-bin: 1.82.0-r101::gentoo dev-util/ccache: 4.10.2-r1::gentoo llvm-core/clang: 19.1.4::gentoo llvm-core/lld: 19.1.4::gentoo llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.4::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/sandbox: 2.39::gentoo sys-apps/systemd: 256.7::gentoo sys-devel/binutils: 2.43-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 15.0.9999::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r5::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: False sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 3 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.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" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O3 -pipe -flto " CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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="-march=native -O3 -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="-march=native -O3 -pipe -flto " FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache 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="-march=native -O3 -pipe -flto " GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo https://mirrors.ustc.edu.cn/gentoo/ https://mirrors.zju.edu.cn/gentoo/" LANG="zh_CN.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="en en_US zh zh_CN" 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 activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dist-kernel dri dts dvd dvdr encode exif fcitx flac gdbm gif gpm gui iconv icu ipv6 jpeg kde kf6compat kwallet lcms libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nvenc ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vdpau vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml 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" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US zh zh-Hans zh-Hans-CN zh-CN" 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_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq prPortage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-15, glibc-2.40-r5, 6.12.8-gentoo-dist x86_64) ================================================================= System uname: Linux-6.12.8-gentoo-dist-x86_64-AMD_Ryzen_9_7940HX_with_Radeon_Graphics-with-glibc2.40 KiB Mem: 98000804 total, 91447876 free KiB Swap: 100663292 total, 100663292 free Timestamp of repository gentoo: Wed, 15 Jan 2025 07:00:00 +0000 Head commit of repository gentoo: 09531453ff7a62877006e0d20052c842eab86d5b Timestamp of repository guru: Tue, 14 Jan 2025 17:18:19 +0000 Head commit of repository guru: 872aa2fed715c1af7450c53c69a28bf0bcbe35b6 sh bash 5.2_p37 ld GNU ld (Gentoo 2.43 p3) 2.43.1 ccache version 4.10.2 [enabled] app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 9999::gentoo dev-build/libtool: 2.5.4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.5.2::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.8::gentoo, 3.13.1::gentoo dev-lang/rust-bin: 1.82.0-r101::gentoo dev-util/ccache: 4.10.2-r1::gentoo llvm-core/clang: 19.1.4::gentoo llvm-core/lld: 19.1.4::gentoo llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.4::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/sandbox: 2.39::gentoo sys-apps/systemd: 256.7::gentoo sys-devel/binutils: 2.43-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 15.0.9999::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r5::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: False sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 3 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.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" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O3 -pipe -flto " CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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="-march=native -O3 -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="-march=native -O3 -pipe -flto " FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache 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="-march=native -O3 -pipe -flto " GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo https://mirrors.ustc.edu.cn/gentoo/ https://mirrors.zju.edu.cn/gentoo/" LANG="zh_CN.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="en en_US zh zh_CN" 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 activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dist-kernel dri dts dvd dvdr encode exif fcitx flac gdbm gif gpm gui iconv icu ipv6 jpeg kde kf6compat kwallet lcms libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nvenc ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vdpau vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml 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" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US zh zh-Hans zh-Hans-CN zh-CN" 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_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi 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, MAKE, MAKEFLAGS, MAKEOPTS, oto 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, MAKE, MAKEFLAGS, MAKEOPTS,
In /usr/lib/gcc/x86_64-pc-linux-gnu/15/libstdc++.modules.json, I have: ``` { "version": 1, "revision": 1, "modules": [ { "logical-name": "std", "source-path": "../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc", "is-std-library": true }, { "logical-name": "std.compat", "source-path": "../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.compat.cc", "is-std-library": true } ] } ```` In your output, it looks for /usr/lib/gcc/x86_64-pc-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc, which means it needs to be ../../gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc instead?
(In reply to Sam James from comment #1) > In /usr/lib/gcc/x86_64-pc-linux-gnu/15/libstdc++.modules.json, I have: > ``` > { > "version": 1, > "revision": 1, > "modules": [ > { > "logical-name": "std", > "source-path": > "../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc", > "is-std-library": true > }, > { > "logical-name": "std.compat", > "source-path": > "../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.compat.cc", > "is-std-library": true > } > ] > } > ```` > > In your output, it looks for > /usr/lib/gcc/x86_64-pc-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/15/include/g++- > v15/bits/std.cc, which means it needs to be > ../../gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc instead? It should be: ```json { "version": 1, "revision": 1, "modules": [ { "logical-name": "std", "source-path": "../../../../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc", "is-std-library": true }, { "logical-name": "std.compat", "source-path": "../../../../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.compat.cc", "is-std-library": true } ] } ```
(In reply to Sam James from comment #1) > In /usr/lib/gcc/x86_64-pc-linux-gnu/15/libstdc++.modules.json, I have: > ``` > { > "version": 1, > "revision": 1, > "modules": [ > { > "logical-name": "std", > "source-path": > "../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc", > "is-std-library": true > }, > { > "logical-name": "std.compat", > "source-path": > "../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.compat.cc", > "is-std-library": true > } > ] > } > ```` > > In your output, it looks for > /usr/lib/gcc/x86_64-pc-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/15/include/g++- > v15/bits/std.cc, which means it needs to be > ../../gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std.cc instead? But I'm not familiar with its module.json and the cmake developer told me there is also same problem in Fedora. Could you see this url:https://gitlab.kitware.com/cmake/cmake/-/issues/26609?
Fedora did https://src.fedoraproject.org/rpms/gcc/c/46a6d807645871b4d243ef2be35f9677bd4d68cb?branch=rawhide. But I also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119081.
(In reply to Sam James from comment #4) > Fedora did > https://src.fedoraproject.org/rpms/gcc/c/ > 46a6d807645871b4d243ef2be35f9677bd4d68cb?branch=rawhide. > > But I also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119081. This didn't help. I'll just copy Fedora's sed.
Reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119266. Thanks.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ae822d007a7120fa5856a3fe8d5f90e97eba0b55 commit ae822d007a7120fa5856a3fe8d5f90e97eba0b55 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-13 10:07:37 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-13 10:08:10 +0000 15.0.0: add realpath hack for C++ modules JSON location Bug: https://gcc.gnu.org/PR119266 Bug: https://bugs.gentoo.org/948394 Signed-off-by: Sam James <sam@gentoo.org> ...-contrib-make-relpath.sh-use-GNU-realpath.patch | 33 ++++++++++++++++++++++ 15.0.0/gentoo/README.history | 1 + 2 files changed, 34 insertions(+)
I've pushed a quick hack for 9999. I haven't tested it with a full build yet.
(In reply to Sam James from comment #8) > I've pushed a quick hack for 9999. I haven't tested it with a full build yet. (If you're able to try it, I'd appreciate that!)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87c9c1899a56f388493ecbec3b45d175d99581f2 commit 87c9c1899a56f388493ecbec3b45d175d99581f2 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-13 17:20:22 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-13 17:20:22 +0000 toolchain.eclass: hackily fixup libstdc++.modules.json Bug: https://bugs.gentoo.org/948394 Bug: https://gcc.gnu.org/PR119266 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 7 +++++++ 1 file changed, 7 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=221897e8182089a650784e019457d8525700a905 commit 221897e8182089a650784e019457d8525700a905 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-13 18:01:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-13 18:01:46 +0000 toolchain.eclass: hackily fixup libstdc++.modules.json (more) Fixes: 87c9c1899a56f388493ecbec3b45d175d99581f2 Bug: https://bugs.gentoo.org/948394 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a8d9cd103fc03a30dbcf6c455b13cf31d8ee15e commit 5a8d9cd103fc03a30dbcf6c455b13cf31d8ee15e Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-13 18:08:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-13 18:09:57 +0000 toolchain.eclass: another .json fixup Bug: https://bugs.gentoo.org/948394 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I'll work on it more later.
(In reply to Larry the Git Cow from comment #10) > The bug has been referenced in the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=87c9c1899a56f388493ecbec3b45d175d99581f2 > > commit 87c9c1899a56f388493ecbec3b45d175d99581f2 > Author: Sam James <sam@gentoo.org> > AuthorDate: 2025-03-13 17:20:22 +0000 > Commit: Sam James <sam@gentoo.org> > CommitDate: 2025-03-13 17:20:22 +0000 > > toolchain.eclass: hackily fixup libstdc++.modules.json > > Bug: https://bugs.gentoo.org/948394 > Bug: https://gcc.gnu.org/PR119266 > Signed-off-by: Sam James <sam@gentoo.org> > > eclass/toolchain.eclass | 7 +++++++ > 1 file changed, 7 insertions(+) I think this change broke gcc-14 building for me: + # Hack for C++ modules + if ! is_crosscompile; then + # PR19266 (bug #948394) + sed -e 's,\.\./lib/gcc/${CHOST}/${GCCMAJOR}/include/,../../../../include/,' \ + "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/libstdc++.modules.json || die + fi (Code now looks slightly different but not in a way that matters for this.) There's no libstdc++.modules.json in my gcc-14's image/ dir, no logic in the eclass that checks for it first, so the sed fails and we die: make[4]: Leaving directory '/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/build/x86_64-pc-linux-gnu/libatomic' make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/build/x86_64-pc-linux-gnu/libatomic' make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/build/x86_64-pc-linux-gnu/libatomic' make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/build' sed: can't read /var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/image/usr/lib/gcc/x86_64-pc-linux-gnu/14/libstdc++.modules.json: No such file or directory * ERROR: sys-devel/gcc-14.2.1_p20250301::gentoo failed (install phase): * (no error message) * * Call stack: * ebuild.sh, line 136: Called src_install * environment, line 3424: Called toolchain_src_install * environment, line 5242: Called die * The specific snippet of code: * sed -i -e "s,\.\./lib/gcc/${CHOST}/${GCCMAJOR}/include/,include/," "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/libstdc++.modules.json || die; * * If you need support, post the output of `emerge --info '=sys-devel/gcc-14.2.1_p20250301::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-14.2.1_p20250301::gentoo'`. * My guess is that's a gcc-15+-only thing? # find /var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/ -name \*.modules.json -ls # Upgrading different boxes to gcc-14.2.1_p20250301 yesterday worked fine, which makes sense because this eclass change hadn't hit yet.
Gah, thanks!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c4f5b81368474b9bb7fb8245945c7faba3cc3e5 commit 9c4f5b81368474b9bb7fb8245945c7faba3cc3e5 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-14 02:48:57 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-14 02:49:51 +0000 toolchain.eclass: only sed .json for 15 ... it doesn't exist in older versions. Bug: https://bugs.gentoo.org/948394 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Let me see if I can reroll the emerge-webrsync snapshot.
(In reply to Sam James from comment #17) > Let me see if I can reroll the emerge-webrsync snapshot. It took several failed starts and a bunch of yak shaves, but I've regenerated it now, and know how to in future!