-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add support for miniupnpc 2.2.8 #2453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Some packages like for OpenWrt use the native miniupnpc library that is not API compatible with the one included in ZeroTier.
thank you mwarning! |
This is what the original problem: openwrt/openwrt#18019 |
I'm curious how you're building it. miniupnp is part of our normal build process and statically linked into the binary. So unless you're doing something in the OpenWRT build process to remove that completely from the build and include paths, I can definitely see something funky happening. The actual results aren't what I would expect though 🤔 |
@glimberg yes,on OpenWrt we dynamicly link in the system miniupnpc library. It was originally done to save space to support 4mb flash devices. But after ZT uses more advanced C++ features and linking to uclibcxx was not possible anymore, this became less relevant, as libstdc++ needs to be linked now and it is rather huge compared to uclibcxx. |
@mwarning: Can you check the CLA? It will be nice to fix it. Thanks in advance. Linked to:
|
I know how this happened.
This is the generated g++ command: ccache aarch64-openwrt-linux-musl-g++ -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -ffile-prefix-map=/mnt/data/build/istoreos-build/24.10/armsr/openwrt/build_dir/target-aarch64_generic_musl/ZeroTierOne-1.14.1=ZeroTierOne-1.14.1 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -ffunction-sections -fdata-sections \
-I/mnt/data/build/istoreos-build/24.10/armsr/openwrt/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/usr/include \
-I/mnt/data/build/istoreos-build/24.10/armsr/openwrt/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/include -I/mnt/data/build/istoreos-build/24.10/armsr/openwrt/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/include/fortify -Wall -Wno-deprecated -std=c++17 -pthread \
-Irustybits/target \
-isystem ext \
-Iext/prometheus-cpp-lite-1.0/core/include -Iext-prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include -Iext/prometheus-cpp-lite-1.0/simpleapi/include -DNDEBUG -DZT_USE_MINIUPNPC \
-DZT_USE_SYSTEM_MINIUPNPC \
-DZT_USE_SYSTEM_NATPMP -DZT_NO_TYPE_PUNNING -DZT_ARCH_ARM_HAS_NEON -march=armv8-a+crypto -mtune=generic -mstrict-align -DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=4 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -D_MT_ALLOCATOR_H -D_POOL_ALLOCATOR_H -D_EXTPTR_ALLOCATOR_H -D_DEBUG_ALLOCATOR_H -c -o osdep/PortMapper.o osdep/PortMapper.cpp
zerotier use own Archlinux workaround this by simply |
Dear @zerotier members, @glimberg, @laduke, @joseph-henry: Any progress on this PR? |
@Neustradamus We don't manage the build for OpenWRT. If someone comes up with a PR that doesn't break our build distributions and fixes issues over there, we'll happily merge it. |
@glimberg What about syncing and using an up-to-date miniupnc version instead of shipping an outdated bundled library? 🤔 BTW: It is not about OpenWrt; it happens also on other GNU/Linux distros. |
Some packages like for OpenWrt use the native miniupnpc library that is not API compatible with the one included in ZeroTier.
From OpenWrt downstream: openwrt/packages#26088