移植expect出现的错误提示,以及解决办法

工具链为:

OpenWrt-Toolchain-x86-generic_gcc-4.8-linaro_glibc-2.21.Linux-i686.tar.bz2

错误提示如下:

i486-openwrt-linux-gnu-gcc.bin: warning: environment variable 'STAGING_DIR' not defined
i486-openwrt-linux-gnu-gcc.bin: warning: environment variable 'STAGING_DIR' not defined
/opt/openwrt-i386-glibc-gcc/bin/../lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/bin/ld: warning: libutil.so.1, needed by /home/gino/expect5.45/libexpect5.45.so, not found (try using -rpath or -rpath-link)
/opt/openwrt-i386-glibc-gcc/bin/../lib/gcc/i486-openwrt-linux-gnu/4.8.3/../../../../i486-openwrt-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so, not found (try using -rpath or -rpath-link)
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `pthread_setspecific@GLIBC_2.0'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `pthread_key_delete@GLIBC_2.0'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `open64@GLIBC_2.2'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `lseek64@GLIBC_2.2'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `pthread_key_create@GLIBC_2.0'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `pthread_getspecific@GLIBC_2.0'
/home/gino/expect5.45/libexpect5.45.so: undefined reference to `openpty@GLIBC_2.0'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `pthread_join@GLIBC_2.0'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `pthread_create@GLIBC_2.1'
/home/gino/tcl8.6.4/unix/tmp/lib/libtcl8.6.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.1'
collect2: error: ld returned 1 exit status
make: *** [expect] 错误 1

对于警告信息部分的解决办法是。编译的时候选上编译SDK,在编译好的SDK中取出工具链。然后安装好工具链之后,将工具链目录下的 staging_dir 目录加入到环境变量 STAGING_DIR 中。(找不到的话,用 find 命令查找)


提示函数未定义部分:

在Makefiles中加入对应的链接库

-lutil
-lphread


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值