Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via or IRC
Bug 691544 - dev-util/cmake-3.14.6 FEATURES=distcc - The C++ compiler does not support C++11 (e.g. std::unique_ptr)
Summary: dev-util/cmake-3.14.6 FEATURES=distcc - The C++ compiler does not support C++...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
Depends on:
Reported: 2019-08-06 07:23 UTC by Jan Vansteenkiste
Modified: 2020-08-21 21:51 UTC (History)
2 users (show)

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

Regexp filter distcc warnings. (cmake_distcc.patch,945 bytes, patch)
2020-05-20 19:17 UTC, Felix W.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Vansteenkiste 2019-08-06 07:23:15 UTC
Compilation fails with

  The C++ compiler does not support C++11 (e.g.  std::unique_ptr).

Succeeds with FEATURES=-distcc

Portage 2.3.69 (python 3.6.5-final-0, !../../var/lib/overlays/vstone/profiles/vstone/server, gcc-8.3.0, glibc-2.29-r2, 5.2.2-gentoo x86_64)
System uname: Linux-5.2.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-8705G_CPU_@_3.10GHz-with-gentoo-2.6
KiB Mem:    32880896 total,  29147560 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 05 Aug 2019 11:47:31 +0000
Head commit of repository gentoo: d9e24c9c6b12a9f26fe36a7a74400f320f9285a8

Head commit of repository vstone: 274b790786818067f8263d19dfa47c0edf83a809

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p7) 2.31.1
distcc 3.3.2 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.14.6::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r6::gentoo, 2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo

    location: /usr/portage
    sync-type: git
    priority: -1000

    location: /var/lib/overlays/vstone
    sync-type: git
    masters: gentoo

Installed sets: @emulation, @systemtools
CFLAGS="-march=skylake -mabm -O2 -pipe"
CONFIG_PROTECT="/etc /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/php/apache2-php7.2/ext-active/ /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=skylake -mabm -O2 -pipe"
FCFLAGS="-march=skylake -mabm -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=skylake -mabm -O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en nl nl_BE"
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"
USE="acl amd64 berkdb btrfs bzip2 cli crypt cryptsetup cxx dri efi fortran gdbm git gpg iconv ipv6 libtirpc lvm lzma multilib ncurses nls nptl openmp pam pcre pcre16 readline seccomp split-usr ssl tcpd unicode vim-syntax xattr zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" L10N="en nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 1 Anon Emuss 2019-08-07 06:09:29 UTC
I have a similar problem.  I have distcc enabled, but there is currently no distccd server running, so it falls back to compiling locally.  This produces a warning, which can be seen in /var/tmp/portage/dev-util/cmake-3.14.6/work/cmake-3.16.6_build/CMakeFiles/CMakeError.log.  Here are the relevant lines from mine (with a lot of the arguments filtered out for clarity):

Building CXX object CMakeFiles/...
/usr/lib/distcc/bin/x86_64-pc-linux-gnu-g++ ...
distcc[123] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
Linking CXX executable ...
/usr/bin/cmake -E cmake_link_script ...
/usr/lib/distcc/bin/x86_64-pc-linux-gnu-g++ ...

The command actually completes successfully.  However, in the cmake source directory, Source/Checks/cm_cxx_features.cmake checks for the word ``warning'' (case insensitive) in the output.  It whitelists a few known warnings that should not cause a failure, and will fail the test for any other warning, even if the command completes successfully.  The distcc warning above triggers this.  This is why compiling without distcc succeeds (for me); without distcc, the warning line is not present.

In my case, I should fix this by either disabling distcc, since I am not using it, or running distccd and using it, but I opted to simply add a regex whitelisting my warning to Source/Checks/cm_cxx_features.cmake.

I recommend checking (or posting) your CMakeError.log file for the word ``warning''.  When the compile fails, emerge should have printed a message giving the full path to CMakeError.log (should be similar to my path above).  If there is a distcc warning given there, that is probably triggering the problem.
Comment 2 Peter Serbe 2019-08-13 09:53:42 UTC
I hit the bug in the way Anon Emuss described during an upgrade, but my usual distcc-server is currently down. I solved it by pointing distcc to a different server. 
This work around is pretty easy - but finding this information here was more or less good luck. The search in the forum did not retrieve useful information.
Comment 3 Michael Hofmann 2019-08-13 10:46:05 UTC
Comment 4 Michael Hofmann 2019-08-13 10:47:42 UTC
I'm sorry - I meant the whole thread:
Comment 5 skaumo 2020-01-03 17:07:08 UTC
to me it fails even with either FEATURES="-distcc -ccache"

Tried GCC 4, 6, 8, and all fail.

cmake-3.14-6, cmake-3.16.2-r1 all fail

same error. Doesn't seem to be a distcc issue

-- The C compiler identification is GNU 6.4.0
-- The CXX compiler identification is GNU 6.4.0
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking if compiler supports C11 _Thread_local
-- Checking if compiler supports C11 _Thread_local - yes
-- Checking if compiler supports needed C++17 constructs
-- Checking if compiler supports needed C++17 constructs - yes
-- Checking if compiler supports C++ make_unique
-- Checking if compiler supports C++ make_unique - no
-- Checking if compiler supports C++ unique_ptr
-- Checking if compiler supports C++ unique_ptr - no
CMake Error at CMakeLists.txt:92 (message):
  The C++ compiler does not support C++11 (e.g.  std::unique_ptr).
Comment 6 Anon Emuss 2020-01-21 15:28:21 UTC
(In reply to skaumo from comment #5)
> to me it fails even with either FEATURES="-distcc -ccache"
> same error. Doesn't seem to be a distcc issue

Sounds like that might be a different issue, but you should be able to diagnose it the same way.  Try checking your CMakeError.log file as described in comment #1 for any obvious warning or error messages.
Comment 7 Brett Coady 2020-03-22 01:25:20 UTC
(In reply to skaumo from comment #5)
> to me it fails even with either FEATURES="-distcc -ccache"
> Tried GCC 4, 6, 8, and all fail.
> cmake-3.14-6, cmake-3.16.2-r1 all fail
> same error. Doesn't seem to be a distcc issue

>   The C++ compiler does not support C++11 (e.g.  std::unique_ptr).

I had the same issue.
After: env-update && source /etc/profile

>>> Installing (1 of 1) dev-util/cmake-3.16.5::gentoo

all looks good. :-)
Comment 8 Felix W. 2020-05-20 19:17:07 UTC
Created attachment 640592 [details, diff]
Regexp filter distcc warnings.

This is caused by 


checking the output of the build, not the result code, of


The check defines a couple of warnings that are filtered, and any warning will be treated as a catastrophic failure:

31     # If using the feature causes warnings, treat it as broken/unavailable.
32     if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
34     endif()
35     if(CMake_HAVE_CXX_${FEATURE})
36       message(STATUS "Checking if compiler supports C++ ${name} - yes")
38         "Determining if compiler supports C++ ${name} passed with the following output:\n"
39         "${OUTPUT}\n"
40         "\n"
41         )
42     else()
43       message(STATUS "Checking if compiler supports C++ ${name} - no")
45         "Determining if compiler supports C++ ${name} failed with the following output:\n"
46         "${OUTPUT}\n"
47         "\n"
48         )
49     endif()

This is terribly bad design in a critical codepath.

Either way, I have attached a patch to make distcc warnings disappear, but your cases of breakage may be different, so you may have to craft your own until upstream realises the error of their ways.

I've attached a patch for distcc, I'll also try to submit it upstream.
Comment 9 Andreas Sturmlechner gentoo-dev 2020-07-22 15:44:57 UTC
(In reply to Felix W. from comment #8)
> I've attached a patch for distcc, I'll also try to submit it upstream.
Thanks, did you follow up on that? Can we track an upstream link?
Comment 10 Larry the Git Cow gentoo-dev 2020-07-22 16:26:51 UTC
The bug has been referenced in the following commit(s):

commit 798815cd723550bb4b9141ded9e50c12a74ed3e2
Author:     Lars Wendler <>
AuthorDate: 2020-07-22 16:26:02 +0000
Commit:     Lars Wendler <>
CommitDate: 2020-07-22 16:26:46 +0000

    dev-util/cmake: Bump to version 3.18.0. Removed old
    Filter out distcc warnings
    Thanks-to: Felix W. <>
    Package-Manager: Portage-3.0.0, Repoman-2.3.23
    Signed-off-by: Lars Wendler <>

 dev-util/cmake/Manifest                                 |  2 +-
 .../{cmake-3.18.0_rc4.ebuild => cmake-3.18.0.ebuild}    |  2 ++
 .../files/cmake-3.18.0-filter_distcc_warning.patch      | 17 +++++++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
Comment 11 brookebasile 2020-08-21 21:51:02 UTC
Getting this error with v.3.16.5 on armv7a-unknown-linux-gnueabihf.  I was able to fix it using Felix's patch.