Ubuntu 使用Openwrt SDK交叉编译ipk包过程全纪录(超多图)

来源:互联网 发布:mac brew install pip 编辑:程序博客网 时间:2024/05/16 19:07

刚刚买了一个网件wndr4300路由器,快递还没送来就已经开始琢磨刷机的事了。卖家提供了一个明月的op固件,里面功能超级多但是非常臃肿,我在hg255d上的使用经验告诉我这样臃肿的包非常耗费CPU资源,而且会导致网速变慢和无故重启。恩山上大神编译的几乎都是添加了很多应用的固件。而我只需要一个ss功能就够了,最好有luci界面,所以决定自己编译出ipk包放到路由器上使用opkg安装。

首先去openwrt ss的github官网,https://github.com/shadowsocks/openwrt-shadowsocks 这上面只给了makefile文件,没有c源码,因为c源码都在Shadowsocks-libev项目上,在makefile时会自动的去github上下载一个tar包,然后编译那里面的文件,如https://github.com/shadowsocks/openwrt-shadowsocks/releases/download/v2.5.5/shadowsocks-libev-2.5.5.tar.gz,如果你网速很慢可以把makefile中相关的url改掉换成本地下载好的tar包。正常情况下我们不需要修改makefile就能正常编译。

注意:在编译过程中会联网下载大量的依赖库,所以一定要保证网络畅通稳定,否则会频繁失败,我在下载依赖库的时候都不到2KB/s。

网上很多编译ss的教程都是2014年的,它们都是直接clone openwrt的源码,然后用openwrt的源码编译出很多编译工具再编译apk,这样做非常的耗时,我亲自试过大概花了3个多小时也没成功,自从有了SDK之后就不用这么麻烦了,编译过程10几分钟就可以搞定。同样github上也推荐我们使用SDK进行编译。

注意:SDK版本要选择适合你路由器及路由器上系统的,比如CC15.05 SDK编译出来的ipk不能装载trunc版上,反之亦然,所以我们要选择适合路由器上openwrt系统的SDK,下文以wndr4300 CC 15.05 版openwrt为例。

首先去openwrt的官网下载相关SDK,http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/ 如果你要编译的不是wndr4300,可以去根目录自己通过CPU,内存类型选择相应的SDK进行下载,这里就不废话了。


如上图,第一个黄线是编译固件要用的ImageBuilder,是编译完整固件用的,我们只编译ipk软件包所以用不到,第二个黄线就是我们要用的SDK文件了

第三个和第四个都是纯净版的OP系统,可以下载然后刷到wndr4300路由器里面,一个是原有OP网页刷,一个是原版或者tftp刷的固件。刷入这个固件然后再opkg安装我们编译出的ipk包就具备相关功能了。所以此时我们首先下载SDK。

下载完成之后放到一个好记而且没有权限限制的目录中,比如我在我的用户目录下建立一个叫OP_SDK的文件夹,然后把这个tar包放进去


注:我是用的winscp放进去的,在linux下可以直接使用wget http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2 来下载这个tar包

放上去之后我们解压这个tar包

tar xjf OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
解压完之后 OP_SDK目录下就会出现一个和tar包同名的文件夹,这里面就是我们要用到交叉编译的SDK了

然后做非常重要的一步,安装编译相关的依赖库文件,否则进不去make menuconfig

sudo apt-get updatesudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk
sudo apt-get install subversion mercurial

而且还有非常重要的一步,是安装c编译环境,当初我就因为ccache没有安装导致一晚上都白忙活

sudo apt-get install ccache

因为ccache Ubuntu 16.04没有默认安装,导致编译的时候一直报 C compiler cannot create executables错误,浪费了很多时间

基本的环境安装完成之后,我们就可以开始编译工作了,注意保持网络畅通

根据github上的README即可

cd ./OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/# 安装 feeds./scripts/feeds update packages./scripts/feeds install libpcre
=============先到这里暂停=============
# 获取 Makefilegit clone https://github.com/shadowsocks/openwrt-shadowsocks.git package/shadowsocks-libev# 选择要编译的包 Network -> shadowsocks-libevmake menuconfig# 开始编译make package/shadowsocks-libev/compile V=99

现在我们先开始安装feeds,就是用来选择编译什么插件用的列表

安装feeds的第一行命令会联网下载feeds列表,比较费时,第二行会报miss index的warning,不用管。




然后克隆git上的makefile文件下来,如果你网速慢也可以自己下载然后放到./package/shadowsocks-libev下面去,注意这里不要改文件夹的名字,因为写死在makefile里面了

但是这里我们暂停一下,因为编译ss是一个完整的解决依赖-编译-连接的过程,很容易出错,而编译luci UI界面只需要简单的打包一下即可,所以不妨先编译一下luci体会一下。

git clone https://github.com/shadowsocks/luci-app-shadowsocks.git package/luci-app-shadowsocks# 编译 po2lmo (如果有po2lmo可跳过)pushd package/luci-app-shadowsocks/tools/po2lmomake && sudo make installpopd# 选择要编译的包 LuCI -> 3. Applicationsmake menuconfig# 开始编译make package/luci-app-shadowsocks/compile V=99

首先git克隆,此时在package目录下会出现一个luci的目录


然后继续执行,并不容易出错


然后选择编译luci的ipk通过make menuconfig


选择LuCI,确认时<M>选中,代表编译出ipk包


然后选择<Save>回车,保存后,连续选择<Exit>退出


上图直接选择<Ok>即可

然后我们就可以开始编译luci了

make package/luci-app-shadowsocks/compile V=99

因为不依赖c编译环境,所以不容易出错


然后去/bin/ar71xx/packages/base目录下就可以看到我们编译好的ipk了,把它取出来放到别的位置上然后删掉,我们准备开始编译ss


现在开始克隆ss的openwrt版并把刚才克隆的./package/luci-app-shadowsocks给删掉

git clone https://github.com/shadowsocks/openwrt-shadowsocks.git package/shadowsocks-libev


然后像刚才选择luci一样在make menuconfig中选择ss


OpenSSL版支持的加密方法多,PolarSSL支持的加密方法少,看你的需求而定


注意:只编译上面选择的两个或者一个就好,不要选择第mbedTLS版,因为mbedtls需要第三方依赖库,而ubuntu是不给你自动安装的,会因为缺少依赖而编译失败


然后跟luci一样<Save>然后连续<Exit>

下面就是最激动人心的一步了,开始我们的c编译,连接过程

make package/shadowsocks-libev/compile V=99
在这个过程中会联网下载很多个依赖,要保证网络畅通然后静等,注意*不要*使用sudo权限!整个编译耗时大约2分钟左右,视网络状况而定

下图是下载某个依赖库


下图是下载Shadowsocks-libev的源码


如果没有报错就说明编译完成了


在这个编译过程中遇到问题退出是很正常的,完全不需要大惊小怪,而且随着版本的更新会不断的出现新的编译问题,就需要我们自己去解决。

多数的编译问题都是缺少依赖库或者网络不畅,需要我们仔细的查看config.log文件

查找这个文件的方法是执行

locate config.log


一般编译到哪一步失败就去看哪一步的config.log,我之前碰到的一个编译失败是因为没安装ccache,在上图黄线的config.log在文章最后贴出来

如果编译成功,我们可以在/bin/ar71xx/packages/base目录下看到编译好的ipk了,这两个ipk到时候只安装一个就好,不要都安装


现在挑一个你需要的ipk出来放到openwrt系统下使用opkg安装即可,还可以配合之前做好的luci UI界面ipk包

==============我是分隔线==============

经过漫长的等待,终于从快递手中收到路由器了,之前编译好的三个ipk包感觉已经躺了大半年了。现在终于可以刷进去了。怎么从wndr4300原版刷成op的纯净系统我就不说了,而且我已经让卖家卖给我之前就刷好一个CC版15.05.1的纯净系统,这个系统是我在恩山上找的,这里感谢一下作者xmit0806,该固件的帖子地址:http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=186099

这个固件作者说支持了128M闪存(op官方版只支持32m闪存,浪费了90多mb),用dnsmasq-full替换了dnsmasq,添加了opkg软件源等,都是非常实用的。

注:如果刷该固件重启后不保留配置,重新用TFTP的方式刷一遍就好了,我就碰到过这个情况。还有虽然这个版本是15.05.1,但是使用15.05 SDK编译出来的ipk一样能用


好了言归正传,现在开始安装之前编译好的ipk包了。

首先看一下没安装之前的状态



看起来的确是很纯净,一个“服务”都没装,而且内存的空余很大,从上图可以看出,该机器之前没有安装ss-local服务

然后我通过winscp把编译好的ipk包上传到用户目录/root上去

这里winscp还有一些小坑,首先你的路由器必须设置了登陆密码才能用SSH登陆,SSH的用户名和密码就是路由器的登录名和登陆密码,这个在一进路由器后台就会用黄色的框提示你,直接修改就好,我选的登录名为root,密码为root,所以用户目录就变成了/root

还有winscp必须设置成scp协议,使用Ubuntu支持的sftp协议是登陆不进去的

然后我抱着必错的信念开始用opkg安装


果然不出我所料报错了,不过并不是什么大的问题,缺少两个依赖库,libpcre和libpthread

那怎么装这两个依赖包呢,手头有没有他们的ipk包。但是隐隐记得这个固件的作者添加了软件源,于是我打算拼死一搏


一搏有效,通过更新软件源的命令已经成功更新了base包和luci包,packages包更新太慢停掉就行,重要的是base

于是我根据上面的提示主动去openwrt的官网上去找packages包,找到了libpcre的依赖



还真让我找到了,赶紧下载下来放到路由器上(中间那个libpcre_8.38-1_ar71xx.ipk就是我们要用的)

注:packages包里要用的就它一个了,剩下的都在base包里

好了,解决了一个依赖,让我们先安装这个依赖再继续安装ss吧


哎呦,忘了还有一个依赖,opkg虽然下载的很慢,但是贴心的把这个依赖包的下载地址给打印出来了,那我就直接用迅雷下好放进去得了


放好了,我们开始安装吧


上图显示Openwrt已经成功安装了剩下的一个依赖和ss,看来我们SDK编译还是很成功的

现在让我们运行一下ss-local检验一下是否安装成功


ss-local有反应了,看来安装已经彻底成功了。

下面我们检查一下ss-redir的透明代理功能是不是好用,首先我们编写一个ss服务器的配置文件,监听0.0.0.0:1080(注意不能是127.0.0.1或内网地址,否则iptables无法转发)


然后调用ss-redir去执行该配置文件


看样子是启动成功了,而且最新版的Shadowsocks-libev可以使用-u参数支持udp转发,让我们再用netstat看看1080端口的情况


可以看出来,udp和tcp的1080端口均被ss-redir占用,说明启动成功了,下面只要配合iptables的转发就实现了透明代理了


上面只是一个简略版,完整的应该如下

iptables -t nat -A PREROUTING -d 127.0.0.0/24 -j RETURN  iptables -t nat -A PREROUTING -d 192.168.0.0/16 -j RETURN  iptables -t nat -A PREROUTING -d 10.42.0.0/16 -j RETURN  iptables -t nat -A PREROUTING -d 0.0.0.0/8 -j RETURN  iptables -t nat -A PREROUTING -d 10.0.0.0/8 -j RETURN  iptables -t nat -A PREROUTING -d 172.16.0.0/12 -j RETURN  iptables -t nat -A PREROUTING -d 224.0.0.0/4 -j RETURN  iptables -t nat -A PREROUTING -d 240.0.0.0/4 -j RETURN  iptables -t nat -A PREROUTING -d 169.254.0.0/16 -j RETURN    iptables -t nat -A PREROUTING -p tcp -s 192.168.1.1/16 -j REDIRECT --to-ports 1080
然后用手机百度搜索ip,已经换成代理的ip啦。

更宝贵的是ss-redir自带DNS防污染功能,访问谷歌,facebook神马的都畅通无阻啦,然后我们再测个速研究一下路由器的负载能力(我是20M光纤)

看起来是非常不错的,几乎可以把带宽跑满

下面我们再去路由器后台看看进程

我们刚才执行的指令ss-redir已经显示在UI界面上了

到这ss的透明代理已经全部搞定了,但是有些人不喜欢用命令行去配置,而喜欢在路由器后台使用luci界面,于是我们把之前编译好的luci界面也装上吧

于是把luci的ipk传到路由器上去准备安装


没想到luci界面也需要依赖库,一看是ipset,是非常有用的东西,通过ipset可以配置dnsmasq-full通过域名进行代理规则的书写,可以克服iptables只能识别ip的短板

既然上面已经给出了ipk的下载地址,opkg下载的还这么慢,那我干脆继续用迅雷上吧,装上ipset以后我们继续


安装ipset居然也需要依赖包,是libmnl,同样办法先把这个装了再装ipset吧,没出现循环依赖就不错啦

果然解决了这两个依赖以后luci界面就装好了,让我们进路由器后台瞅瞅


呈贡啦,菜单多了一项“服务”,“影梭”就在里面,让我们点进去看看


果然是最新的luci和最新的ss,支持udp转发啦,可惜上面显示udp转发不可用,缺少依赖,这多亏了有luci,不然我还不知道我这udp转发没法用。

据我判断缺少的肯定是iptables-mod-tproxy,因为ip默认已经装载Openwrt里了,于是老办法,去Openwrt的官网找找去


果然配好软件源的opkg又帮我们自动定位到了下载地址,老办法迅雷上


好啦,这个udp转发的依赖已经顺利安装完毕了,我们刷新路由器后台看看



好啦,现在luci界面已经完美支持udp转发啦!整个教程到此结束,我把这次安装所用到的所有ipk包放在下面供大家免费下载,理论上说CC版15.05 wndr4300设备都可以通用的。


OP的SDK算是比较好用的SDK工具了,可以自动帮你解决依赖问题,但是如果你使用潘多拉BOX的SDK或者LEDE的SDK就没有OP的这么好用了,往往会出现各式各样的错误,经常找不到依赖库等等。对此我又单独谢了一片文章介绍如何在潘多拉和LEDE SDK环境下编译IPK,有兴趣的可以看这篇:《Pandora/LEDE SDK交叉编译OpenWrt ipk安装包的方法》


下图是我用到所有的ipk包



下面面的ip和shadowsocks-libev-polarssl应该不装,polarss支持的加密方式少,比如没有rc4-md5这种加密方式,推荐使用openssl版本也就是我上面说的版本,ip包Openwrt应该默认自带,如果没有的话可以安装,因为我没装过这个ip包不知道好不好用,其他的包按照依赖关系一个一个装上即可,推荐在CC 15.05.1的wndr4300纯净系统上安装,纯净系统可以用上面恩山大神的那个

下载地址:

Openwrt_wndr4300_CC_15.05.1_SS_luci用到的ipk包


本文用到的恩山大神提供的原版改良版纯净固件下载地址:http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=186099

下面再秀一下刚买的wndr4300



附:因为没安装ccache导致的无法编译的config.log

This file contains any messages produced by compilers whilerunning configure, to aid debugging if configure makes a mistake.It was created by PCRE configure 8.39, which wasgenerated by GNU Autoconf 2.69.  Invocation command line was  $ ./configure --target=mips-openwrt-linux --host=mips-openwrt-linux --build=x86_64-linux-gnu --program-prefix= --program-suffix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --enable-utf8 --enable-unicode-properties --enable-pcre16 --enable-cpp## --------- #### Platform. #### --------- ##hostname = alex-ThinkPad-T430uname -m = x86_64uname -r = 4.4.0-36-genericuname -s = Linuxuname -v = #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016/usr/bin/uname -p = unknown/bin/uname -X     = unknown/bin/arch              = unknown/usr/bin/arch -k       = unknown/usr/convex/getsysinfo = unknown/usr/bin/hostinfo      = unknown/bin/machine           = unknown/usr/bin/oslevel       = unknown/bin/universe          = unknownPATH: /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/host/binPATH: /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/binPATH: /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/binPATH: /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/binPATH: /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/binPATH: /usr/local/java/jdk1.8.0_91/binPATH: /opt/android-studio/gradle/gradle-2.14.1/binPATH: /usr/local/sbinPATH: /usr/local/binPATH: /usr/sbinPATH: /usr/binPATH: /sbinPATH: /binPATH: /usr/gamesPATH: /usr/local/gamesPATH: /snap/bin## ----------- #### Core tests. #### ----------- ##configure:2666: loading site script /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/include/site/mips| #!/bin/sh| . $TOPDIR/include/site/linux| ac_cv_c_littleendian=${ac_cv_c_littleendian=no}| ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}| | ac_cv_sizeof___int64=0| ac_cv_sizeof_char=1| ac_cv_sizeof_int=4| ac_cv_sizeof_int16_t=2| ac_cv_sizeof_int32_t=4| ac_cv_sizeof_int64_t=8| ac_cv_sizeof_long_int=4| ac_cv_sizeof_long_long=8| ac_cv_sizeof_long=4| ac_cv_sizeof_off_t=8| ac_cv_sizeof_short_int=2| ac_cv_sizeof_short=2| ac_cv_sizeof_size_t=4| ac_cv_sizeof_ssize_t=4| ac_cv_sizeof_u_int16_t=2| ac_cv_sizeof_u_int32_t=4| ac_cv_sizeof_u_int64_t=8| ac_cv_sizeof_uint16_t=2| ac_cv_sizeof_uint32_t=4| ac_cv_sizeof_uint64_t=8| ac_cv_sizeof_unsigned_int=4| ac_cv_sizeof_unsigned_long=4| ac_cv_sizeof_unsigned_long_long=8| ac_cv_sizeof_unsigned_short=2| ac_cv_sizeof_void_p=4configure:2808: checking for a BSD-compatible installconfigure:2876: result: /usr/bin/install -cconfigure:2887: checking whether build environment is saneconfigure:2942: result: yesconfigure:3001: checking for mips-openwrt-linux-stripconfigure:3028: result: mips-openwrt-linux-uclibc-stripconfigure:3093: checking for a thread-safe mkdir -pconfigure:3132: result: /bin/mkdir -pconfigure:3139: checking for gawkconfigure:3155: found /usr/bin/gawkconfigure:3166: result: gawkconfigure:3177: checking whether make sets $(MAKE)configure:3199: result: yesconfigure:3228: checking whether make supports nested variablesconfigure:3245: result: yesconfigure:3383: checking whether make supports nested variablesconfigure:3400: result: yesconfigure:3428: checking for style of include used by makeconfigure:3456: result: GNUconfigure:3487: checking for mips-openwrt-linux-gccconfigure:3514: result: ccache_ccconfigure:3783: checking for C compiler versionconfigure:3792: ccache_cc --version >&5/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/ccache_cc: 2: exec: ccache: not foundconfigure:3803: $? = 127configure:3792: ccache_cc -v >&5/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/ccache_cc: 2: exec: ccache: not foundconfigure:3803: $? = 127configure:3792: ccache_cc -V >&5/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/ccache_cc: 2: exec: ccache: not foundconfigure:3803: $? = 127configure:3792: ccache_cc -qversion >&5/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/ccache_cc: 2: exec: ccache: not foundconfigure:3803: $? = 127configure:3823: checking whether the C compiler worksconfigure:3845: ccache_cc -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 -fpic  -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include  -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib  conftest.c  >&5/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/ccache_cc: 2: exec: ccache: not foundconfigure:3849: $? = 127configure:3887: result: noconfigure: failed program was:| /* confdefs.h */| #define PACKAGE_NAME "PCRE"| #define PACKAGE_TARNAME "pcre"| #define PACKAGE_VERSION "8.39"| #define PACKAGE_STRING "PCRE 8.39"| #define PACKAGE_BUGREPORT ""| #define PACKAGE_URL ""| #define PACKAGE "pcre"| #define VERSION "8.39"| /* end confdefs.h.  */| | int| main ()| {| |   ;|   return 0;| }configure:3892: error: in `/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/pcre-8.39':configure:3894: error: C compiler cannot create executablesSee `config.log' for more details## ---------------- #### Cache variables. #### ---------------- ##ac_cv_c_bigendian=yesac_cv_c_gettext_without_libintl=yesac_cv_c_littleendian=noac_cv_c_long_double=noac_cv_conv_longlong_to_float=yesac_cv_env_CCC_set=ac_cv_env_CCC_value=ac_cv_env_CC_set=setac_cv_env_CC_value=ccache_ccac_cv_env_CFLAGS_set=setac_cv_env_CFLAGS_value='-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 -fpic 'ac_cv_env_CPPFLAGS_set=setac_cv_env_CPPFLAGS_value='-I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include 'ac_cv_env_CPP_set=ac_cv_env_CPP_value=ac_cv_env_CXXCPP_set=ac_cv_env_CXXCPP_value=ac_cv_env_CXXFLAGS_set=setac_cv_env_CXXFLAGS_value='-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 -fpic 'ac_cv_env_CXX_set=setac_cv_env_CXX_value=ccache_cxxac_cv_env_GENHTML_set=ac_cv_env_GENHTML_value=ac_cv_env_LCOV_set=ac_cv_env_LCOV_value=ac_cv_env_LDFLAGS_set=setac_cv_env_LDFLAGS_value='-L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib 'ac_cv_env_LIBS_set=ac_cv_env_LIBS_value=ac_cv_env_PKG_CONFIG_LIBDIR_set=setac_cv_env_PKG_CONFIG_LIBDIR_value=/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/pkgconfig:/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/share/pkgconfigac_cv_env_PKG_CONFIG_PATH_set=setac_cv_env_PKG_CONFIG_PATH_value=/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/pkgconfig:/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/share/pkgconfigac_cv_env_PKG_CONFIG_set=setac_cv_env_PKG_CONFIG_value=/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/pkg-configac_cv_env_VALGRIND_CFLAGS_set=ac_cv_env_VALGRIND_CFLAGS_value=ac_cv_env_VALGRIND_LIBS_set=ac_cv_env_VALGRIND_LIBS_value=ac_cv_env_build_alias_set=setac_cv_env_build_alias_value=x86_64-linux-gnuac_cv_env_host_alias_set=setac_cv_env_host_alias_value=mips-openwrt-linuxac_cv_env_target_alias_set=setac_cv_env_target_alias_value=mips-openwrt-linuxac_cv_file__dev_zero=yesac_cv_func___adjtimex=yesac_cv_func___va_copy=noac_cv_func__exit=yesac_cv_func_bcmp=yesac_cv_func_bcopy=yesac_cv_func_bzero=yesac_cv_func_cimag=yesac_cv_func_creal=yesac_cv_func_fchmod=yesac_cv_func_getaddrinfo=yesac_cv_func_getcwd=yesac_cv_func_getdomainname=yesac_cv_func_getpgrp_void=yesac_cv_func_getpwuid_r=yesac_cv_func_gettimeofday=yesac_cv_func_index=yesac_cv_func_lstat=yesac_cv_func_lstat_dereferences_slashed_symlink=yesac_cv_func_lstat_empty_string_bug=noac_cv_func_malloc_0_nonnull=yesac_cv_func_malloc_works=yesac_cv_func_memcmp_clean=yesac_cv_func_memcmp_working=yesac_cv_func_posix_getgrgid_r=yesac_cv_func_posix_getpwuid_r=yesac_cv_func_psignal=yesac_cv_func_pthread_key_delete=yesac_cv_func_realloc_0_nonnull=yesac_cv_func_realloc_works=yesac_cv_func_rename=yesac_cv_func_rindex=yesac_cv_func_setgrent_void=yesac_cv_func_setlocale=yesac_cv_func_setpgrp_void=yesac_cv_func_setresuid=noac_cv_func_setvbuf_reversed=noac_cv_func_stat_empty_string_bug=noac_cv_func_stat_ignores_trailing_slash=noac_cv_func_strerror=yesac_cv_func_strftime=yesac_cv_func_utimes=yesac_cv_func_va_copy=noac_cv_func_vsnprintf=yesac_cv_have_accrights_in_msghdr=noac_cv_have_broken_snprintf=noac_cv_have_control_in_msghdr=yesac_cv_have_decl_sys_siglist=noac_cv_have_openpty_ctty_bug=yesac_cv_have_space_d_name_in_struct_dirent=yesac_cv_header_netinet_sctp_h=noac_cv_header_netinet_sctp_uio_h=noac_cv_int64_t=yesac_cv_lbl_unaligned_fail=noac_cv_linux_kernel_pppoe=yesac_cv_linux_vers=2ac_cv_pack_bitfields_reversed=yesac_cv_path_LDCONFIG=ac_cv_path_install='/usr/bin/install -c'ac_cv_path_mkdir=/bin/mkdirac_cv_prog_AWK=gawkac_cv_prog_CC=ccache_ccac_cv_prog_STRIP=mips-openwrt-linux-uclibc-stripac_cv_prog_make_make_set=yesac_cv_regexec_segfault_emptystr=noac_cv_sctp=noac_cv_sizeof___int64=0ac_cv_sizeof_char=1ac_cv_sizeof_int16_t=2ac_cv_sizeof_int32_t=4ac_cv_sizeof_int64_t=8ac_cv_sizeof_int=4ac_cv_sizeof_long=4ac_cv_sizeof_long_int=4ac_cv_sizeof_long_long=8ac_cv_sizeof_off_t=8ac_cv_sizeof_short=2ac_cv_sizeof_short_int=2ac_cv_sizeof_size_t=4ac_cv_sizeof_ssize_t=4ac_cv_sizeof_u_int16_t=2ac_cv_sizeof_u_int32_t=4ac_cv_sizeof_u_int64_t=8ac_cv_sizeof_uint16_t=2ac_cv_sizeof_uint32_t=4ac_cv_sizeof_uint64_t=8ac_cv_sizeof_unsigned_int=4ac_cv_sizeof_unsigned_long=4ac_cv_sizeof_unsigned_long_long=8ac_cv_sizeof_unsigned_short=2ac_cv_sizeof_void_p=4ac_cv_sys_restartable_syscalls=yesac_cv_time_r_type=POSIXac_cv_type_suseconds_t=yesac_cv_uchar=noac_cv_uint64_t=yesac_cv_uint=yesac_cv_ulong=yesac_cv_ushort=yesac_cv_va_copy=C99ac_cv_va_val_copy=yesam_cv_make_support_nested_variables=yesas_cv_unaligned_access=yes## ----------------- #### Output variables. #### ----------------- ##ACLOCAL='${SHELL} /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/pcre-8.39/missing aclocal-1.15'AMDEPBACKSLASH='\'AMDEP_FALSE='#'AMDEP_TRUE=''AMTAR='$${TAR-tar}'AM_BACKSLASH='\'AM_DEFAULT_V='0'AM_DEFAULT_VERBOSITY='0'AM_V='0'AR='mips-openwrt-linux-uclibc-gcc-ar'AS='ccache_cc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fpic'AUTOCONF='${SHELL} /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/pcre-8.39/missing autoconf'AUTOHEADER='${SHELL} /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/pcre-8.39/missing autoheader'AUTOMAKE='${SHELL} /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/pcre-8.39/missing automake-1.15'AWK='gawk'CC='ccache_cc'CCDEPMODE=''CFLAGS='-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 -fpic 'CPP=''CPPFLAGS='-I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include 'CXX='ccache_cxx'CXXCPP=''CXXDEPMODE=''CXXFLAGS='-Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 -minterlink-mips16 -fpic 'CYGPATH_W='echo'DEFS=''DEPDIR='.deps'DISTCHECK_CONFIGURE_FLAGS=''DLLTOOL=''DSYMUTIL=''DUMPBIN=''ECHO_C=''ECHO_N='-n'ECHO_T=''EGREP=''EXEEXT=''EXTRA_LIBPCRE16_LDFLAGS=''EXTRA_LIBPCRE32_LDFLAGS=''EXTRA_LIBPCRECPP_LDFLAGS=''EXTRA_LIBPCREPOSIX_LDFLAGS=''EXTRA_LIBPCRE_LDFLAGS=''FGREP=''GCOV_CFLAGS=''GCOV_CXXFLAGS=''GCOV_LIBS=''GENHTML=''GREP=''HAVE_VISIBILITY=''INSTALL_DATA='${INSTALL} -m 644'INSTALL_PROGRAM='${INSTALL}'INSTALL_SCRIPT='${INSTALL}'INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'LCOV=''LD='mips-openwrt-linux-uclibc-ld'LDFLAGS='-L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib 'LIBBZ2=''LIBOBJS=''LIBREADLINE=''LIBS=''LIBTOOL=''LIBZ=''LIPO=''LN_S=''LTLIBOBJS=''MAKEINFO='${SHELL} /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/pcre-8.39/missing makeinfo'MANIFEST_TOOL=''MKDIR_P='/bin/mkdir -p'NM='mips-openwrt-linux-uclibc-gcc-nm'NMEDIT=''OBJDUMP='mips-openwrt-linux-uclibc-objdump'OBJEXT=''OTOOL64=''OTOOL=''PACKAGE='pcre'PACKAGE_BUGREPORT=''PACKAGE_NAME='PCRE'PACKAGE_STRING='PCRE 8.39'PACKAGE_TARNAME='pcre'PACKAGE_URL=''PACKAGE_VERSION='8.39'PATH_SEPARATOR=':'PCRE_DATE=''PCRE_MAJOR=''PCRE_MINOR=''PCRE_PRERELEASE=''PCRE_STATIC_CFLAG=''PKG_CONFIG='/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/pkg-config'PKG_CONFIG_LIBDIR='/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/pkgconfig:/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/share/pkgconfig'PKG_CONFIG_PATH='/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/pkgconfig:/home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/share/pkgconfig'PTHREAD_CC=''PTHREAD_CFLAGS=''PTHREAD_LIBS=''RANLIB='mips-openwrt-linux-uclibc-gcc-ranlib'SED=''SET_MAKE=''SHELL='/bin/bash'SHTOOL=''STRIP='mips-openwrt-linux-uclibc-strip'VALGRIND_CFLAGS=''VALGRIND_LIBS=''VERSION='8.39'VISIBILITY_CFLAGS=''VISIBILITY_CXXFLAGS=''WITH_GCOV_FALSE=''WITH_GCOV_TRUE=''WITH_JIT_FALSE=''WITH_JIT_TRUE=''WITH_PCRE16_FALSE=''WITH_PCRE16_TRUE=''WITH_PCRE32_FALSE=''WITH_PCRE32_TRUE=''WITH_PCRE8_FALSE=''WITH_PCRE8_TRUE=''WITH_PCRE_CPP_FALSE=''WITH_PCRE_CPP_TRUE=''WITH_REBUILD_CHARTABLES_FALSE=''WITH_REBUILD_CHARTABLES_TRUE=''WITH_UTF_FALSE=''WITH_UTF_TRUE=''WITH_VALGRIND_FALSE=''WITH_VALGRIND_TRUE=''ac_ct_AR=''ac_ct_CC=''ac_ct_CXX=''ac_ct_DUMPBIN=''am__EXEEXT_FALSE=''am__EXEEXT_TRUE=''am__fastdepCC_FALSE=''am__fastdepCC_TRUE=''am__fastdepCXX_FALSE=''am__fastdepCXX_TRUE=''am__include='include'am__isrc=''am__leading_dot='.'am__nodep='_no'am__quote=''am__tar='$${TAR-tar} chof - "$$tardir"'am__untar='$${TAR-tar} xf -'ax_pthread_config=''bindir='/usr/bin'build='x86_64-linux-gnu'build_alias='x86_64-linux-gnu'build_cpu=''build_os=''build_vendor=''datadir='/usr/share'datarootdir='${prefix}/share'docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'dvidir='${docdir}'enable_cpp='yes'enable_pcre16='yes'enable_pcre32=''enable_pcre8=''exec_prefix='/usr'host='mips-openwrt-linux'host_alias='mips-openwrt-linux'host_cpu=''host_os=''host_vendor=''htmldir='${docdir}'includedir='${prefix}/include'infodir='/usr/info'install_sh='${SHELL} /home/alex/Downloads/SDK/OpenWrt-SDK-15.05-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/pcre-8.39/install-sh'libdir='${exec_prefix}/lib'libexecdir='/usr/lib'localedir='${datarootdir}/locale'localstatedir='/var'mandir='/usr/man'mkdir_p='$(MKDIR_P)'oldincludedir='/usr/include'pcre_have_bits_type_traits=''pcre_have_long_long=''pcre_have_type_traits=''pcre_have_ulong_long=''pdfdir='${docdir}'prefix='/usr'program_transform_name='s&$$&&;s&^&&'psdir='${docdir}'sbindir='/usr/sbin'sharedstatedir='${prefix}/com'sysconfdir='/etc'target_alias='mips-openwrt-linux'## ----------- #### confdefs.h. #### ----------- ##/* confdefs.h */#define PACKAGE_NAME "PCRE"#define PACKAGE_TARNAME "pcre"#define PACKAGE_VERSION "8.39"#define PACKAGE_STRING "PCRE 8.39"#define PACKAGE_BUGREPORT ""#define PACKAGE_URL ""#define PACKAGE "pcre"#define VERSION "8.39"configure: exit 77


1 0
原创粉丝点击