请先登录
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 yuki 于 2017-12-7 15:06 编辑
[OpenWRT交叉编译]ramips-mt7621交叉编译radvd提示cannot find -lssp错误
转载出自:http://blog.csdn.net/Form_/article/details/78054633
路由器:斐讯K2P
工具链:OpenWrt-SDK-15.05.1-ramips-mt7621_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
源码:Radvd
由于在原生ipv6中需要使用radvd来做RA(Router Advertisement),路由器利用此消息,周期性的通告其存在及各种链路参数,或者用于响应 Router Solicitation。所以就自己动手用工具链交叉编译了一发,在编译过程中碰到cannot find -lssp错误。
错误部分截取如下:- /home/form/K2P_mt7621/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lssp_nonshared
- /home/form/K2P_mt7621/toolchain-mipsel_1004kc+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lssp
- collect2: error: ld returned 1 exit status
- make[1]: * [Makefile:880:radvd] 错误 1
- make[1]: 离开目录“/home/form/K2P_mt7621/radvd”
- make: * [Makefile:754:all] 错误 2
复制代码
原因:工具链中缺少libssp库,该库包含支持GCC堆栈保护函数的程序。 解决方案:
1. 去掉堆栈保护(在路由器上运行正常,暂时未发现有啥副作用)(a)打开Makefile,搜索到fstack-protector,将该FLAG注释。
2.手动编译带lssp的gcc 参考:http://blog.csdn.net/m584233185/article/details/8514286
|