git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make
Error:
time: tools/mklibs/compile#0.21#0.24#0.46
make[3]: Entering directory '/home/user/openwrt/tools/libressl'
make[3]: Leaving directory '/home/user/openwrt/tools/libressl'
time: tools/libressl/compile#0.32#0.38#0.58
make[3]: Entering directory '/home/user/openwrt/tools/cmake'
(cd /home/user/openwrt/build_dir/host/cmake-3.12.4/; if [ -x configure ]; then cp -fpR /home/user/openwrt/scripts/config.{guess,sub} /home/user/openwrt/build_dir/host/cmake-3.12.4// && CC="gcc" CFLAGS="-O2 -I/home/user/openwrt/staging_dir/host/include " CXX="g++" CPPFLAGS="-I/home/user/openwrt/staging_dir/host/include " LDFLAGS="-L/home/user/openwrt/staging_dir/host/lib " CONFIG_SHELL="/usr/bin/env bash" MAKEFLAGS="" CXXFLAGS="-O2 -I/home/user/openwrt/staging_dir/host/include " bash ./configure --prefix=/home/user/openwrt/staging_dir/host ; fi )
---------------------------------------------
CMake 3.12.4, Copyright 2000-2018 Kitware, Inc. and Contributors
C compiler on this system is: gcc -O2 -I/home/user/openwrt/staging_dir/host/include
C++ compiler on this system is: g++ -O2 -I/home/user/openwrt/staging_dir/host/include
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[4]: Entering directory '/home/user/openwrt/build_dir/host/cmake-3.12.4/Bootstrap.cmk'
make[4]: 'cmake' is up to date.
make[4]: Leaving directory '/home/user/openwrt/build_dir/host/cmake-3.12.4/Bootstrap.cmk'
loading initial cache file /home/user/openwrt/build_dir/host/cmake-3.12.4/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 "/home/user/openwrt/build_dir/host/cmake-3.12.4/CMakeFiles/CMakeOutput.log".
See also "/home/user/openwrt/build_dir/host/cmake-3.12.4/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------
make[3]: *** [Makefile:36: /home/user/openwrt/build_dir/host/cmake-3.12.4/.configured] Error 11
make[3]: Leaving directory '/home/user/openwrt/tools/cmake'
time: tools/cmake/compile#20.42#6.83#26.87
make[2]: *** [tools/Makefile:155: tools/cmake/compile] Error 2
make[2]: Leaving directory '/home/user/openwrt'
make[1]: *** [tools/Makefile:151: /home/user/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyy] Error 2
make[1]: Leaving directory '/home/user/openwrt'
make: *** [/home/user/openwrt/include/toplevel.mk:218: world] Error 2
I have worked around the problem before by reverting patches for tools/cmake back to "ools/cmake: Update to 3.11.0". But now it becomes to much of a problem.
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 8.2.1 20180831 (GCC)
$ gdb -v
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ cmake --version
cmake version 3.12.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
The Arch Linux cmake package definition calls ./bootstrap, but this also gives the same error as ./configure.
The arch package does not seem to apply any patches.
OpenWrt master on alpine:edge compiles for me as well (tested with Docker).
But compiling the openwrt-18.0.6 fails.
OpenWrt master and openwrt-18.0.6 both fail using the alpine:edge docker container (same error).
The debian:jessie Docker image compiles OpenWrt master and openwrt-18.06.
Maybe I get around looking into the cmake problem. I was not able to reproduce it with Docker yet.