gpt4 book ai didi

c++ - C++ 编译器不支持 C++11(例如 std::unique_ptr)。构建 OpenWRT

转载 作者:太空宇宙 更新时间:2023-11-04 12:37:26 25 4
gpt4 key购买 nike

我正在使用说明 herehere在 ubuntu 中构建 OpenWRT 但我得到:

make[4]: Entering directory '~/openwrt/build_dir/host/cmake-3.11.1/Bootstrap.cmk'
make[4]: 'cmake' is up to date.
make[4]: Leaving directory '~/openwrt/build_dir/host/cmake-3.11.1/Bootstrap.cmk'
loading initial cache file ~/openwrt/build_dir/host/cmake-3.11.1/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!

有一个类似问题的解决方案here ,但是我不清楚哪个 CMakeLists.txt 文件是我的“根”。在 OpenWRT 论坛(或一般的搜索引擎)上没有看到太多关于此失败的信息。

我的印象是 CMake 安装是由 OpenWRT 构建器本身下载的,因为我没有安装 CMake,安装 cmake 没有解决任何问题。

尝试查看最新的 OpenWRT v18.06.2。当构建失败时,我删除了克隆的目录并尝试了 v18.06.0-rc2。没有任何改善。

也试过

export CMAKE_CXX_STANDARD=11

在运行'make'之前...它没有解决问题。

我的 g++ 安装状态:

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-27ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)

好吧,那 5 个小时我就没主意了。这可能是开发端的配置错误或错误吗?

如果配置错误,可能设置错了什么?

最佳答案

我把我的解决方案贴在这里,这样有人可能会得到我的提示(或者因为这个原因可能不会)

在搜索了数百万页之后,人们只谈论为什么而不是如何,我的解决方案很简单:

已将 cmake 源代码复制到我的系统驱动器。如果你在远程硬盘驱动器上制作 cmake,它会像上面一样失败和错误

关于c++ - C++ 编译器不支持 C++11(例如 std::unique_ptr)。构建 OpenWRT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55772725/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com