Closed riptidewave93 closed 7 years ago
-fno-stack-protector
would have been my guess as well (from searching on the Internet).
ZT uses -fstack-protector in its own Makefile. I assume that it is not properly overwritten. and you need to patch it out of the Makefile or you can first try to edit the Makefile in the ZT build directory somewhere in openwrt/build_dir/ (oder lede/build_dir/)
@mwarning gave it a try, but no success. The command that is failing seems to be the following:
powerpc-openwrt-linux-musl-g++ -Os -pipe -mcpu=464fp -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap /home/riptide_wave/source/build_dir/target-powerpc_464fp_musl-1.1.15/zerotier-1.1.14:zerotier-1.1.14 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/riptide_wave/source/staging_dir/target-powerpc_464fp_musl-1.1.15/usr/include -I/home/riptide_wave/source/staging_dir/target-powerpc_464fp_musl-1.1.15/include -I/home/riptide_wave/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl-1.1.15/usr/include -I/home/riptide_wave/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl-1.1.15/include/fortify -I/home/riptide_wave/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl-1.1.15/include -fno-builtin -nostdinc++ -I/home/riptide_wave/source/staging_dir/target-powerpc_464fp_musl-1.1.15/usr/include/uClibc++ -DGCC_HASCLASSVISIBILITY -Wall -fPIE -fvisibility=hidden -Wall -Wno-unused-result -Wreorder -fPIE -fno-rtti -pthread -DNDEBUG -D_FORTIFY_SOURCE=2 -L/home/riptide_wave/source/staging_dir/target-powerpc_464fp_musl-1.1.15/usr/lib -L/home/riptide_wave/source/staging_dir/target-powerpc_464fp_musl-1.1.15/lib -L/home/riptide_wave/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl-1.1.15/usr/lib -L/home/riptide_wave/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl-1.1.15/lib -znow -zrelro -L/home/riptide_wave/source/staging_dir/target-powerpc_464fp_musl-1.1.15/usr/lib/uClibc++ -pthread -o zerotier-one node/C25519.o node/CertificateOfMembership.o node/Cluster.o node/DeferredPackets.o node/Identity.o node/IncomingPacket.o node/InetAddress.o node/Multicaster.o node/Network.o node/NetworkConfig.o node/Node.o node/OutboundMulticast.o node/Packet.o node/Path.o node/Peer.o node/Poly1305.o node/Salsa20.o node/SelfAwareness.o node/SHA512.o node/Switch.o node/Topology.o node/Utils.o osdep/BackgroundResolver.o osdep/ManagedRoute.o osdep/Http.o osdep/OSUtils.o service/ClusterGeoIpService.o service/ControlPlane.o ext/lz4/lz4.o ext/http-parser/http_parser.o ext/json-parser/json.o service/OneService.o one.o osdep/LinuxEthernetTap.o -fno-builtin -nodefaultlibs -Wl,-Bstatic -luClibc++ -Wl,-Bdynamic -lpthread -lm -lc -lsupc++ -lc -lgcc -lgcc_eh -lgcc_s -lpthread -lm -fno-stack-protector
I even tried with PKG_CC_STACKPROTECTOR_NONE=y being set in my LEDE config (which removes the occurrence of -fstack-protector
in the above cmd), but that had no affect as well.
It also seems the only reverence to stack-protector are at https://github.com/zerotier/ZeroTierOne/blob/830250759cd4c14ca2ae5ddf24f0a0427f258622/make-linux.mk#L109, and 2 lines below as well. Even with these removed or replaced with -fno-stack-protector
the issue continues.
That line contains both -fstack-protector and -fno-stack-protector. Not sure what happens.
Yeah, as mentioned I was able to remove that with PKG_CC_STACKPROTECTOR_NONE=y
being set in my LEDE config, but even then the same issue occurs. :/
The above PR was submitted to resolve the issue.
Great to see that you were able to fix it.
Hello,
First off, thanks for creating this package! I am working on getting this compiled for a LEDE device using the APM821xx target (PPC464 variant), and am hitting a small compile snag. The issue returned is:
I also tried setting
-fno-stack-protector
but had no success.