Skip to content
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

报错!!! #18

Closed
oe77 opened this issue May 3, 2016 · 23 comments
Closed

报错!!! #18

oe77 opened this issue May 3, 2016 · 23 comments

Comments

@oe77
Copy link

oe77 commented May 3, 2016

lo@lo-virtual-machine:~/ngrok-c$ sh openwrtbuildv2.sh
mkdir: 无法创建目录"build-mips": 文件已存在
openwrtbuildv2.sh: 16: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found
openwrtbuildv2.sh: 17: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found
openwrtbuildv2.sh: 18: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found
openwrtbuildv2.sh: 19: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found
openwrtbuildv2.sh: 20: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found
openwrtbuildv2.sh: 21: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found
openwrtbuildv2.sh: 22: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found
openwrtbuildv2.sh: 23: openwrtbuildv2.sh: mips-openwrt-linux-g++: not found

!/bin/sh

export PATH=$PATH:'/home/lo/sdk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin'
export STAGING_DIR="/home/lo/sdk/staging_dir"

@dosgo
Copy link
Owner

dosgo commented May 3, 2016

你找找你的sdk的g++编译器叫啥名字。。然后把mips-openwrt-linux-g++改成那名字。

@oe77
Copy link
Author

oe77 commented May 3, 2016

@dosgo g++编译器名字在那里可以找到??

@dosgo
Copy link
Owner

dosgo commented May 3, 2016

这个目录找啊/home/lo/sdk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin

@oe77
Copy link
Author

oe77 commented May 3, 2016

@dosgo mipsel-openwrt-linux-uclibc-g++

@dosgo
Copy link
Owner

dosgo commented May 3, 2016

那你修改openwrtbuildv2.sh文件,把mips-openwrt-linux-g++改成mipsel-openwrt-linux-uclibc-g++

@oe77
Copy link
Author

oe77 commented May 3, 2016

生成的ngrokc只有50k左右,我见别人生成的有400多k,作者正常吗??
lo@lo-virtual-machine:/ngrok-c-master$ sudo ./openwrtbuildv2.sh
[sudo] password for lo:
mkdir: 无法创建目录"build-mips": 文件已存在
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from sendmsg.cpp:11:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from ngrok.h:6,
from main.cpp:63:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
In file included from nonblocking.h:21:0,
from nonblocking.cpp:1:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from ngrok.h:6,
from ngrok.cpp:13:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
build-mips/main.o: In function `proxy()':
main.cpp:(.text+0x590): warning: gethostbyname is obsolescent, use getnameinfo() instead.
lo@lo-virtual-machine:
/ngrok-c-master$

@dosgo
Copy link
Owner

dosgo commented May 3, 2016

正常,openssl动态链接的就是这个大小。

@dosgo
Copy link
Owner

dosgo commented May 3, 2016

400k的,那是polarssl静态链接的。

@oe77
Copy link
Author

oe77 commented May 3, 2016

作者!谢谢你!

@badsirius
Copy link

你好! dosgo。
下载15.05 ar71xx的SDK,按照教程所设置,运行openwrtbuildv2.sh,也出现上面!@oe77列出的如下信息。我以前编译1.25,1.30都不会有如此信息,就是简单一条信息而已。就可以使用编译好的ngrockc了。
请问这些反馈信息正常吗?

In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from sendmsg.cpp:11:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from ngrok.h:6,
from main.cpp:63:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
In file included from nonblocking.h:21:0,
from nonblocking.cpp:1:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from ngrok.h:6,
from ngrok.cpp:13:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
build-mips/main.o: In function `proxy()':

main.cpp:(.text+0x590): warning: gethostbyname is obsolescent, use getnameinfo() instead.

@dosgo
Copy link
Owner

dosgo commented May 3, 2016

一切正常。有ngrokc生成都正常,然后。。你跑下能跑,是新版都正常。

@badsirius
Copy link

dosgo,确实如你所言。编译过程出现上面我提到的信息。
但是build-mips目录,有编译好的ngrokc。

(先关闭路由中 ngrokc服务)
拉到openwrt的 usr/bin
重启ngrokc

正常使用!!,THX

@dosgo
Copy link
Owner

dosgo commented May 4, 2016

这只是警告而已。。正常。说一个变量未定义,还有gethostbyname 过时了。。

@linktest
Copy link

linktest commented May 13, 2016

感觉最后一步出错最后一步
mipsel-openwrt-linux-uclibc-g++: error: build-mips/ngrok.o: No such file or directory
没有ngrokc生成

@dosgo
Copy link
Owner

dosgo commented May 13, 2016

版本呢?1.34编译不了

@dosgo
Copy link
Owner

dosgo commented May 13, 2016

用1.35吧

@linktest
Copy link

linktest commented May 13, 2016

刚用最新版,还是一样的错误啊
linux@ubuntu:/ngrok-c-master$ sudo ./openwrtbuildv2.sh
[sudo] password for linux:
mkdir: cannot create directory ‘build-mips’: File exists
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from sendmsg.cpp:11:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION sess = NULL;
^
main.cpp:337:20: warning: extra tokens at end of #endif directive [enabled by default]
#endif /
^
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from ngrok.h:6,
from main.cpp:63:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
In file included from nonblocking.h:21:0,
from nonblocking.cpp:1:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
ngrok.cpp: In function 'int UdpCmd(int)':
ngrok.cpp:45:73: error: invalid conversion from 'int
' to 'socklen_t* {aka unsigned int_}' [-fpermissive]
int udpbuflen=recvfrom(udpsocket,buf,1024,MSG_PEEK ,&udpaddr,&udplen);
^
In file included from /home/linux/1/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include/netinet/in.h:25:0,
from /home/linux/1/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include/arpa/inet.h:23,
from ngrok.cpp:8:
/home/linux/1/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include/sys/socket.h:166:16: error: initializing argument 6 of 'ssize_t recvfrom(int, void_, size_t, int, sockaddr_, socklen_t_)' [-fpermissive]
extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
^
In file included from nonblocking.h:21:0,
from sendmsg.h:4,
from ngrok.h:6,
from ngrok.cpp:13:
sslbio.h: At global scope:
sslbio.h:14:21: warning: 'sess' defined but not used [-Wunused-variable]
static SSL_SESSION *sess = NULL;
^
mipsel-openwrt-linux-uclibc-g++: error: build-mips/ngrok.o: No such file or directory
linux@ubuntu:
/ngrok-c-master$

@dosgo
Copy link
Owner

dosgo commented May 13, 2016

你这哪是最新版,1.35才是

@linktest
Copy link

仔细看了下,main.cpp文件
using namespace std;
string VER = "1.35-(2016/5/13)";
应该是1.35

@dosgo
Copy link
Owner

dosgo commented May 13, 2016

1.35 sslbio.h:14:21: warning: 'sess'就没sess这个变量..你用git的?

@linktest
Copy link

不是,打包下载Download ZIP

@dosgo
Copy link
Owner

dosgo commented May 13, 2016

我检查过了...确认,,1.35包没有问题。建议你删除以前旧的任何包,,,重新下载,,编译。。我觉得你可能是目录搞错了。。或者。。ngrok.cpp没有替换。

@linktest
Copy link

刚重新下载了,不到10秒,生成一个文件。应该是没问题了
linux@ubuntu:/ngrok-c-1.35-2016-5-13-$ sudo ./openwrtbuildv2.sh
[sudo] password for linux:
mkdir: cannot create directory ‘build-mips’: File exists
linux@ubuntu:
/ngrok-c-1.35-2016-5-13-$

@dosgo dosgo closed this as completed Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants