Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565744 - dev-util/cmake-3.4.0 emerge fails because CMAKE_C_STANDARD_COMPUTED_DEFAULT missing
Summary: dev-util/cmake-3.4.0 emerge fails because CMAKE_C_STANDARD_COMPUTED_DEFAULT m...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
Depends on:
Reported: 2015-11-14 08:13 UTC by Klaus Kusche
Modified: 2016-01-01 13:39 UTC (History)
2 users (show)

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

patch to compile and use cmake with LTO (configure_with_lto_fix.patch,938 bytes, patch)
2015-11-14 15:31 UTC, Sietze Post
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2015-11-14 08:13:51 UTC
From the emerge log:

>>> Configuring source in /var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0 ...
>>> Working in BUILD_DIR: "/var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0_build"
/var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0/Bootstrap.cmk/cmake --no-warn-unused-cli -C /var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PR
Not searching for unused variables given on the command line.
loading initial cache file /var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
CMake Error at Modules/Compiler/GNU-C.cmake:28 (message):
  (/usr/bin/x86_64-pc-linux-gnu-gcc) version 4.9.3
Call Stack (most recent call first):
  Modules/CMakeCInformation.cmake:33 (include)
  CMakeLists.txt:19 (project)

-- Configuring incomplete, errors occurred!
See also "/var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0_build/CMakeFiles/CMakeOutput.log".
 * ERROR: dev-util/cmake-3.4.0::gentoo failed (configure phase):
 *   cmake failed
 * Call stack:
 *, line   90:  Called src_configure
 *   environment, line 3127:  Called cmake-utils_src_configure
 *   environment, line  796:  Called _execute_optionally 'src_configure'
 *   environment, line  345:  Called enable_cmake-utils_src_configure
 *   environment, line 1332:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * If you need support, post the output of `emerge --info '=dev-util/cmake-3.4.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-util/cmake-3.4.0::gentoo'`.
 * The complete build log is located at '/var/portage/log/dev-util:cmake-3.4.0:20151114-074704.log'.
 * For convenience, a symlink to the build log is located at '/var/portage/portage/dev-util/cmake-3.4.0/temp/build.log'.
 * The ebuild environment file is located at '/var/portage/portage/dev-util/cmake-3.4.0/temp/environment'.
 * Working directory: '/var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0_build'
 * S: '/var/portage/portage/dev-util/cmake-3.4.0/work/cmake-3.4.0'

emerge --info:

Portage 2.2.24 (python 2.7.10-final-0, default/linux/amd64/13.0/no-multilib, gcc-4.9.3, glibc-2.22-r1, 4.2.5-hardened-r1 x86_64)
System uname: Linux-4.2.5-hardened-r1-x86_64-Intel-R-_Core-TM-_i7-3940XM_CPU_@_3.00GHz-with-gentoo-2.2
KiB Mem:    32906912 total,  22488652 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 14 Nov 2015 07:15:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10-r2::gentoo, 3.4.3-r2::gentoo
dev-util/cmake:           3.3.2-r1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.3::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-11.x Oracle-BCLA-JavaSE google-chrome googleearth Vivaldi"
CFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
EMERGE_DEFAULT_OPTS="--quiet-build --quiet-fail --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles keeptemp keepwork merge-sync news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
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"
USE="64bit X a52 aac adobe-cff alsa amd64 apng applet archive ass avx bzip2 cairo cdda cdparanoia clang cli clipboard clockdiff contrast cups curl cxx dbus dconf demosaic detex devfs-compat dga divx dns dot dri dri3 drm dts dvd dvdnav dvdr dvi dvipdfm egl encode epspdf exif expat extra faad ffmpeg fftw flac fontconfig foomaticdb fts3 g3dvl gallium gbm gdk-pixbuf gif gimp glamor gles gles1 gles2 glib glibc-omitfp gmp graphics gs gstreamer gtk gtk2 gudev hpack-tools hpn htmlreport http http2 hwdb iconv icu imagemagick inotify jbig jemalloc3 jit jpeg jpeg2k kpathsea lasi latex latex3 lcdfilter lcms leaps_timezone lensfun libkms libnotify libopts libsamplerate libwww lightning llvm llvm-gcc llvm-shared-libs lz4 lzma lzo mad metric midi minizip mmap mms mmx mmxext mng modern-top modules monolithic mp3 mpeg mpfr mta mudflap multicall natspec ncat ncurses ndiff nping nptl nscd nsplugin offensive ogg oldnet opengl openmax openmp openvg opus orc pam pango pax_kernel pcap pcre pdf pic plugins png policykit postproc postscript ppds pstricks pth ptpax quicktime r600-llvm-compiler rar raw readline realmedia right_timezone rle rpc rtc rule_generator sanitize scanner schroedinger scope seccomp secure-delete session smp sndfile sound sqlite sqlite3 sse sse2 sse3 sse4 sse4_1 sse4_2 ssh ssl ssse3 svg symlink sync-plugin-portage system-cairo system-icu system-jpeg system-jsoncpp system-libvpx system-sqlite systemd t1lib texi2html theora threads thunar tiff tools tracepath tremor truetype udev udisks unicode unlock-notify unwind usb utils vaapi vdpau vim-with-x vorbis vpx webkit2 webp wmf wmp wxwidgets x264 xa xcb xcomposite xetex xkb xlib-xcb xmp xorg xpm xrandr xulrunner xv xvid xvmc zenmap zip zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer pdfimport" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" SANE_BACKENDS="epson" USERLAND="GNU" VIDEO_CARDS="radeon 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 Sietze Post 2015-11-14 13:17:05 UTC
I ran into the same problem. Emerging without LTO worked successfully.
Comment 2 Sietze Post 2015-11-14 13:24:03 UTC
Sadly, all(?) packages building with CMake-3.4.0 without LTO have the same problem configuring if LTO is enabled for those.
Comment 3 Klaus Kusche 2015-11-14 13:37:50 UTC
I can confirm that cmake emerges fine here with lto disabled.

Disabling lto just for cmake would be no problem,
but disabling lto for all packages using cmake clearly is...
Comment 4 Sietze Post 2015-11-14 15:31:21 UTC
Created attachment 416970 [details, diff]
patch to compile and use cmake with LTO

Created a patch that allows me to compile CMake-3.4.0 with LTO enabled, and subsequently compile other packages depending on CMake as well. I'm by no means an expert, so be aware this could unintentionally make the world burn down.
Comment 5 Lars Wendler (Polynomial-C) gentoo-dev 2015-11-16 09:23:04 UTC
Have you tried to get in contact with upstream regarding this problem?
Comment 6 Sietze Post 2015-11-17 16:05:21 UTC
I just sent an email to the CMake developer mailing list, they seem to prefer that for their primary communication.
Comment 7 Sietze Post 2015-11-17 19:33:03 UTC
Queued for merge with 'release' for CMake-3.4.1
Comment 8 Michael Palimaka (kensington) gentoo-dev 2015-12-31 08:27:50 UTC
cmake-3.4.1 is in the tree, can you confirm the issue is resolved there?
Comment 9 Klaus Kusche 2015-12-31 21:58:51 UTC
Works for me.
Comment 10 Michael Palimaka (kensington) gentoo-dev 2016-01-01 13:39:54 UTC
Thanks for testing.