【发布时间】:2020-01-20 08:29:32
【问题描述】:
要安装 charmm 程序,我必须安装 CMake,但是它不会安装 CMake。
[sohyeon@theochem11 cmake-3.15.3]$ ./bootstrap
---------------------------------------------
CMake 3.15.3, Copyright 2000-2019 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc
---------------------------------------------
Error when bootstrapping CMake:
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.
The C++ flags are "".
They can be changed using the environment variable CXXFLAGS.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /export/home/sohyeon/cmake-3.15.3/Bootstrap.cmk/cmake_bootstrap.log
所以我尝试了那个脚本
[sohyeon@theochem11 cmake-3.15.3]$ env CC=cc CXX=CC ./bootstrap
但还是出现同样的错误。
我在谷歌搜索了其他方式。我找到了这两种方法。
$ yum -y install gcc-c++
You need to be root to perform this command.
$ yum install gcc-c++.x86_64
You need to be root to perform this command.
但这并不能解决我的问题。
(而且我看到了 cmake_bootstrap.log 但我不知道出了什么问题。)
(编辑) 谢谢你们!
操作系统版本:Linux theochem11.hpc.org 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[sohyeon@theochem11 cmake-3.15.3]$ gcc --version gcc (GCC) 4.4.6 20120305 (红帽 4.4.6-4) 版权所有 (C) 2010 Free Software Foundation, Inc. 这是免费软件;查看复制条件的来源。没有 保修单;甚至不是为了适销性或特定用途的适用性。
[sohyeon@theochem11 cmake-3.15.3]$ g++ --version g++ (GCC) 4.4.6 20120305 (红帽 4.4.6-4) 版权所有 (C) 2010 Free Software Foundation, Inc. 这是免费软件;查看复制条件的来源。没有 保修单;甚至不是为了适销性或特定用途的适用性。
【问题讨论】:
-
询问您的系统管理员安装了哪些开发工具(至少 cmake 和 clang/g++)(如果有)以及如何将它们纳入范围。也许它就像以某种方式更新您的
$PATH变量一样简单。 -
»» 找不到同时支持 C++11 和指定 C++ 标志的 C++ 编译器««:请编辑您的问题以包括操作系统名称和版本、gcc/g++ 版本。然后您将获得有关可以构建 Cmake 的 gcc 版本的信息。