Qt嵌入式编译错误。修复“错误:不这样的指令”错误 [英] Qt embedded compile error. fixing "Error: no such instruction" Error

查看:484
本文介绍了Qt嵌入式编译错误。修复“错误:不这样的指令”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用安装在/ home / user / Software的猎鹰板上的安卓工具链来编译qt 4.7.4。

I am trying to compile qt 4.7.4 using the angstrom tool chain installed at /home/user/Software for a beagle board.

我收到的错误是:


/ corelib / arch / qatomic_arm .h:131:错误:没有这样的指令:`swpb%al,%dl,[%esi]'

/corelib/arch/qatomic_arm.h:131: Error: no such instruction: `swpb %al,%dl,[%esi]'

我的qmake。 conf文件如下:

My qmake.conf file is as follows:

#
# qmake configuration for building with arm-none-linux-gnueabi-g++
#

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = arm-angstrom-linux-gnueabi-gcc
QMAKE_CXX              = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK              = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = arm-angstrom-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = arm-angstrom-linux-gnueabi-ar cqs
QMAKE_OBJCOPY          = arm-angstrom-linux-gnueabi-objcopy
QMAKE_STRIP            = arm-angstrom-linux-gnueabi-strip

QMAKE_LIBDIR_QT        = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/${libdir}
QMAKE_MOC              = /usr/local/angstrom/arm/bin/moc4
QMAKE_UIC              = /usr/local/angstrom/arm/bin/uic4
QMAKE_UIC3              = /usr/local/angstrom/arm/bin/uic34
QMAKE_RCC              = /usr/local/angstrom/arm/bin/rcc4
QMAKE_QDBUSCPP2XML      = /usr/local/angstrom/arm/bin/qdbuscpp2xml4
QMAKE_QDBUSXML2CPP      = /usr/local/angstrom/arm/bin/qdbusxml2cpp4

QMAKE_INCDIR          = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/include
QMAKE_LIBDIR          = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/lib
QMAKE_INCDIR_X11      = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include
QMAKE_LIBDIR_X11      = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
QMAKE_INCDIR_QT      = $$[QT_INSTALL_HEADERS]
QMAKE_LIBDIR_QT      = $$[QT_INSTALL_LIBS]
QMAKE_INCDIR_OPENGL  = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include
QMAKE_LIBDIR_OPENGL  = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL      =
QMAKE_LIBDIR_EGL      =
QMAKE_INCDIR_OPENVG  =
QMAKE_LIBDIR_OPENVG  =


load(qt_config)

我的配置命令位于

./configure -embedded arm -prefix /home/thwijeth/Software/qt-4.7.4-embedded -xplatform qws/linux-arm-gnueabi-g++ -fast -little-endian -opensource

有人可以弄清楚为什么会这样吗? >

Can someone figure out why this happens?

推荐答案

一些Google搜索引用以下内容:

Some Googling suggests the following:

BeagleBoard使用TI的 OMAP 353 0 处理器,它使用ARMv7指令集(根据维基百科)。

BeagleBoard uses TI's OMAP 3530 processor, which uses ARMv7 instruction set (according to Wikipedia).

ARM网站建议,从ARMv6起, swpb 指令已被弃用(默认情况下禁用):

The ARM website suggests that the swpb instruction has been deprecated (and disabled by default) since ARMv6:


使用SWP和SWPB,ARMv6及更高版本不推荐使用。 ARMv7的多处理器扩展引入了CP15系统控制寄存器中的SW位。在实现这些扩展的处理器上电或复位后,软件必须将该位设置为1,以使能SWP和SWPB指令。

ARMv6 and later deprecate using SWP and SWPB. The Multiprocessor Extensions to ARMv7 introduce the SW bit in the CP15 System Control Register. On processors that implement these extensions, after power-up or a reset, software must set this bit to 1 to enable use of the SWP and SWPB instructions.

错误报告进一步了解细节:


src / arch / corelib / qatomic_arm.h中的generic armatomics使用 swp swpb 说明。这与Thumb-2不兼容,不会是多核安全的,特别是对于armv7。

The "generic arm" atomics in src/arch/corelib/qatomic_arm.h use the swp and swpb instructions. This is incompatible with Thumb-2 and will not be multicore-safe, especially for armv7.

恐怕这不是我的核心专长领域,我目前还没有这样一个董事会。

I'm afraid this isn't my core area of expertise and I don't have such a board in front of me at the moment.

然而,我的建议是尝试启用系统控制寄存器SW位,看看是否这可以帮助您(看到您没有使用多个内核,或许以上错误报告中提到的问题不会影响您)。

My advice, however is to try enabling the System Control Register SW bit and see if that helps you (seeing as you're not using multiple cores, perhaps the problems referred to in the bug report above will not affect you).

或者,这个补丁看起来像可以为你提供另一个路由使用替代手段模拟问题指示。

Alternatively, this patch looks like it could provide another route for you by emulating the problem instructions using alternative means.

祝你好运!

这篇关于Qt嵌入式编译错误。修复“错误:不这样的指令”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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