w_scan交叉编译的问题 [英] w_scan cross compile issue

查看:607
本文介绍了w_scan交叉编译的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我的 w_scan 项目(用于执行频率扫描DVB和ATSC传输的小命令行工具。):// wirbel .htpc-forum.de / w_scan / index_en.html相对=nofollow> http://wirbel.htpc-forum.de/w_scan/index_en.html 。我还安装 GCC-ARM的Linux的gnueabi 在我的Ubuntu x86_64的。

我使用 ./配置主机=臂的Linux CC =臂Linux的gnueabi-GCC 命令交叉编译,并它产生一个二进制文件。然而,我的文件复制到我的目标板,并执行该文件,它显示了 SH:./w_scan:没有这样的文件或目录


我使用文件命令可以查看二进制文件的信息,它显示了 ELF 32位LSB的可执行文件,ARM版本1(SYSV),动态链接(使用共享库),为GNU / Linux 2.6.31,BuildID [SHA1] = 0x9a584b4720fadf5eb5b77034ac85092daeb728c9,不可剥离

我发现该错误信息表示交叉编译的配置不正确。(参考 HTTP :?//ubuntuforums.org/showthread.php T = 1141792 )。如何解决我的配置和正确的交叉编译该项目,谢谢!


解决方案

  1. ./配置主机=臂的Linux CC =臂Linux的gnueabi-GCC

  2. 请CFLAGS = -static

  3. 复制二进制文件到我的目标板,它可以正常和成功执行。

和文件w_scan会表演
ELF 32位LSB的可执行文件,ARM版本1(SYSV),静态链接,为GNU / Linux 2.6.31,BuildID [SHA1] = 0x67b7e9f93015607f891c0b77493d9e47059ef6a1,不可剥离

I download the w_scan project(a small command line utility used to perform frequency scans for DVB and ATSC transmissions.) from http://wirbel.htpc-forum.de/w_scan/index_en.html. I also install gcc-arm-linux-gnueabi on my Ubuntu x86_64.

I use the ./configure --host=arm-linux CC=arm-linux-gnueabi-gcc command to cross-compile, and it generates a binary file. However, I copy that file to my target board and execute that file, it shows sh: ./w_scan: No such file or directory.

I use the file command to see information of that binary file, it shows ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.31, BuildID[sha1]=0x9a584b4720fadf5eb5b77034ac85092daeb728c9, not stripped.

I found that error message stands the configuration of cross-compile doesn't correct.(reference http://ubuntuforums.org/showthread.php?t=1141792). How can I fix my configuration and correct cross-compile that project, THANKS!

解决方案

  1. ./configure --host=arm-linux CC=arm-linux-gnueabi-gcc
  2. make CFLAGS=-static
  3. copy that binary file to my target board, it can execute normally and successfully.

And the file w_scan will shows ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.31, BuildID[sha1]=0x67b7e9f93015607f891c0b77493d9e47059ef6a1, not stripped.

这篇关于w_scan交叉编译的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆