arm 交叉编译找不到so_交叉编译为什么ld找不到共享库/如何进一步调试?

在Ubuntu上尝试为ARM路由器进行交叉编译时遇到错误:ld找不到-lpopt。尽管/lib/x86_64-linux-gnu/目录下存在libpopt.so,但设置LIBRARY_PATH和LD_LIBRARY_PATH等环境变量无法解决问题。将目标架构版本的libpopt.so复制到指定目录,并在Makefile中使用-L参数指定库路径解决了问题。
摘要由CSDN通过智能技术生成

Im trying to cross-compile and link aggregate on ubuntu for my arm-router and I get the following error. In the past I think I have been able to workaround this by setting the appropriate environment variable but this time is not working . Can anyone help me figure out why this might not work:

/home/ubuntu/Downloads/toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi/bin/../lib64/gcc/arm-openwrt-linux-muslgnueabi/4.9.1/../../../../arm-openwrt-linux-muslgnueabi/bin/ld:

cannot find -lpopt

however libpopt.so exists in :

lrwxrwxrwx 1 root root 34 Sep 10 12:46 /lib/x86_64-linux-gnu/libpopt.so -> /lib/x86_64-linux-gnu/libpopt.so.0

I set the following environment variables , in order of desperation, to no avail.

LIBRARY_PATH=/lib/x86_64-linux-gnu/

LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/

PATH=/lib/x86_64-linux-gnu/:/usr/includ

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值