Qt embedded compile error. fixing "Error: no such instruction" Error

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

The error I am receiving is:

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

My qmake.conf file is as follows:

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


# 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_OPENGL  = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include
QMAKE_LIBDIR_OPENGL  = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib


my configure command is below

./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?


Some Googling suggests the following:

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

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

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.

A bug report goes into more detail:

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.

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.

Good luck!

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

%esi is an x86 register, and al and dl are also x86 looking lower half of the 16bit ax and dx register? I looks likes Qt is configured for an ARM processor and you have x86 gcc compiling it.

... probably removing -fast got configure to pick the right compiler.

actully removing the -fast did the trick. So the command finally used was

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

Need Your Help

perl assigns key with undefined value

perl hashtable

I have a piece of code which used to look like this:

boost::bind error while using asio with accepter.async_accept

c++ boost boost-asio boost-bind

I am going through this boost tutorial on http://gwenael-dunand.developpez.com/tutoriels/cpp/boost/asio/ and It is giving me loads of error on