原文地址:http://www.kuche361.com/ht/view/id-39165

这是个臭名昭著的问题,试了很多方法,也没有解决。

7月15日~16日加起来搞了一天,把4.6.3重新编译了两次,还是没有解决,而且还证明用mini6410提供的4.5.1版本的gcc,能够编译成功,但是QT4.6.3下载到开发板运行Demo程序,提示错误,不兼容,郁闷啊,因此一定要用4.4.3版本的gcc。

其中,网上有一篇英文写的很好的文章,编译前修改了QT源码目录内两个.conf文件,尤其是后面红字部分特别提到了avoid some illegal instruction,以为可以类似解决:

Qt 4.6.2 installation procedure for FriendlyARM mini 2440 Linux

2011年03月21日 星期一 18:51

Qt 4.6.2 installation procedure for FriendlyARM mini 2440 Linux

Submitted by paolo on Sun 07/25/2010 - 03:44

This tutorial will provide a simple list of steps necessary to compile and install Qt 4.6.2 on Mini 2440 friendly ARM board. Italian speaking people can read this tutorial on Qt-Italia community website.

The board is equipped with the default GNU/Linux operating system (kernel 2.6.29)

This guide has been tested on following GNU/Linux host distributions:

CentOS 5.4

Fedora 12

Ubuntu 9.10

Some problems were found on following host distributions:

Ubuntu 9.04

OpenSUSE 11.2

First of all you have to download the GCC toolchain provided by the supplier:

Now untar the tgz file:

tar -xzf arm-linux-gcc-4.3.2.tgz

and then copy the directory tree under

/usr/local/

Remember to export this path on your shell

export PATH=/usr/local/arm/4.3.2/bin:$PATH

Now we can download Qt

and untar and unzip the file on a local directory (example: /home/user)

Now before running the configure tool you have to modify the qmake.conf file to inform Qt about your toolchain as described here:

File: mkspecs/qws/linux-arm-g++/qmake.conf

Now change following lines:

#QMAKE_CC = arm-linux-gcc

#QMAKE_CXX = arm-linux-g++

#QMAKE_LINK = arm-linux-g++

#QMAKE_LINK_SHLIB = arm-linux-g++

with:

QMAKE_CC = arm-none-linux-gnueabi-gcc

QMAKE_CXX = arm-none-linux-gnueabi-g++

QMAKE_LINK = arm-none-linux-gnueabi-g++

QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

Also change the following lines:

#QMAKE_AR = arm-linux-ar cqs

#QMAKE_OBJCOPY = arm-linux-objcopy

#QMAKE_STRIP = arm-linux-strip

with:

QMAKE_AR = arm-none-linux-gnueabi-ar cqs

QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy

QMAKE_RANLIB = arm-none-linux-gnueabi–ranlib

In order toavoid some illegal instruction on your ARM compiled application binaries you have to deactivate compiler optimization:

File: /mkspecs/common/g++.conf

Change this line

QMAKE_CFLAGS_RELEASE += -O2

With:

QMAKE_CFLAGS_RELEASE += -O0

Now we are ready; in the Qt root subdirectory we run this command:

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix \

/usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support \

-no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools

And then we can run the command

make

If everything is ok now we can do

make install

In order to run our ARM compiled applications we have to set following environment variables on the mini2440 board:

export TSLIB_TSEVENTTYPE=INPUT

export TSLIB_CONSOLEDEVICE=none

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_TSDEVICE=/usr/input/ts

export TSLIB_CALIBFILE=/usr/etc/pointercal

export TSLIB_CONFFILE=/usr/etc/ts.conf

export TSLIB_PLUGINDIR=/usr/lib/ts

export LD_LIBRARY_PATH=/usr/local/Qt/lib

export QTDIR=/usr/local/Qt

export QWS_MOUSE_PROTO=tslib:/usr/input/ts

export QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190

The Qt library binary (and fonts subdir) shall be placed on a user defined directory of the mini 2440m board and then it is necessary to set LD_LIBRARY_PATH to this directory.

Qt binary application must be run with –qws command line argument to inform Qt that we are working on a Linux embedded system.

Using the described procedure I was able to compile Qt qwt library and embedded widgets example.

YouTube Video demo: Embedded Widgets example

YouTube Video demo: Qwt examples

If you have questions you can leave a comment to this post or better you can post to this forum

Good Luck!

mini-2440-board

折腾半天,还是没有用,没有解决Illegal instruction错误问题。

illegal instruction错误相关推荐

  1. import 出现 Illegal instruction错误

    在Jetson上安装完numpy,pytorch等后,import 模块时出现Illegal instruction错误,后经过pip3 uninstall numpy后错误解决.jetson预装了多 ...

  2. 关于qte illegal instruction的一些心得

    最近半个月在按照天嵌的TQ2440做qte方面的移植工作,去年刚拿到板子的时候用的是qt4.5的源码,那时还能顺利的移植到arm板上,可是最近也是按照天嵌手册来移植,当我编译一个qt测试程序,在arm ...

  3. 非法指令(Illegal Instruction)问题定位

    关键词:Illegal Instruction.SIGILL等. 进程在运行过程中会收到SIGILL信号,此类错误是由操作系统发送给进程的. SIGILL是某个进程中的某一句不能被CPU识别指令,这些 ...

  4. [ARM]【编译】【实践】 - 浮点编译选项NEON引发的Skia的库Illegal instruction运行错误和解决办法

    前言,ARM编译器选项除了优化系统代码性能外,往往还具备其他一些设定,例如警告级别,和指令集的扩展 本文论述工作中遇到的一个编译开源浏览器chromine遇到的问题,由编译选项引发的可执行文件的Ill ...

  5. 程序报错误Illegal instruction的解决办法

    问题: 目标板是rt5350,使用mipsel-linux-gcc 3.4.2编译器,源程序由C++转换到C语言. 程序中有3个线程:主线程.接受消息队列的线程和上传采集数据的线程: 当把上传采集数据 ...

  6. 解决英伟达Jetson平台使用Python时的出现“Illegal instruction(cpre dumped)”错误

    问题描述 笔者在使用Jetson NX平台配置深度学习开发环境,安装好了PyTorch(1.7.0)与torchvision(0.8.1)后,在安装"seaborn"出现以下问题: ...

  7. linux运行非法指令,illegal instruction非法指令的解决思路

    我移植x264到开发板上,arm linux系统.移植好后将库都拷贝到nfs文件系统上,可是执行后出现illegal instruction的错误. 可能是x264配置问题,我的x264开始的编译配置 ...

  8. jetson nano 报错Illegal instruction(core dumped)

    jetson nano 报错Illegal instruction(core dumped) 问题描述:好不容易对jetson nano开发板更换好镜像源.配置好远程xrdp桌面(可以参考我往期博文) ...

  9. 解决MacBook Pro M2关于inport tensorflow 出现的Illegal instruction: 4

    关于MacBook Pro M2关于inport tensorflow 出现的Illegal instruction: 4 1. 问题描述:新版的MacBook pro在完整移植老版python环境后 ...

最新文章

  1. FPGA/IC技术交流2020
  2. 【Python】8000字:Python时间系列之datetime模块
  3. 蓝牙模块怎么指定查询另一个蓝牙模块_拆解报告:亚马逊10.or Buds真无线蓝牙耳机...
  4. mysql 提升 权限_如何使用MySQL提升权限
  5. jsf tree组件_JSF:在传统组件和时尚性能杀手之间进行选择
  6. Error0---local variable S is accessed from within inner class; needs to be declared final
  7. python3-numpy数组切片和索引
  8. android序列化好处,浅谈Android序列化
  9. 释放Ubuntu/Linux系统cache,增加可用内存空间
  10. 洲明科技与意法半导体合作开发新一代LED显示屏
  11. Hyper-V 3.0网络虚拟化PART 3:内部交换机
  12. WIN10系统蓝屏解决方法
  13. 文献翻译——YOLO9000:Better,Faster,Stronger(YOLOv2)
  14. 计算机思维能力培养的核心是什么,【计算机基础论文】计算机基础教学中计算思维能力培养(共6714字)...
  15. ukulele弹奏模拟器v1.0(待完善)
  16. Android 恢复出厂设置时间重置
  17. [奥塔在线]压测大师养成之五:Centos下Jmeter安装与部署
  18. 从0开始的技术美术之路(十六)延迟渲染
  19. 关于xxl-job-admin使用中指定账号密码时的坑
  20. 公司要求小时工必须干满4个月,否则离职后没有工资,这合法吗?

热门文章

  1. python什么是调用_python open需要调用什么
  2. win2003 IIS6,能访问html页 但是不能访问aspx页解决办法汇总
  3. K - FatMouse and Cheese
  4. 第七章 前端开发——前端工程化(NPM、脚手架、前端环境搭建)
  5. linux常见操作命令及相关延伸
  6. Ado.Net实现简易(省、市、县)三级联动查询,还附加Access数据
  7. webService初探
  8. 工作中发现的相对布局中的一个小技巧
  9. 19日零时起降低成品油价格 燃油税元旦起开征
  10. [导入]sqlserver2005 数据挖掘控件研究