Openwrt-NetKeeper icon indicating copy to clipboard operation
Openwrt-NetKeeper copied to clipboard

x86 64位 pppd版本2.4.8的插件,需要自取

Open misterplus opened this issue 4 years ago • 8 comments

因为朋友需要编译的

链接:https://pan.baidu.com/s/1buuc0GGD9rPKs7qCKDDhmw 提取码:l6yb

misterplus avatar Sep 29 '20 12:09 misterplus

我就是你说的那个朋友

ChristianSwift avatar Oct 09 '20 13:10 ChristianSwift

我就是你说的那个朋友

草,朋友的朋友

misterplus avatar Oct 09 '20 15:10 misterplus

草,我是arm的pppd版本2.4.8,原来的插件没法用了,楼主能不能帮个忙

wse320 avatar Apr 10 '21 04:04 wse320

您好,我在执行make all操作时遇到问题但是我实在没有办法解决,能不能请教一下编译中的细节,网上实在没什么资料可以参考

我使用的rockchip的openwrt21.0.2 sdk 我的makefile设置是这样的,我只保留了all中杭州的部分,未修改all中内容的时候也有一样的报错

#TODO:填写解压的Toolchain中bin与include所在的目录(根目录),某些奇葩可能用的是glibc,这里可能要替换LIBC LOCATION=../../openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl #TODO:请注意不同型号(mips/mipsel)路由器此处gcc文件名可能略有不同 CC=$(LOCATION)/bin/aarch64-openwrt-linux-gcc #TODO:可能需要修改pppd的版本,取决于路由器的/usr/lib/pppd/,目前主流的14.09是2.4.7 PPPD_VER=2.4.8 CFLAGS=-Os -Werror -I$(LOCATION)/include -fPIC -DPPPOE_VER='"${PPPD_VER}"'

这是我执行make all时的反馈信息

$ make all aarch64-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined In file included from /usr/include/bits/types/time_t.h:4, from /usr/include/net/ppp_defs.h:4, from pppd.h:57, from sxplugin.c:6: /usr/include/bits/types.h:139:3: error: #error

error

^~~~~ In file included from /usr/include/bits/types/time_t.h:4, from /usr/include/net/ppp_defs.h:4, from pppd.h:57, from sxplugin.c:6: /usr/include/bits/types.h:145:1: error: unknown type name '__STD_TYPE' __STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. / ^~~~~~~~~~ /usr/include/bits/types.h:145:25: error: expected '=', ',', ';', 'asm' or 'attribute' before '__dev_t' __STD_TYPE __DEV_T_TYPE __dev_t; / Type of device numbers. / ^~~~~~~ /usr/include/bits/types.h:146:11: error: expected ';' before 'unsigned' __STD_TYPE __UID_T_TYPE __uid_t; / Type of user identifications. / ^ ; In file included from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/features.h:46, from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/stdio.h:8, from sxplugin.c:1: /usr/include/bits/types.h:146:25: error: 'uid_t' redeclared as different kind of symbol __STD_TYPE __UID_T_TYPE __uid_t; / Type of user identifications. / ^~~~~~~ In file included from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/sys/types.h:57, from pppd.h:55, from sxplugin.c:6: /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/bits/alltypes.h:289:18: note: previous declaration of 'uid_t' was here typedef unsigned uid_t; ^~~~~ In file included from /usr/include/bits/types/time_t.h:4, from /usr/include/net/ppp_defs.h:4, from pppd.h:57, from sxplugin.c:6: /usr/include/bits/types.h:147:11: error: expected ';' before 'unsigned' __STD_TYPE __GID_T_TYPE __gid_t; / Type of group identifications. / ^ ; In file included from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/features.h:46, from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/stdio.h:8, from sxplugin.c:1: /usr/include/bits/types.h:147:25: error: 'gid_t' redeclared as different kind of symbol __STD_TYPE __GID_T_TYPE __gid_t; / Type of group identifications. / ^~~~~~~ In file included from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/sys/types.h:57, from pppd.h:55, from sxplugin.c:6: /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/bits/alltypes.h:294:18: note: previous declaration of 'gid_t' was here typedef unsigned gid_t; ^~~~~ In file included from /usr/include/bits/types/time_t.h:4, from /usr/include/net/ppp_defs.h:4, from pppd.h:57, from sxplugin.c:6: /usr/include/bits/types.h:148:11: error: expected ';' before 'unsigned' __STD_TYPE __INO_T_TYPE __ino_t; / Type of file serial numbers. / ^ ; /usr/include/bits/types.h:149:1: error: unknown type name '__STD_TYPE' __STD_TYPE __INO64_T_TYPE __ino64_t; / Type of file serial numbers (LFS)./ ^~~~~~~~~~ /usr/include/bits/types.h:149:27: error: expected '=', ',', ';', 'asm' or 'attribute' before '__ino64_t' __STD_TYPE __INO64_T_TYPE __ino64_t; / Type of file serial numbers (LFS)./ ^~~~~~~~~ /usr/include/bits/types.h:150:11: error: expected ';' before 'unsigned' __STD_TYPE __MODE_T_TYPE __mode_t; / Type of file attribute bitmasks. / ^ ; /usr/include/bits/types.h:151:1: error: unknown type name '__STD_TYPE' __STD_TYPE __NLINK_T_TYPE __nlink_t; / Type of file link counts. / ^~~~~~~~~~ /usr/include/bits/types.h:151:27: error: expected '=', ',', ';', 'asm' or 'attribute' before '__nlink_t' __STD_TYPE __NLINK_T_TYPE __nlink_t; / Type of file link counts. / ^~~~~~~~~ /usr/include/bits/types.h:152:11: error: expected ';' before 'long' __STD_TYPE __OFF_T_TYPE __off_t; / Type of file sizes and offsets. / ^ ; /usr/include/bits/types.h:153:1: error: unknown type name '__STD_TYPE' __STD_TYPE __OFF64_T_TYPE __off64_t; / Type of file sizes and offsets (LFS). / ^~~~~~~~~~ In file included from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/features.h:46, from /home/nnk/openwrt-sdk-21.02.0-rockchip-armv8_gcc-8.4.0_musl.Linux-x86_64/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/include/stdio.h:8, from sxplugin.c:1: /usr/include/bits/types.h:153:27: error: expected ';' before 'off_t' __STD_TYPE __OFF64_T_TYPE __off64_t; / Type of file sizes and offsets (LFS). / ^~~~~~~~~ In file included from /usr/include/bits/types/time_t.h:4, from /usr/include/net/ppp_defs.h:4, from pppd.h:57, from sxplugin.c:6: /usr/include/bits/types.h:154:11: error: expected ';' before 'int' __STD_TYPE __PID_T_TYPE __pid_t; / Type of process identifications. / ^ ; /usr/include/bits/types.h:155:11: error: expected ';' before 'struct' __STD_TYPE __FSID_T_TYPE __fsid_t; / Type of file system IDs. / ^ ; /usr/include/bits/types.h:156:11: error: expected ';' before 'long' __STD_TYPE __CLOCK_T_TYPE __clock_t; / Type of CPU usage counts. / ^ ; /usr/include/bits/types.h:157:11: error: expected ';' before 'unsigned' __STD_TYPE __RLIM_T_TYPE __rlim_t; / Type for resource measurement. / ^ ; /usr/include/bits/types.h:158:1: error: unknown type name '__STD_TYPE' __STD_TYPE __RLIM64_T_TYPE __rlim64_t; / Type for resource measurement (LFS). / ^~~~~~~~~~ /usr/include/bits/types.h:158:28: error: expected '=', ',', ';', 'asm' or 'attribute' before '__rlim64_t' __STD_TYPE __RLIM64_T_TYPE __rlim64_t; / Type for resource measurement (LFS). / ^~~~~~~~~~ /usr/include/bits/types.h:159:11: error: expected ';' before 'unsigned' __STD_TYPE __ID_T_TYPE __id_t; / General type for IDs. / ^ ; /usr/include/bits/types.h:160:11: error: expected ';' before 'long' __STD_TYPE __TIME_T_TYPE __time_t; / Seconds since the Epoch. / ^ ; /usr/include/bits/types.h:161:11: error: expected ';' before 'unsigned' __STD_TYPE __USECONDS_T_TYPE __useconds_t; / Count of microseconds. / ^ ; /usr/include/bits/types.h:162:11: error: expected ';' before 'long' __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; / Signed count of microseconds. / ^ ; /usr/include/bits/types.h:164:11: error: expected ';' before 'int' __STD_TYPE __DADDR_T_TYPE __daddr_t; / The type of a disk address. / ^ ; /usr/include/bits/types.h:165:11: error: expected ';' before 'int' __STD_TYPE __KEY_T_TYPE __key_t; / Type of an IPC key. / ^ ; /usr/include/bits/types.h:168:11: error: expected ';' before 'int' __STD_TYPE __CLOCKID_T_TYPE __clockid_t; ^ ; /usr/include/bits/types.h:171:11: error: expected ';' before 'void' __STD_TYPE __TIMER_T_TYPE __timer_t; ^ ; /usr/include/bits/types.h:174:11: error: expected ';' before 'long' __STD_TYPE __BLKSIZE_T_TYPE __blksize_t; ^ ; /usr/include/bits/types.h:179:11: error: expected ';' before 'long' __STD_TYPE __BLKCNT_T_TYPE __blkcnt_t; ^ ; /usr/include/bits/types.h:180:1: error: unknown type name '__STD_TYPE' __STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t; ^~~~~~~~~~ /usr/include/bits/types.h:180:30: error: expected '=', ',', ';', 'asm' or 'attribute' before '__blkcnt64_t' __STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t; ^~~~~~~~~~~~ /usr/include/bits/types.h:183:11: error: expected ';' before 'unsigned' __STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t; ^ ; /usr/include/bits/types.h:184:1: error: unknown type name '__STD_TYPE' __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; ^~~~~~~~~~ /usr/include/bits/types.h:184:32: error: expected '=', ',', ';', 'asm' or 'attribute' before '__fsblkcnt64_t' __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; ^~~~~~~~~~~~~~ /usr/include/bits/types.h:187:11: error: expected ';' before 'unsigned' __STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t; ^ ; /usr/include/bits/types.h:188:1: error: unknown type name '__STD_TYPE' __STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t; ^~~~~~~~~~ /usr/include/bits/types.h:188:32: error: expected '=', ',', ';', 'asm' or 'attribute' before '__fsfilcnt64_t' __STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t; ^~~~~~~~~~~~~~ /usr/include/bits/types.h:191:1: error: unknown type name '__STD_TYPE' __STD_TYPE __FSWORD_T_TYPE __fsword_t; ^~~~~~~~~~ /usr/include/bits/types.h:191:28: error: expected '=', ',', ';', 'asm' or 'attribute' before '__fsword_t' __STD_TYPE __FSWORD_T_TYPE __fsword_t; ^~~~~~~~~~ /usr/include/bits/types.h:193:1: error: unknown type name '__STD_TYPE' __STD_TYPE __SSIZE_T_TYPE __ssize_t; / Type of a byte count, or error. / ^~~~~~~~~~ /usr/include/bits/types.h:193:27: error: expected '=', ',', ';', 'asm' or 'attribute' before '__ssize_t' __STD_TYPE __SSIZE_T_TYPE __ssize_t; / Type of a byte count, or error. / ^~~~~~~~~ /usr/include/bits/types.h:196:11: error: expected ';' before 'long' __STD_TYPE __SYSCALL_SLONG_TYPE __syscall_slong_t; ^ ; /usr/include/bits/types.h:198:11: error: expected ';' before 'unsigned' __STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t; ^ ; /usr/include/bits/types.h:206:1: error: unknown type name '__STD_TYPE' __STD_TYPE __SWORD_TYPE __intptr_t; ^~~~~~~~~~ /usr/include/bits/types.h:206:25: error: expected '=', ',', ';', 'asm' or 'attribute' before '__intptr_t' __STD_TYPE __SWORD_TYPE __intptr_t; ^~~~~~~~~~ /usr/include/bits/types.h:209:11: error: expected ';' before 'unsigned' __STD_TYPE __U32_TYPE __socklen_t; ^ ; /usr/include/bits/types.h:222:1: error: unknown type name '__STD_TYPE' __STD_TYPE __TIME64_T_TYPE __time64_t; ^~~~~~~~~~ /usr/include/bits/types.h:222:28: error: expected '=', ',', ';', 'asm' or 'attribute' before '__time64_t' __STD_TYPE __TIME64_T_TYPE __time64_t; ^~~~~~~~~~ In file included from /usr/include/net/ppp_defs.h:4, from pppd.h:57, from sxplugin.c:6: /usr/include/bits/types/time_t.h:7:17: error: expected ';' before 'time_t' typedef __time_t time_t; ^~~~~~~ ; In file included from sxplugin.c:6: pppd.h:231:20: error: expected '=', ',', ';', 'asm' or 'attribute' before 'groups' extern GIDSET_TYPE groups[NGROUPS_MAX]; / groups the user is in */ ^~~~~~ make: *** [makefile:62: zhejiang_xiaoyuan_sxplugin] Error 1 $

djl0629 avatar Nov 30 '21 17:11 djl0629

谢谢大佬、2.4.9又出来了,咱就是说能不能...😍 实测,对2.4.8版本二进制打开,直接替换so文件中的"2.4.8"为"2.4.9",保存,可以正常使用

Starpuccino avatar Mar 29 '22 12:03 Starpuccino

@djl0629 我也是纯小白。我和你的情况是一样的,用作者给的gcc可以编译,用最新的gcc就一堆一堆的报错。我感觉应该是c语言标准的问题。很多语法在老版本gcc上可以运行,在新版gcc上就当成语法错误报错了。毕竟作者给的是14年的gcc。 当然也不排除我哪里出了什么低级错误。

yuhanjin avatar May 30 '22 10:05 yuhanjin

@djl0629 我也是纯小白。我和你的情况是一样的,用作者给的gcc可以编译,用最新的gcc就一堆一堆的报错。我感觉应该是c语言标准的问题。很多语法在老版本gcc上可以运行,在新版gcc上就当成语法错误报错了。毕竟作者给的是14年的gcc。 当然也不排除我哪里出了什么低级错误。

@djl0629 我验证了我的说法是对的,我找了最新版的pppd.h文件,就能编译成功了 https://github.com/ppp-project/ppp/blob/master/pppd/pppd.h

yuhanjin avatar May 30 '22 12:05 yuhanjin

大佬,没有江西南昌的啊

weixieyou avatar Mar 06 '23 15:03 weixieyou