I want to build as a static library from the Qt 4.8.7 source, only the QtCore and QtNetworking components, for an embedded ARM64 platform as static libraries. This if for a native platform build on the ARM platform itself as opposed to cross compiling.
In summary, while the configuration procedure works without event, where on the command line I specify the ARM architecture since the configuration process is unable to identify the aarch64 platform as ARM, during the build procedure, I get assembly errors.
It seems the area of failure may be with the QAtomic assembly implementation. When I do not configure the architecture as ARM, and the architecture is identified as simply generic, I am able to build, but there are warnings about using a very inefficient pthread mutex used to implement QAtomic operations for platforms not yet supported.
I desperately need to use the QAtomic implementation that uses fast processor specific assembly language.
The following configure message is displayed when using the generic platform architecture
My suspicion is that the Qt 4.8.x source distribution may not have the proper assembly language or atomic operations for the ARM64 platform, or that the source needs to be augmented to do so.Quote:
NOTICE: Atomic operations are not yet supported for this
architecture.
Qt will use the 'generic' architecture instead, which uses a
single pthread_mutex_t to protect all atomic operations. This
implementation is the slow (but safe) fallback implementation
for architectures Qt does not yet support.
I was wondering if perhaps I needed to duplicate some mkspecs content that is provided with Qt5 as a possible solution or other source code to support the ARM64 build.
Information on the ARM itself is as follows:
My configuration settings are as follows:Quote:
lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Vendor ID: ARM
Model: 4
Model name: Cortex-A53
Stepping: r0p4
BogoMIPS: 100.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32
Code:
./configure -static -opensource -confirm-license -no-qt3support -no-phonon -no-svg -no-webkit -no-javascript-jit -no-script -no-scripttools -no-declarative -no-declarative-debug --no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-pch -no-3dnow -no-avx -no-neon -no-nis -no-cups -no-dbus -arch arm -platform linux-g++ -littleendian -no-opengl -no-glib -nomake demos -nomake examples -nomake docs -nomake tools -nomake translations -no-opengl -no-xshape -no-xvideo -no-gtkstyle -no-openvg -no-sm -no-xvideo -no-gui -verbose -no-svg -no-xmlpatterns -no-accessibility -no-largefile
Here I have specified the target platform as ARM since ./configure was not able to resolve the platform using the retrieved aarch64 architecture.
Specifying arm and littleendian on command line to the configuration, the configuration process works without event to completion with the following summary. You can see I am simply trying to build the QtCore and QtNetwork libraries, and nothing else, so bare bones.
Code:
Build type: linux-g++ Architecture: arm Platform notes: - Also available for Linux: linux-kcc linux-icc linux-cxx Build .................. libs Configuration .......... release largefile stl minimal-config small-config medium-config large-config full-config no-pkg-config accessibility static reduce_exports ipe Debug .................. no Qt 3 compatibility ..... no QtDBus module .......... no QtConcurrent code ...... yes QtGui module ........... yes QtScript module ........ no QtScriptTools module ... no QtXmlPatterns module ... no Phonon module .......... no Multimedia module ...... auto SVG module ............. no WebKit module .......... no Declarative module ..... no Support for S60 ........ no Symbian DEF files ...... no STL support ............ yes PCH support ............ no MMX/3DNOW/SSE/SSE2/SSE3. no/no/no/no/no SSSE3/SSE4.1/SSE4.2..... no/no/no AVX..................... no iWMMXt support ......... no NEON support ........... no Graphics System ........ default IPv6 support ........... yes IPv6 ifname support .... yes getaddrinfo support .... yes getifaddrs support ..... yes Accessibility .......... yes NIS support ............ no CUPS support ........... no Iconv support .......... yes Glib support ........... no GStreamer support ...... no PulseAudio support ..... no Large File support ..... yes GIF support ............ no TIFF support ........... no JPEG support ........... no PNG support ............ no MNG support ............ no zlib support ........... system Session management ..... no OpenGL support ......... no OpenVG support ......... no NAS sound support ...... no XShape support ......... yes XVideo support ......... no XSync support .......... yes Xinerama support ....... no Xcursor support ........ no Xfixes support ......... runtime Xrandr support ......... no Xrender support ........ no Xi support ............. no MIT-SHM support ........ yes FontConfig support ..... no XKB Support ............ yes immodule support ....... yes GTK theme support ...... no SQLite support ......... plugin (qt) OpenSSL support ........ yes (run-time) Alsa support ........... no ICD support ............ no libICU support ......... no Use system proxies ..... no
During the make procedure following the configuration, the following compile issue is consistently indicated.
The failure occurs in qabstractanimation.o, that is part of the core library.
My application has no Qt based user interface.
Code:
g++ -Wl,-rpath-link,/home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.8.7/lib -Wl,-rpath,/usr/local/Trolltecz make[1]: Leaving directory '/home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/src/tools/uic' cd src/corelib/ && make -f Makefile make[1]: Entering directory '/home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/src/corelib' /home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/bin/moc -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOCp g++ -c -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCIp {standard input}: Assembler messages: {standard input}:4990: Info: did you mean this? {standard input}:4990: Info: swpb w0, w26, [x23] {standard input}:5016: Error: operand mismatch -- `swpb x2,x1,[x23]' {standard input}:5016: Info: did you mean this? {standard input}:5016: Info: swpb w2, w1, [x23] {standard input}:5232: Error: operand mismatch -- `swpb x0,x24,[x22]' {standard input}:5232: Info: did you mean this? {standard input}:5232: Info: swpb w0, w24, [x22] {standard input}:5245: Error: operand mismatch -- `swpb x0,x2,[x22]' {standard input}:5245: Info: did you mean this? {standard input}:5245: Info: swpb w0, w2, [x22] {standard input}:5317: Error: operand mismatch -- `swpb x0,x22,[x1]' {standard input}:5317: Info: did you mean this? {standard input}:5317: Info: swpb w0, w22, [x1] {standard input}:5329: Error: operand mismatch -- `swpb x0,x22,[x28]' {standard input}:5329: Info: did you mean this? {standard input}:5329: Info: swpb w0, w22, [x28] {standard input}:5343: Error: operand mismatch -- `swpb x3,x2,[x0]' {standard input}:5343: Info: did you mean this? {standard input}:5343: Info: swpb w3, w2, [x0] {standard input}:5410: Error: operand mismatch -- `swpb x0,x22,[x21]' {standard input}:5410: Info: did you mean this? {standard input}:5410: Info: swpb w0, w22, [x21] {standard input}:5423: Error: operand mismatch -- `swpb x0,x2,[x21]' {standard input}:5423: Info: did you mean this? {standard input}:5423: Info: swpb w0, w2, [x21] {standard input}:5518: Error: operand mismatch -- `swpb x0,x22,[x21]' {standard input}:5518: Info: did you mean this? {standard input}:5518: Info: swpb w0, w22, [x21] {standard input}:5543: Error: operand mismatch -- `swpb x2,x1,[x21]' {standard input}:5543: Info: did you mean this? {standard input}:5543: Info: swpb w2, w1, [x21] {standard input}:6072: Error: operand mismatch -- `swpb x0,x21,[x19]' {standard input}:6072: Info: did you mean this? {standard input}:6072: Info: swpb w0, w21, [x19] {standard input}:6086: Error: operand mismatch -- `swpb x0,x21,[x19]' {standard input}:6086: Info: did you mean this? {standard input}:6086: Info: swpb w0, w21, [x19] {standard input}:6102: Error: operand mismatch -- `swpb x0,x1,[x23]' {standard input}:6102: Info: did you mean this? {standard input}:6102: Info: swpb w0, w1, [x23] Makefile:6977: recipe for target '.obj/release-static/qabstractanimation.o' failed make[1]: *** [.obj/release-static/qabstractanimation.o] Error 1 make[1]: Leaving directory '/home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/src/corelib' Makefile:194: recipe for target 'sub-corelib-make_default-ordered' failed make: *** [sub-corelib-make_default-ordered] Error 2