我正在尝试在Ubuntu 16.04.4 LTS xenial上引导cmake 3.11.3。
我已经将我的gnu g++编译器升级如下:
> $ g++ --version
g++ (Ubuntu 8.1.0-5ubuntu1~16.04) 8.1.0 Copyright (C) 2018 Free
Software Foundation, Inc. This is free software; see the source for
copying conditions. There is NO warranty; not even for MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
并手动重新指向符号链接:
$ ll /usr/bin/*g++*
lrwxrwxrwx 1 root root 5 Jun 8 16:57 /usr/bin/g++ -> g++-8*
-rwxr-xr-x 1 root root 919832 Apr 24 15:02 /usr/bin/g++-5*
lrwxrwxrwx 1 root root 22 Jun 6 04:26 /usr/bin/g++-8 -> x86_64-linux-gnu-g++-8*
lrwxrwxrwx 1 root root 22 Jun 8 16:58 /usr/bin/x86_64-linux-gnu-g++ -> x86_64-linux-gnu-g++-8*
lrwxrwxrwx 1 root root 5 Apr 24 15:02 /usr/bin/x86_64-linux-gnu-g++-5 -> g++-5*
-rwxr-xr-x 1 root root 1071984 Jun 6 04:26 /usr/bin/x86_64-linux-gnu-g++-8*
但是,我在cmake的配置中得到以下错误:
$ sudo ./bootstrap
---------------------------------------------
CMake 3.11.3, Copyright 2000-2018 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: make
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
make: Warning: File 'Makefile' has modification time 2.3 s in the future
make: 'cmake' is up to date.
make: warning: Clock skew detected. Your build may be incomplete.
loading initial cache file /mnt/ganymede/user/gpeytavi/srv_admin/software/cmake-3.11.3/Bootstrap.cmk/InitialCacheFlags.cmake
CMake Error at CMakeLists.txt:92 (message):
The C++ compiler does not support C++11 (e.g. std::unique_ptr).
-- Configuring incomplete, errors occurred!
See also "/mnt/ganymede/user/gpeytavi/srv_admin/software/cmake-3.11.3/CMakeFiles/CMakeOutput.log".
See also "/mnt/ganymede/user/gpeytavi/srv_admin/software/cmake-3.11.3/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------
知道为什么会出现c++11 std::unique_ptr
不兼容的错误吗?
发布于 2020-03-24 12:12:54
在我的例子中,这个问题是因为我的CMake源代码所在的文件夹在一个挂载目录中(实际上我的整个rootfs都是通过NFS挂载的),所以我在“mount”命令输出中选择了“/run/user/1000”位置作为本地位置,因为这是使用tmpfs挂载的,并将我的CMake源代码移到了这个位置。这样,./bootstrap && make && sudo make install就成功执行了。
发布于 2021-05-29 06:05:09
我通过在构建机器和NFS文件服务器上运行ntpd来确保两者同步,从而解决了这个问题。
发布于 2021-11-30 07:32:57
对我来说,这是时钟偏差。我使用以下命令:
date -s "2021-11-30 15:08:21"
将服务器的时间设置为now。然后它就能工作了,谢谢...
https://stackoverflow.com/questions/50764046
复制相似问题