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

编译心跳插件出错了

Open Cheukfung opened this issue 9 years ago • 26 comments

编译daonet里面打插件失败,错误信息是: /home/cheukfung/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.11/bin/mips-openwrt-linux-gcc -o DaoNet main.o frame.o netutils.o netkeeper.o /home/cheukfung/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.11/lib/libmbedcrypto.a -g -Wall -Wimplicit-function-declaration -I /home/cheukfung/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.11/include/ mips-openwrt-linux-gcc: error: /home/cheukfung/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.11/lib/libmbedcrypto.a: No such file or directory make: *** [DaoNet] 错误 1 我是菜鸟。。在lib目录下面只找到libcrypto.a,是库的原因吗,希望能解决,谢谢。

Cheukfung avatar Oct 24 '15 02:10 Cheukfung

这个是mbed TLS 的library文件,并不是openssl的。你可以考虑编译一个mbedtls。

phoenixxie0 avatar Oct 25 '15 11:10 phoenixxie0

谢谢你的回复。我用openwrt编译的SDK编译了mbedtls,然后成功编译出DaoNet,可是在openwrt上面不能运行,只显示not found,我是否遗漏了什么?

Cheukfung avatar Oct 27 '15 23:10 Cheukfung

编译的时候是否使用了动态库?

phoenixxie0 avatar Oct 30 '15 00:10 phoenixxie0

可以了,原来是我把DaoNet放在了其他目录,放到usr/bin就可以运行了。谢谢

Cheukfung avatar Oct 31 '15 15:10 Cheukfung

@CheukFung 你是怎么编译mbedtls的? 有的是哪个版本哦?

Hyper-Lee avatar Nov 01 '15 05:11 Hyper-Lee

@Whatnamegood 用下载的gcc编译mbedtls,然后放到lib文件夹

Cheukfung avatar Nov 02 '15 12:11 Cheukfung

@CheukFung 怎么用下载GCC编译呢?直接设置环境变量吗?

Hyper-Lee avatar Nov 03 '15 08:11 Hyper-Lee

[root@localhost DaoNet]# make mips-openwrt-linux-gcc -o DaoNet main.o frame.o netutils.o netkeeper.o /home/li/Open/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libmbedcrypto.a -g -Wall -Wimplicit-function-declaration -I /home/li/Open/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include/ /home/li/Open/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.8.3/../../../../mips-openwrt-linux-uclibc/bin/ld: /home/li/Open/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libmbedcrypto.a(aes.o): Relocations in generic ELF (EM: 62) /home/li/Open/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.8.3/../../../../mips-openwrt-linux-uclibc/bin/ld: /home/li/Open/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libmbedcrypto.a(aes.o): Relocations in generic ELF (EM: 62) /home/li/Open/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libmbedcrypto.a: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status make: *** [DaoNet] 错误 1 [root@localhost DaoNet]#

Hyper-Lee avatar Nov 03 '15 08:11 Hyper-Lee

这里是说libmbedcrypto.a 文件类型错误 那也就是说编译时没有用到交叉编译的gcc

Hyper-Lee avatar Nov 03 '15 08:11 Hyper-Lee

@CheukFung 你好

Hyper-Lee avatar Nov 07 '15 03:11 Hyper-Lee

@Whatnamegood 修改mbedtls下library下的makefile,添加CC=xxxx,xxxx为你下载的gcc路径,然后make就可以了。

Cheukfung avatar Nov 07 '15 08:11 Cheukfung

@CheukFung 谢谢你 我已经成功编译了 可是要怎么使用呢? root@OpenWrt:~# DaoNet WARRNING: Support for ShanXi Netkeeper temporary. Missing arguments. Usage: daonet [OPTIONS] Options: --username, -u: Username. --password, -p: Password. --ipaddress, -i: IP Address. --version, -v: Version. --aeskey, -k: Aes key. --interval, -I: Interval. --target, -t: Target. --port, -P: Port. --help, -h: Help. root@OpenWrt:~#

这里是要填写其配置文件? 还是要在编译是把账号信息写入到源码在编译? 或者接选项-u -p 然后接参数执行呢?

Hyper-Lee avatar Nov 10 '15 08:11 Hyper-Lee

直接带参数执行。注意ip地址是你拨号获得的ip

sunflyer avatar Nov 10 '15 12:11 sunflyer

能给个实例吗?

Hyper-Lee avatar Nov 10 '15 12:11 Hyper-Lee

@sunflyer

Hyper-Lee avatar Nov 10 '15 12:11 Hyper-Lee

DaoNet -u <宽带账号> -p <密码> -i <你拨号获得的IP地址> -v 2.5.0016v32 -k wanglibinwanglei -I 120 -t 117.21.209.186 -P 443

sunflyer avatar Nov 10 '15 14:11 sunflyer

谢谢! 这里的-k 的key 是固定吗 是不是各个地区的都不同?

Hyper-Lee avatar Nov 10 '15 15:11 Hyper-Lee

王立彬王雷?

Hyper-Lee avatar Nov 10 '15 15:11 Hyper-Lee

root@OpenWrt:~# ./daonet.sh root@OpenWrt:~# WARRNING: Support for ShanXi Netkeeper temporary. INFO: Send packet succeed. ERROR: Wait for packet timeout. INFO: Wait 120 seconds.

这样是正常的吗? ERROR: Wait for packet timeout.

Hyper-Lee avatar Nov 10 '15 16:11 Hyper-Lee

没事,江西没有回复包,正常

sunflyer avatar Nov 10 '15 17:11 sunflyer

@sunflyer 湖北E信可以使用这个心跳插件吗?需不需要改什么?

smounives avatar Nov 19 '15 06:11 smounives

湖北不能

sunflyer avatar Nov 19 '15 06:11 sunflyer

QAQ 难道只能直接插网线用您的SimpleNetkeeper了吗,湖北地区求救啊

smounives avatar Nov 19 '15 06:11 smounives

最快下周出op支持吧,看情况

sunflyer avatar Nov 19 '15 07:11 sunflyer

多谢!

smounives avatar Nov 19 '15 07:11 smounives

您好,请问您有空吗?我想编译一个daonet但是并不会,您能指导一下吗?

theflash2017 avatar Apr 05 '17 00:04 theflash2017