CaryStudio

 找回密码
 立即注册
搜索
查看: 2294|回复: 0

【转】 ramips-mt7621交叉编译radvd提示cannot find -lssp错误

[复制链接]
发表于 2017-12-7 15:06:38 | 显示全部楼层 |阅读模式

请先登录

您需要 登录 才可以下载或查看,没有帐号?立即注册

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错误。

错误部分截取如下:
  1. /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
  2. /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
  3. collect2: error: ld returned 1 exit status
  4. make[1]: * [Makefile:880:radvd] 错误 1
  5. make[1]: 离开目录“/home/form/K2P_mt7621/radvd”
  6. make: * [Makefile:754:all] 错误 2
复制代码

原因:
工具链中缺少libssp库,该库包含支持GCC堆栈保护函数的程序。
解决方案:
1. 去掉堆栈保护(在路由器上运行正常,暂时未发现有啥副作用)
(a)打开Makefile,搜索到fstack-protector,将该FLAG注释。

                               
登录/注册后可看大图

(b) 重新编译即可

                               
登录/注册后可看大图

2.手动编译带lssp的gcc
下面附上自己编译的radvd
radvd_mt7621_OpenWrt

参考:http://blog.csdn.net/m584233185/article/details/8514286






回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|CaryStudio ( 粤ICP备16022806号 )

GMT+8, 2023-10-4 23:39 , Processed in 0.089125 second(s), 12 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表