Bug 224721 - [exp-run] devel/cmake needs to be built with C++11
Summary: [exp-run] devel/cmake needs to be built with C++11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Adriaan de Groot
URL: https://reviews.freebsd.org/D13694
Depends on:
Reported: 2017-12-30 04:25 UTC by Justin Hibbits
Modified: 2018-01-01 01:43 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)

Add compiler:c++11-lang (598 bytes, patch)
2017-12-30 13:28 UTC, Adriaan de Groot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Hibbits freebsd_committer 2017-12-30 04:25:55 UTC
devel/cmake 3.10.1 needs C++11.  Configure log error is:

===>  Configuring for cmake-3.10.1
CMake 3.10.1, Copyright 2000-2017 Kitware, Inc. and Contributors
C compiler on this system is: cc -O2 -pipe -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double  -isystem /usr/local/include -fno-strict-aliasing
Error when bootstrapping CMake:
Cannot find a C++ compiler supporting C++11 on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
Log of errors: /tmp/wrkdirs/usr/ports/devel/cmake/work/cmake-3.10.1/Bootstrap.cmk/cmake_bootstrap.log
Comment 1 Adriaan de Groot freebsd_committer 2017-12-30 13:28:10 UTC
Created attachment 189218 [details]
Add compiler:c++11-lang

kde@ would like an exp-run for CMake 3.10.1 with C++11 enabled.

Also reported on IRC by Avengence, and snuck in to https://reviews.freebsd.org/D13662 as well.
Comment 2 Adam Weinberger freebsd_committer 2017-12-30 17:52:36 UTC
Don't the llvm/clang ports need cmake to build? How would this work if ports llvm/clang becomes a dependency of cmake?
Comment 3 Jan Beich freebsd_committer 2017-12-30 18:14:04 UTC
powerpc* and sparc64 use lang/gcc* as C++11 compiler, so there's no dependency loop.
Comment 4 Adam Weinberger freebsd_committer 2017-12-30 20:04:57 UTC
(In reply to Jan Beich from comment #3)

Uses/compiler.mk is a bit of a black box to me, but it seems possible for USES=compiler:c++11-lang to bring in a dependency on lang/clang34. Am I misunderstanding?
Comment 5 Antoine Brodin freebsd_committer 2017-12-30 20:06:00 UTC
The base compiler on tier-1 archs supports c++11 so an exp-run won't show anything.
Comment 6 Justin Hibbits freebsd_committer 2017-12-30 21:30:33 UTC
(In reply to Adam Weinberger from comment #4)

On gcc archs it'll bring in lang/gcc<version>, currently lang/gcc6.
Comment 7 commit-hook freebsd_committer 2017-12-30 22:31:22 UTC
A commit references this bug:

Author: adridg
Date: Sat Dec 30 22:31:14 UTC 2017
New revision: 457650
URL: https://svnweb.freebsd.org/changeset/ports/457650

  CMake 3.10 uses C++11, which needs to be explicitly enabled for
  Tier-2 architectures.

  PR:		224721
  Reported by:	Justin Hibbits
  Approved by:	tcberner (mentor)

Comment 8 Adriaan de Groot freebsd_committer 2017-12-30 22:44:35 UTC
Justin, please give CMake a stab (if this doesn't do the trick, we'll have to move to compiler:c++11-lib -- I have nothing suitable to test this with, though).
Comment 9 Justin Hibbits freebsd_committer 2017-12-31 15:48:39 UTC
(In reply to Adriaan de Groot from comment #8)

Worked for me!  With a now necessary fix for bug 224720 as well.

Thanks for the quick fix.