toolchain编译问题请教 #9529
Replies: 5 comments
-
补充一下,用这个编译链编译的supernode是可以正常工作的,但是edge不行 |
Beta Was this translation helpful? Give feedback.
-
再次补充,supernode和edge二进制文件如下 |
Beta Was this translation helpful? Give feedback.
-
谢了,加了那两行防止重复定义。我总算是编译出来了。 |
Beta Was this translation helpful? Give feedback.
-
补充,supernode和edge二进制文件如下 |
Beta Was this translation helpful? Give feedback.
-
补充,放弃用toolchain编译了,改用静态编译。虽然文件大了很多。但是能用 |
Beta Was this translation helpful? Give feedback.
-
我想使用支持ipv6的n2n,所以尝试编译 => https://github.com/mxre/n2n
我使用的是自己编译的r4s sdk,除了选择了 libcap(2.63),其他都没动
由于水平有限,没有打包成package编译,用的是toolchain。
环境变量:
export STAGING_DIR='/home/fjr/lede/staging_dir/target-aarch64_generic_musl/'
set(tools /home/fjr/lede/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/bin)
set(CMAKE_C_COMPILER ${tools}/aarch64-openwrt-linux-gcc)
set(CMAKE_CXX_COMPILER ${tools}/aarch64-openwrt-linux-g++)
编译时会报错(x86 ubuntu无此错误):
In file included from /home/fjr/n2n-2.3-beta/n2n.h:80, from /home/fjr/n2n-2.3-beta/n2n.c:24: /home/fjr/lede/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/linux/prctl.h:134:8: error: redefinition of 'struct prctl_mm_map' struct prctl_mm_map { ^~~~~~~~~~~~ In file included from /home/fjr/n2n-2.3-beta/n2n.h:76, from /home/fjr/n2n-2.3-beta/n2n.c:24: /home/fjr/lede/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/sys/prctl.h:88:8: note: originally defined here struct prctl_mm_map { ^~~~~~~~~~~~
因此在/home/fjr/lede/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/linux/prctl.h:134 加了两行防止重复定义
然后就可以顺利编译成功
但是scp传到openwrt后发现无法运行,报如下错误(顺便贴上ldd)
怀疑是libcap版本不对(r68s是2.4.3,我的toolchain是2.6.3),因此我升级了r68s的libcap和libcap-bin,但问题依旧
目前有两个请求,
1、最好能帮助我解决这个问题
2、我想知道用r4s的sdk编译成功的可执行文件能不能再r4s运行?
Beta Was this translation helpful? Give feedback.
All reactions