mwarning / zerotier-openwrt

A OpenWrt package for ZeroTier One - Pull requests are welcome!
672 stars 140 forks source link

SDK cross-compilation error, how to solve this #42

Closed ghost closed 5 years ago

ghost commented 5 years ago

bbb@Bin-Ubuntu:~/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2$ make package/feeds/zerotier/zerotier/compile V=99 /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/host/bin/find: package/OpenWrt-Toolchain-ramips-for-mipsel_24kec+dsp-gcc-4.8-linaro_uClibc-0.9.33.2/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/mipsel-openwrt-linux-uclibc/lib/lib': Too many levels of symbolic links /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/host/bin/find:package/OpenWrt-Toolchain-ramips-for-mipsel_24kec+dsp-gcc-4.8-linaro_uClibc-0.9.33.2/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib64/lib': Too many levels of symbolic links /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/host/bin/find: package/OpenWrt-Toolchain-ramips-for-mipsel_24kec+dsp-gcc-4.8-linaro_uClibc-0.9.33.2/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/mipsel-openwrt-linux/lib/lib': Too many levels of symbolic links /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/host/bin/find:package/OpenWrt-Toolchain-ramips-for-mipsel_24kec+dsp-gcc-4.8-linaro_uClibc-0.9.33.2/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib32/lib': Too many levels of symbolic links /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/host/bin/find: `package/OpenWrt-Toolchain-ramips-for-mipsel_24kec+dsp-gcc-4.8-linaro_uClibc-0.9.33.2/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib/lib': Too many levels of symbolic links Config-build.in:4451:warning: defaults for choice values not supported #

configuration written to .config

# make[1]: Entering directory '/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2' make[2]: Entering directory '/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/feeds/zerotier/zerotier' CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -ffunction-sections -fdata-sections -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -ffunction-sections -fdata-sections -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -L/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lib -L/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib -Wl,--gc-sections " make -C /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ZeroTierOne-1.2.12/. AR=mipsel-openwrt-linux-uclibc-ar AS="ccache_cc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -ffunction-sections -fdata-sections" LD=mipsel-openwrt-linux-uclibc-ld NM=mipsel-openwrt-linux-uclibc-nm CC="ccache_cc" GCC="ccache_cc" CXX="ccache_cxx" RANLIB=mipsel-openwrt-linux-uclibc-ranlib STRIP=mipsel-openwrt-linux-uclibc-strip OBJCOPY=mipsel-openwrt-linux-uclibc-objcopy OBJDUMP=mipsel-openwrt-linux-uclibc-objdump SIZE=mipsel-openwrt-linux-uclibc-size CROSS="mipsel-openwrt-linux-uclibc-" ARCH="mipsel" DEFS="" one; make[3]: Entering directory '/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ZeroTierOne-1.2.12' ccache_cxx -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -ffunction-sections -fdata-sections -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include -Wall -Wno-deprecated -std=c++11 -pthread -DNDEBUG -DZT_USE_MINIUPNPC -DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR -DZT_NO_TYPE_PUNNING -DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=5 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -D_MT_ALLOCATOR_H -D_POOL_ALLOCATOR_H -D_EXTPTR_ALLOCATOR_H -D_DEBUG_ALLOCATOR_H -c -o controller/EmbeddedNetworkController.o controller/EmbeddedNetworkController.cpp In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp:67:10: error: #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"

error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"

      ^

controller/../osdep/../ext/json/json.hpp: In static member function 'static std::string nlohmann::detail::exception::name(const string&, int)': controller/../osdep/../ext/json/json.hpp:217:51: error: 'to_string' is not a member of 'std' return "[json.exception." + ename + "." + std::tostring(id) + "] "; ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In static member function 'static nlohmann::detail::parse_error nlohmann::detail::parse_error::create(int, std::size_t, const string&)': controller/../osdep/../ext/json/json.hpp:282:49: error: 'tostring' is not a member of 'std' (byte != 0 ? (" at " + std::tostring(byte)) : "") + ^ controller/../osdep/../ext/json/json.hpp: In static member function 'static void nlohmann::detail::lexer::strtof(float&, const char*, char)': controller/../osdep/../ext/json/json.hpp:2265:13: error: 'strtof' is not a member of 'std' f = std::strtof(str, endptr); ^ controller/../osdep/../ext/json/json.hpp:2265:13: note: suggested alternative: In file included from controller/EmbeddedNetworkController.cpp:21:0: /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include/stdlib.h:187:14: note: 'strtof' extern float strtof (const char *restrict __nptr, ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In static member function 'static void nlohmann::detail::lexer::strtof(long double&, const char*, char)': controller/../osdep/../ext/json/json.hpp:2275:13: error: 'strtold' is not a member of 'std' f = std::strtold(str, endptr); ^ controller/../osdep/../ext/json/json.hpp:2275:13: note: suggested alternative: In file included from controller/EmbeddedNetworkController.cpp:21:0: /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include/stdlib.h:190:20: note: 'strtold' extern long double strtold (const char *restrict nptr, ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In member function 'nlohmann::detail::lexer::token_type nlohmann::detail::lexer::scan_number()': controller/../osdep/../ext/json/json.hpp:2604:28: error: 'strtoull' is not a member of 'std' const auto x = std::strtoull(yytext.data(), &endptr, 10); ^ controller/../osdep/../ext/json/json.hpp:2604:28: note: suggested alternative: In file included from controller/EmbeddedNetworkController.cpp:21:0: /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include/stdlib.h:232:31: note: 'strtoull' extern unsigned long long int strtoull (const char restrict nptr, ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp:2620:28: error: 'strtoll' is not a member of 'std' const auto x = std::strtoll(yytext.data(), &endptr, 10); ^ controller/../osdep/../ext/json/json.hpp:2620:28: note: suggested alternative: In file included from controller/EmbeddedNetworkController.cpp:21:0: /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include/stdlib.h:227:22: note: 'strtoll' extern long long int strtoll (__const char restrict nptr, ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In member function 'std::string nlohmann::detail::iteration_proxy::iteration_proxy_internal::key() const': controller/../osdep/../ext/json/json.hpp:4226:28: error: 'to_string' is not a member of 'std' return std::to_string(array_index); ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In static member function 'static void nlohmann::detail::serializer::throw_if_invalid_utf8(const string&)': controller/../osdep/../ext/json/json.hpp:6803:85: error: 'to_string' is not a member of 'std' JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str())); ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In static member function 'static int nlohmann::json_pointer::array_index(const string&)': controller/../osdep/../ext/json/json.hpp:7025:25: error: 'stoi' is not a member of 'std' const int res = std::stoi(s, &processed_chars); ^ controller/../osdep/../ext/json/json.hpp: In static member function 'static nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::meta()': controller/../osdep/../ext/json/json.hpp:7542:62: error: 'to_string' is not a member of 'std' result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(GNUC) + "." + std::to_string(GNUC_MINOR__) + "." + std::to_string(GNUC_PATCHLEVEL)}}; ^ controller/../osdep/../ext/json/json.hpp:7542:95: error: 'to_string' is not a member of 'std' result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(GNUC) + "." + std::to_string(__GNUC_MINOR) + "." + std::to_string(GNUC_PATCHLEVEL)}}; ^ controller/../osdep/../ext/json/json.hpp:7542:134: error: 'to_string' is not a member of 'std' result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(GNUC__) + "." + std::to_string(GNUC_MINOR) + "." + std::to_string(__GNUC_PATCHLEVEL)}}; ^ controller/../osdep/../ext/json/json.hpp:7558:37: error: 'to_string' is not a member of 'std' result["compiler"]["c++"] = std::to_string(__cplusplus); ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In member function 'nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::value_type& nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::at(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::size_type)': controller/../osdep/../ext/json/json.hpp:9991:71: error: 'to_string' is not a member of 'std' JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

controller/../osdep/../ext/json/json.hpp: In member function 'const value_type& nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::at(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::size_type) const': controller/../osdep/../ext/json/json.hpp:10038:71: error: 'to_string' is not a member of 'std' JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

controller/../osdep/../ext/json/json.hpp: In member function 'void nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::erase(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::size_type)': controller/../osdep/../ext/json/json.hpp:10927:71: error: 'to_string' is not a member of 'std' JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

controller/../osdep/../ext/json/json.hpp: In lambda function: controller/../osdep/../ext/json/json.hpp:14009:87: error: 'to_string' is not a member of 'std' JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In static member function 'static nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::diff(const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, const string&)': controller/../osdep/../ext/json/json.hpp:14255:82: error: 'to_string' is not a member of 'std' auto temp_diff = diff(source[i], target[i], path + "/" + std::to_string(i)); ^ controller/../osdep/../ext/json/json.hpp:14272:51: error: 'to_string' is not a member of 'std' {"path", path + "/" + std::to_string(i)} ^ controller/../osdep/../ext/json/json.hpp:14283:51: error: 'to_string' is not a member of 'std' {"path", path + "/" + std::to_string(i)}, ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In member function 'nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>& nlohmann::json_pointer::get_checked(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>*) const': controller/../osdep/../ext/json/json.hpp:14527:83: error: 'to_string' is not a member of 'std' "array index '-' (" + std::to_string(ptr->m_value.array->size()) + ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

controller/../osdep/../ext/json/json.hpp: In member function 'const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>& nlohmann::json_pointer::get_unchecked(const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>*) const': controller/../osdep/../ext/json/json.hpp:14581:83: error: 'to_string' is not a member of 'std' "array index '-' (" + std::to_string(ptr->m_value.array->size()) + ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

controller/../osdep/../ext/json/json.hpp: In member function 'const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>& nlohmann::json_pointer::get_checked(const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>*) const': controller/../osdep/../ext/json/json.hpp:14636:83: error: 'to_string' is not a member of 'std' "array index '-' (" + std::to_string(ptr->m_value.array->size()) + ^ controller/../osdep/../ext/json/json.hpp:94:41: note: in definition of macro 'JSON_THROW'

define JSON_THROW(exception) throw exception

                                     ^

In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In static member function 'static void nlohmann::json_pointer::flatten(const string&, const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&)': controller/../osdep/../ext/json/json.hpp:14687:54: error: 'to_string' is not a member of 'std' flatten(reference_string + "/" + std::to_string(i), ^ In file included from controller/../osdep/OSUtils.hpp:58:0, from controller/EmbeddedNetworkController.hpp:39, from controller/EmbeddedNetworkController.cpp:40: controller/../osdep/../ext/json/json.hpp: In static member function 'static std::string nlohmann::detail::exception::name(const string&, int)': controller/../osdep/../ext/json/json.hpp:218:5: warning: control reaches end of non-void function [-Wreturn-type] } ^

: recipe for target 'controller/EmbeddedNetworkController.o' failed make[3]: *** [controller/EmbeddedNetworkController.o] Error 1 make[3]: Leaving directory '/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ZeroTierOne-1.2.12' Makefile:72: recipe for target '/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ZeroTierOne-1.2.12/.built' failed make[2]: *** [/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ZeroTierOne-1.2.12/.built] Error 2 make[2]: Leaving directory '/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/feeds/zerotier/zerotier' package/Makefile:173: recipe for target 'package/feeds/zerotier/zerotier/compile' failed make[1]: *** [package/feeds/zerotier/zerotier/compile] Error 2 make[1]: Leaving directory '/home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2' /home/bbb/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/include/toplevel.mk:164: recipe for target 'package/feeds/zerotier/zerotier/compile' failed make: *** [package/feeds/zerotier/zerotier/compile] Error 2
mwarning commented 5 years ago

What were the steps you do to get to this error?

Btw.: Use triple grave accent characters to frame your console output. Otherwise the output is hard to read.

ghost commented 5 years ago

Hello, can you speak Chinese? I don't know English, it's not convenient to communicate.

ghost commented 5 years ago

Hello, can you speak Chinese? I don't know English, it's not convenient to communicate.

mwarning commented 5 years ago

Sorry, I do not speak Chinese. How can I reproduce the error message? What are all the commands to enter into the console?

ghost commented 5 years ago

I cross-compile with the OpenWRT14.07 SDK, add the src link to feeds.conf.default, run scripts/feeds update -f zerotier scripts/feeds install -a -p zerotier and enter make package/feeds/zerotier/zerotier/compile V=99. This error occurred.

mwarning commented 5 years ago

OpenWrt 14.07 is really old and this probably does not work. Try OpenWrt 18.06. ZeroTier is already in the default feed for that version.

ghost commented 5 years ago

My router officially only developed version 14.07, no way. But I want to use your zerotier。Is there a way to compile?

mwarning commented 5 years ago

hm, what device do you have? (router model)

ghost commented 5 years ago

My router is PHICOMM K2P A1.I use the GoCloud firmware, MT7620A model. Of course I can brush other firmware, but only this firmware meets my needs, if I can use your zerotier it is more perfect.

ghost commented 5 years ago

My router is PHICOMM K2P A1.I use the GoCloud firmware, MT7620A model. Of course I can brush other firmware, but only this firmware meets my needs, if I can use your zerotier it is more perfect.

ghost commented 5 years ago

However, GoCloud firmware is based on 14.07 development.

mwarning commented 5 years ago

hm, maybe compile the OpenWrt yourself. This will also create a package as a byproduct you might be able to use:

sudo apt-get install git subversion g++ libncurses5-dev gawk zlib1g-dev build-essential

git clone git://git.openwrt.org/14.07/openwrt.git
cd openwrt

./scripts/feeds update -a
./scripts/feeds install -a

make menuconfig
ghost commented 5 years ago

However, there is still no zerotier in feeds of 14.07, what should I do, I need zerotier. I required zerotier of the MT7620a.can you help me?

mwarning commented 5 years ago

For the record, this was successful:

wget https://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt7620/openwrt-sdk-18.06.1-ramips-mt7620_gcc-7.3.0_musl.Linux-x86_64.tar.xz
tar -xvf openwrt-sdk-18.06.1-ramips-mt7620_gcc-7.3.0_musl.Linux-x86_64.tar.xz
cd openwrt-sdk-18.06.1-ramips-mt7620_gcc-7.3.0_musl.Linux-x86_64/
LC_ALL=C ./scripts/feeds update
LC_ALL=C ./scripts/feeds install zerotier
make package/zerotier/compile
mwarning commented 5 years ago

@bin000000 do you have a link to the SDK you use?

ghost commented 5 years ago

I have an sdk in my link.However, the ipk compiled in version 18.06 cannot be used in barrier_breaker14.07. installation failed.

mwarning commented 5 years ago

Can you give me the link to the SDK. So I can give it a try..

ghost commented 5 years ago

Sorry, I will not use Github, can I leave an email address for me? I send it to you.

mwarning commented 5 years ago

nevermind, I think I've found it http://archive.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2

ghost commented 5 years ago

Yes, it is this. thank you very much! I hope to hear your good news.

mwarning commented 5 years ago

I did not succeed in compiling the package. But it looks like your device is still supported with 18.06.1. https://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt7621/openwrt-18.06.1-ramips-mt7621-k2p-squashfs-sysupgrade.bin

ghost commented 5 years ago

Yes, my device can support 18.06.1. But I want to use GoCloud firmware, which has the unique features I need. So now I want to add zerotier to this firmware to be perfect. I don't want to use other firmware. Is there a way to fulfill my wish?

ghost commented 5 years ago

I just want to use GoCloud firmware and don't want to use other firmware. But the GoCloud firmware is compiled based on 14.07. Is there a way to compile a zerotier for MT7628a for 14.07?

ghost commented 5 years ago

I just want to use GoCloud firmware and don't want to use other firmware. But the GoCloud firmware is compiled based on 14.07. Is there a way to compile a zerotier for MT7620a for 14.07?

mwarning commented 5 years ago

I do not think this is possible without much effort.

ghost commented 5 years ago

Ok, I think about it again, thank you.