mwarning / zerotier-openwrt

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

Compile failure with ZT 1.1.0 #5

Closed mwarning closed 8 years ago

mwarning commented 9 years ago
mips-openwrt-linux-uclibc-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16  -I/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/media/daten/openwrt_zt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/media/daten/openwrt_zt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include  -fno-builtin -nostdinc++ -I/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include/uClibc++ -DGCC_HASCLASSVISIBILITY -Wall -fPIE -fvisibility=hidden    -c -o node/Peer.o node/Peer.cpp
In file included from node/Peer.hpp:35:0,
                 from node/Peer.cpp:31:
/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include/uClibc++/algorithm: In instantiation of 'void std::sort(RandomAccessIterator, RandomAccessIterator, Compare) [with RandomAccessIterator = ZeroTier::Path*; Compare = ZeroTier::_SortPathsByQuality]':
node/Peer.cpp:526:70:   required from here
/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include/uClibc++/algorithm:836:32: error: 'stable_sort' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   stable_sort(first, last, comp);
                                ^
/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include/uClibc++/algorithm:847:8: note: 'template<class RandomAccessIterator, class Compare> void std::stable_sort(RandomAccessIterator, RandomAccessIterator, Compare)' declared here, later in the translation unit
   void stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp)
        ^
<builtin>: recipe for target 'node/Peer.o' failed
make[4]: *** [node/Peer.o] Error 1
make[4]: Leaving directory '/media/daten/openwrt_zt/build_dir/target-mips_34kc_uClibc-0.9.33.2/zerotier-1.1.0'
Makefile:87: recipe for target '/media/daten/openwrt_zt/build_dir/target-mips_34kc_uClibc-0.9.33.2/zerotier-1.1.0/.built' failed
make[3]: *** [/media/daten/openwrt_zt/build_dir/target-mips_34kc_uClibc-0.9.33.2/zerotier-1.1.0/.built] Error 2
make[3]: Leaving directory '/media/daten/openwrt_zt/package/zerotier'
package/Makefile:191: recipe for target 'package/zerotier/compile' failed
make[2]: *** [package/zerotier/compile] Error 2
make[2]: Leaving directory '/media/daten/openwrt_zt'
package/Makefile:188: recipe for target '/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile' failed
make[1]: *** [/media/daten/openwrt_zt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory '/media/daten/openwrt_zt'
/media/daten/openwrt_zt/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2
mwarning commented 9 years ago

Ok, the problem seems to be that uClibc++ references sortstable_sort in its include/algorithm file. Moving the two sort() functions behind stable_sort() fixes the problem.

nick-gold commented 8 years ago

I have this same build error, but I do not understand your fix. Could you provide some additional direction?

a2940uw commented 8 years ago

Finally I still get failure to compile module by myself, and I just download the pre-compiled binary ipk file from mwarning ( https://github.com/mwarning/zerotier-openwrt/releases ) but I found the the members ID will change for every time the openwrt device rebooted, I need to re-join and make a new permit and remove the old client every time after reboot.

mwarning commented 8 years ago

I will have a look.

mwarning commented 8 years ago

@nick-gold please try to build ZT again. It might work now.

mwarning commented 8 years ago

@a2940uw could you make a new ticket please? I do not understand what you mean with making a new permit, members ID, removing the old client. Assume me being stupid. ;-)

nick-gold commented 8 years ago

The issue seems to be resolved. I have successfully built. Thanks.

mwarning commented 8 years ago

alright!