Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950297 - dev-build/cmake-3.31.5 config failure - The C++ compiler does not support C++11 (e.g. std::unique_ptr)
Summary: dev-build/cmake-3.31.5 config failure - The C++ compiler does not support C++...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-26 11:38 UTC by Ian Stakenvicius
Modified: 2025-02-26 12:20 UTC (History)
1 user (show)

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


Attachments
CMakeError.log (CMakeError.log,12.06 KB, text/plain)
2025-02-26 11:59 UTC, Ian Stakenvicius
Details
build.log (build.log,8.68 KB, application/octet-stream)
2025-02-26 11:59 UTC, Ian Stakenvicius
Details
CMakeOutput.log (CMakeOutput.log,8.02 KB, text/plain)
2025-02-26 11:59 UTC, Ian Stakenvicius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Stakenvicius 2025-02-26 11:38:58 UTC
Same issue as previous bug in the URL.  This occurs whether FEATURES=distcc is used or not.

Same fix ("bypass cmake bugous c++11 check") allows it to configure and build successfully.



Reproducible: Always




Portage 3.0.66.1 (python 3.12.9-final-0, default/linux/amd64/23.0/desktop/systemd, gcc-14, glibc-2.40-r8, 6.6.67-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.67-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-glibc2.40
KiB Mem:     7834436 total,   1060096 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 23 Feb 2025 11:45:00 +0000
Head commit of repository gentoo: aff5919e4a0167b9f565ab4064b3c0884e4f5630
sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.6::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.9::gentoo, 3.13.2::gentoo
dev-lang/rust-bin:         1.82.0-r101::gentoo, 1.84.1-r2::gentoo
llvm-core/clang:           18.1.8-r6::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.10::gentoo
sys-devel/binutils:        2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r8::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-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 3

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE ValveSteamLicense"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=sandybridge"
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="-O2 -pipe -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=sandybridge"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="-j2"
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 -pipe -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=sandybridge"
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 -pipe -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=sandybridge"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j4"
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 cups dbus dri dts dvd dvdr encode exif flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf png policykit ppds qml qt5 qt6 readline sdl seccomp sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_14" 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="aes avx f16c mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="18" LLVM_TARGETS="X86 AMDGPU" 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="modesetting intel" 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, LINGUAS, MAKE, MAKEFLAGS, 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 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-26 11:40:34 UTC
Please share the build.log. You'll need to find the CMake*(l|L)og file that has the configure output as well. It's likely being confused by some random compiler warning.
Comment 2 Ian Stakenvicius 2025-02-26 11:59:14 UTC
Created attachment 919922 [details]
CMakeError.log
Comment 3 Ian Stakenvicius 2025-02-26 11:59:29 UTC
Created attachment 919923 [details]
build.log
Comment 4 Ian Stakenvicius 2025-02-26 11:59:45 UTC
Created attachment 919924 [details]
CMakeOutput.log
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-26 12:01:13 UTC
Thanks. So, indeed:
```
x86_64-pc-linux-gnu-g++: warning: AVX512ER support will be removed in GCC 15
x86_64-pc-linux-gnu-g++: warning: AVX512PF support will be removed in GCC 15
x86_64-pc-linux-gnu-g++: warning: PREFETCHWT1 support will be removed in GCC 15
x86_64-pc-linux-gnu-g++: warning: AVX5124FMAPS support will be removed in GCC 15
x86_64-pc-linux-gnu-g++: warning: AVX5124VNNIW support will be removed in GCC 15
```
Comment 6 Ian Stakenvicius 2025-02-26 12:03:12 UTC
okay, so where is the patch that modifies that check so it succeeds regardless of warnings?
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-26 12:04:58 UTC
I'm not sure what you mean? The patch doesn't exist. CMake has a heavy reliance on regex in various places. For the distcc noise, they changed with https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9574.

I assume they deliberately don't filter out all compiler warnings despite the fact they do for linker warnings, you'd have to ask them.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-26 12:05:25 UTC
(Of course, such a patch if you were to write one will end up causing bother anyway -- other configure tests will get confused, and they may not be so kind to fail the build outright.)
Comment 9 Ian Stakenvicius 2025-02-26 12:09:46 UTC
Well, the issue doesn't seem to he distcc at all (especially since I'm not using it), the issue seems to be using the explicit CFLAGS/CXXFLAGS list that gcc spits out as what it uses for -march=native on my system, per the command used to generate it in the distcc howtos.  And warnings from compilers about things that are not deprecated but will be in the future should not break a build.  So, either way, this is a bug that needs to be worked around -at least- on gentoo...  

Is this something you're willing to push to get fixed or is the solution for myself and others to just carry the bypass patch in perpetuity?
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-26 12:12:55 UTC
(In reply to Ian Stakenvicius from comment #9)
> Well, the issue doesn't seem to he distcc at all (especially since I'm not
> using it)

I didn't say it was. I was pointing out that upstream clearly don't want to blanket ignore all warnings and gave an example of how they responded to the distcc issue.

> the issue seems to be using the explicit CFLAGS/CXXFLAGS list
> that gcc spits out as what it uses for -march=native on my system, per the
> command used to generate it in the distcc howtos.  And warnings from
> compilers about things that are not deprecated but will be in the future
> should not break a build.  So, either way, this is a bug that needs to be
> worked around -at least- on gentoo...  

As I said, these warnings *will* break other configure tests (outside of CMake too), and you're fortunate to have had CMake actually error out on it, as opposed to silently (mis)detecting the absence/presence of a function or misdetermining some runtime behaviour of a function.

> 
> Is this something you're willing to push to get fixed or is the solution for
> myself and others to just carry the bypass patch in perpetuity?

We've tried before to get CMake to stop with the regex obsession and be more careful and it didn't go anywhere.
Comment 11 Ian Stakenvicius 2025-02-26 12:19:01 UTC
Warnings don't need to be blanket ignored (tho they should, in general, or if not then they need to be ignored contextually which is much harder to implement).  They only need to be ignored on this one check.

Anyhow, I will carry the bypass patch in perpetuity.

For those not tech savvy, here is the easiest way to do the same:

# run this as root (sudo -i)
mkdir -p /etc/portage/patches/dev-build/cmake
wget -O /etc/portage/patches/dev-build/cmake/950297-bypass-cpp-config.patch "https://bugs.gentoo.org/attachment.cgi?id=760181"
# profit!
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-26 12:20:44 UTC
(In reply to Ian Stakenvicius from comment #11)
> Warnings don't need to be blanket ignored (tho they should, in general, or
> if not then they need to be ignored contextually which is much harder to
> implement).  They only need to be ignored on this one check.

No, because the warnings may cause misdetection of features. It's just that in this case, if the test gives "no", it's fatal. That's not always the case (and usually isn't).