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

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

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:

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
My configuration settings are as follows:

Qt Code:
  1. ./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
To copy to clipboard, switch view to plain text mode 

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.

Qt Code:
  1. Build type: linux-g++
  2. Architecture: arm
  3. Platform notes:
  4.  
  5. - Also available for Linux: linux-kcc linux-icc linux-cxx
  6.  
  7. Build .................. libs
  8. Configuration .......... release largefile stl minimal-config small-config medium-config large-config full-config no-pkg-config accessibility static reduce_exports ipe
  9. Debug .................. no
  10. Qt 3 compatibility ..... no
  11. QtDBus module .......... no
  12. QtConcurrent code ...... yes
  13. QtGui module ........... yes
  14. QtScript module ........ no
  15. QtScriptTools module ... no
  16. QtXmlPatterns module ... no
  17. Phonon module .......... no
  18. Multimedia module ...... auto
  19. SVG module ............. no
  20. WebKit module .......... no
  21. Declarative module ..... no
  22. Support for S60 ........ no
  23. Symbian DEF files ...... no
  24. STL support ............ yes
  25. PCH support ............ no
  26. MMX/3DNOW/SSE/SSE2/SSE3. no/no/no/no/no
  27. SSSE3/SSE4.1/SSE4.2..... no/no/no
  28. AVX..................... no
  29. iWMMXt support ......... no
  30. NEON support ........... no
  31. Graphics System ........ default
  32. IPv6 support ........... yes
  33. IPv6 ifname support .... yes
  34. getaddrinfo support .... yes
  35. getifaddrs support ..... yes
  36. Accessibility .......... yes
  37. NIS support ............ no
  38. CUPS support ........... no
  39. Iconv support .......... yes
  40. Glib support ........... no
  41. GStreamer support ...... no
  42. PulseAudio support ..... no
  43. Large File support ..... yes
  44. GIF support ............ no
  45. TIFF support ........... no
  46. JPEG support ........... no
  47. PNG support ............ no
  48. MNG support ............ no
  49. zlib support ........... system
  50. Session management ..... no
  51. OpenGL support ......... no
  52. OpenVG support ......... no
  53. NAS sound support ...... no
  54. XShape support ......... yes
  55. XVideo support ......... no
  56. XSync support .......... yes
  57. Xinerama support ....... no
  58. Xcursor support ........ no
  59. Xfixes support ......... runtime
  60. Xrandr support ......... no
  61. Xrender support ........ no
  62. Xi support ............. no
  63. MIT-SHM support ........ yes
  64. FontConfig support ..... no
  65. XKB Support ............ yes
  66. immodule support ....... yes
  67. GTK theme support ...... no
  68. SQLite support ......... plugin (qt)
  69. OpenSSL support ........ yes (run-time)
  70. Alsa support ........... no
  71. ICD support ............ no
  72. libICU support ......... no
  73. Use system proxies ..... no
To copy to clipboard, switch view to plain text mode 

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.


Qt Code:
  1. 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
  2. make[1]: Leaving directory '/home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/src/tools/uic'
  3. cd src/corelib/ && make -f Makefile
  4. make[1]: Entering directory '/home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/src/corelib'
  5. /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
  6. 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
  7. {standard input}: Assembler messages:
  8. {standard input}:4990: Info: did you mean this?
  9. {standard input}:4990: Info: swpb w0, w26, [x23]
  10. {standard input}:5016: Error: operand mismatch -- `swpb x2,x1,[x23]'
  11. {standard input}:5016: Info: did you mean this?
  12. {standard input}:5016: Info: swpb w2, w1, [x23]
  13. {standard input}:5232: Error: operand mismatch -- `swpb x0,x24,[x22]'
  14. {standard input}:5232: Info: did you mean this?
  15. {standard input}:5232: Info: swpb w0, w24, [x22]
  16. {standard input}:5245: Error: operand mismatch -- `swpb x0,x2,[x22]'
  17. {standard input}:5245: Info: did you mean this?
  18. {standard input}:5245: Info: swpb w0, w2, [x22]
  19. {standard input}:5317: Error: operand mismatch -- `swpb x0,x22,[x1]'
  20. {standard input}:5317: Info: did you mean this?
  21. {standard input}:5317: Info: swpb w0, w22, [x1]
  22. {standard input}:5329: Error: operand mismatch -- `swpb x0,x22,[x28]'
  23. {standard input}:5329: Info: did you mean this?
  24. {standard input}:5329: Info: swpb w0, w22, [x28]
  25. {standard input}:5343: Error: operand mismatch -- `swpb x3,x2,[x0]'
  26. {standard input}:5343: Info: did you mean this?
  27. {standard input}:5343: Info: swpb w3, w2, [x0]
  28. {standard input}:5410: Error: operand mismatch -- `swpb x0,x22,[x21]'
  29. {standard input}:5410: Info: did you mean this?
  30. {standard input}:5410: Info: swpb w0, w22, [x21]
  31. {standard input}:5423: Error: operand mismatch -- `swpb x0,x2,[x21]'
  32. {standard input}:5423: Info: did you mean this?
  33. {standard input}:5423: Info: swpb w0, w2, [x21]
  34. {standard input}:5518: Error: operand mismatch -- `swpb x0,x22,[x21]'
  35. {standard input}:5518: Info: did you mean this?
  36. {standard input}:5518: Info: swpb w0, w22, [x21]
  37. {standard input}:5543: Error: operand mismatch -- `swpb x2,x1,[x21]'
  38. {standard input}:5543: Info: did you mean this?
  39. {standard input}:5543: Info: swpb w2, w1, [x21]
  40. {standard input}:6072: Error: operand mismatch -- `swpb x0,x21,[x19]'
  41. {standard input}:6072: Info: did you mean this?
  42. {standard input}:6072: Info: swpb w0, w21, [x19]
  43. {standard input}:6086: Error: operand mismatch -- `swpb x0,x21,[x19]'
  44. {standard input}:6086: Info: did you mean this?
  45. {standard input}:6086: Info: swpb w0, w21, [x19]
  46. {standard input}:6102: Error: operand mismatch -- `swpb x0,x1,[x23]'
  47. {standard input}:6102: Info: did you mean this?
  48. {standard input}:6102: Info: swpb w0, w1, [x23]
  49. Makefile:6977: recipe for target '.obj/release-static/qabstractanimation.o' failed
  50. make[1]: *** [.obj/release-static/qabstractanimation.o] Error 1
  51. make[1]: Leaving directory '/home/user/Downloads/xfer/qt-everywhere-opensource-src-4.8.7/src/corelib'
  52. Makefile:194: recipe for target 'sub-corelib-make_default-ordered' failed
  53. make: *** [sub-corelib-make_default-ordered] Error 2
To copy to clipboard, switch view to plain text mode