May 10, 2011

www.swhweng.co.nr www.swhweng...
Lab Rat
184 posts

Qt for Android: Assembler messages: Fatal error: Invalid -march= option: `armv5te’

 

Hello,
After I’ve downloaded Android SDK and Android NDK and I’ve created AVD Android 2.2 API level 8
and I’ve installed Necessitas tool for building and deploying Qt applications to Android OS I’ve assigned Android NDK toolchain version as arm-linux-androiddeaby-4.4.3. Also I’ve assigned Qt version from the Necessitas directory.

The problem is: when I did unpack of android ndk I’ve got some error message that there was no some directory on my Ubuntu ( something with arm ) but after that it was installed ok.
And when I’ve putted Qt version and Android SDK and NDK versions in Qt Creator options I’ve got android directory with shell java files created as in the videos only when launching as root.
But the main problem is when I build Qt project ( with android directory created in project folder’s root ) I get following error both on root and user login:

Assembler messages:
Fatal error: Invalid -march= option: `armv5te’

Does anybody know why that message ( error ) ? What is the problem?
Thank you very much. I will try to help here too.

9 replies

May 11, 2011

stuk stuk
Ant Farmer
561 posts

I don’t know necessitas…i can only redirect to ufficial support page [groups.google.com].

May 11, 2011

Volker Volker
Ant Farmer
5428 posts
Pavel Mazniker wrote:
Assembler messages: Fatal error: Invalid -march= option: `armv5te’

I’m in no means familiar with necessitats, but this error message makes me suppose that creator picked up the wrong tool chain, because the cross compilation fails.

May 11, 2011

brijeshvpatel brijeshvpatel
Lab Rat
8 posts

Can you check QMAKE_CFLAGS in your qmake.conf file for qws arm architecture?

 Signature 

Brijesh

May 11, 2011

Andre Andre
Robot Herder
6394 posts

Note:
The moderators have decided to delete the three other posts you made in several forums here. Please do not cross post.

May 11, 2011

www.swhweng.co.nr www.swhweng...
Lab Rat
184 posts

Hello,
ok
I’ve choosed arm-linux-androiddeaby-4.4.3 toolchain
I will check the flag and will write here. Very probably the problem will be solved.

May 11, 2011

www.swhweng.co.nr www.swhweng...
Lab Rat
184 posts

Can you check QMAKE_CFLAGS in your qmake.conf file for qws arm architecture?

in what directory that file should be?
I’ve found only .qmake cache file in /opt/necessitas/Android/4.7.60
I’ve opened it and there are:

  1. CONFIG +=  cross_compile release shared dll qpa stl precompile_header dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
  2. QT_SOURCE_TREE = $$quote(/opt/necessitas/Android/4.7.60)
  3. QT_BUILD_TREE = $$quote(/opt/necessitas/Android/4.7.60)
  4. QT_BUILD_PARTS = libs docs translations
  5. QMAKE_ABSOLUTE_SOURCE_ROOT = $$QT_SOURCE_TREE
  6. QMAKE_MOC_SRC    = $$QT_BUILD_TREE/src/moc
  7.  
  8. #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
  9. QMAKE_MOC        = $$QT_BUILD_TREE/bin/moc
  10. QMAKE_UIC        = $$QT_BUILD_TREE/bin/uic
  11. QMAKE_UIC3       = $$QT_BUILD_TREE/bin/uic3
  12. QMAKE_RCC        = $$QT_BUILD_TREE/bin/rcc
  13. QMAKE_QDBUSXML2CPP = $$QT_BUILD_TREE/bin/qdbusxml2cpp
  14. QMAKE_INCDIR_QT  = $$QT_BUILD_TREE/include
  15. QMAKE_LIBDIR_QT  = $$QT_BUILD_TREE/lib
  16.  
  17. QT_LFLAGS_ODBC   = -lodbc
  18. QMAKESPEC = $$QT_BUILD_TREE/mkspecs/android-g++
  19. styles += cde mac motif plastique cleanlooks windows
  20. decorations += default windows styled
  21. mouse-drivers += pc
  22. gfx-drivers += linuxfb
  23. mouse-drivers += linuxtp
  24. kbd-drivers += tty
  25. styles += android
  26. DEFINES += QT_NO_CORESERVICES
  27. JAVASCRIPTCORE_JIT = no
  28. PRECOMPILED_DIR = .pch/release-shared
  29. OBJECTS_DIR = .obj/release-shared
  30. MOC_DIR = .moc/release-shared
  31. RCC_DIR = .rcc/release-shared
  32. UI_DIR = .uic/release-shared
  33. QMAKE_RPATHDIR += "/data/data/eu.licentia.necessitas.ministro/files/qt/lib"
  34. sql-drivers =
  35. sql-plugins =  sqlite
  36.  
  37.  
  38. also when compiling the next command with flags executed:
  39.  
  40. The process "/usr/bin/make" exited normally.
  41. Configuration unchanged, skipping qmake step.
  42. Starting: "/usr/bin/make" -w
  43. make: Entering directory `/home/pavel/Projects/mobile_example_1-build-android'
  44. /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/mainwindow.ui -o ui_mainwindow.h
  45. /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/map.ui -o ui_map.h
  46. /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/contact_options.ui -o ui_contact_options.h
  47. /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/amf.ui -o ui_amf.h
  48. /home/pavel/Android/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fpic -mthumb -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wa,--noexecstack -DQT_NO_QWS_TRANSFORMED -Os -g -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/necessitas/Android/4.7.60/mkspecs/android-g++ -I../mobile_example_1 -I/opt/necessitas/Android/4.7.60/include/QtCore -I/opt/necessitas/Android/4.7.60/include/QtGui -I/opt/necessitas/Android/4.7.60/include -I. -I. -I../mobile_example_1 -I../../Android/android-ndk-r5b/platforms/android-4/arch-arm/usr/include -I../../Android/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/include -I../../Android/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -I. -o main.o ../mobile_example_1/main.cpp
  49. Assembler messages:
  50. Fatal error: Invalid -march= option: `armv5te'
  51. make: Leaving directory `/home/pavel/Projects/mobile_example_1-build-android'
  52. make: *** [main.o] Error 1

A bit later you will get additional experiments’ to fix this problem examples.

May 12, 2011

www.swhweng.co.nr www.swhweng...
Lab Rat
184 posts

Hi
I’ve fixed now previous problem ( after I’ve used tar xfj to unpack android ndk archive, before I’ve unpacked on Krusader ) , now the project builded but there is an error when building package for android:

  1. -resource-src:
  2.      [echo] Generating R.java / Manifest.java from the resources...
  3.      [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: error: No resource identifier found for attribute 'largeScreens' in package 'android'
  4.      [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: error: No resource identifier found for attribute 'normalScreens' in package 'android'
  5.      [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: e_
  6.      [aapt] rror: No resource identifier found for attribute 'anyDensity' in package 'android'
  7.      [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: error: No resource identifier found for attribute 'smallScreens' in package 'android'
  8.  
  9. _BUILD FAILED
  10. /home/pavel/Android/android-sdk-linux_x86/tools/ant/main_rules.xml:310: null returned: 1
  11.  
  12. Total time: 0 seconds
  13. Packaging Error: Command '/usr/bin/ant debug' failed.Exit code: 1
  14. Error while building project mobile_example_1 (target: Android)
  15. When executing build step 'Packaging for Android'_

that I try to solve now. Does anybody know what is the problem now?

May 12, 2011

www.swhweng.co.nr www.swhweng...
Lab Rat
184 posts

I’ve fixed previous problem,

now there is a problem when launching built application in the emulator:

  1. Creating package file ...
  2. Package Creation: Running command '/usr/bin/ant debug'
  3. Buildfile: /home/pavel/Projects/mobile_example_1/android/build.xml
  4.  
  5.     [setup] Android SDK Tools Revision 11
  6.     [setup] Project Target: Android 2.2
  7.     [setup] API level: 8
  8.     [setup]
  9.     [setup] ------------------
  10.     [setup] Resolving library dependencies:
  11.     [setup] No library dependencies.
  12.  
  13.     [setup]
  14.  
  15.     [setup]
  16.     [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
  17.     [setup]
  18.     [setup] Importing rules file: tools/ant/main_rules.xml
  19.  
  20. -debug-obfuscation-check:
  21.  
  22. -set-debug-mode:
  23.  
  24. -compile-tested-if-test:
  25.  
  26. -pre-build:
  27.  
  28. -dirs:
  29.      [echo] Creating output directories if needed...
  30.     [mkdir] Created dir: /home/pavel/Projects/mobile_example_1/android/bin
  31.     [mkdir] Created dir: /home/pavel/Projects/mobile_example_1/android/gen
  32.     [mkdir] Created dir: /home/pavel/Projects/mobile_example_1/android/bin/classes
  33.  
  34. -aidl:
  35.      [echo] Compiling aidl files into Java classes...
  36.  
  37. -renderscript:
  38.      [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
  39.  
  40. -resource-src:
  41.      [echo] Generating R.java / Manifest.java from the resources...
  42.  
  43. -pre-compile:
  44.  
  45. compile:
  46.     [javac] /home/pavel/Android/android-sdk-linux_x86/tools/ant/main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
  47.     [javac] Compiling 6 source files to /home/pavel/Projects/mobile_example_1/android/bin/classes
  48.  
  49. -post-compile:
  50.  
  51. -obfuscate:
  52.  
  53. -dex:
  54.      [echo] Converting compiled files and external libraries into /home/pavel/Projects/mobile_example_1/android/bin/classes.dex...
  55.  
  56. -package-resources:
  57.      [echo] Packaging resources
  58.      [aapt] Creating full resource package...
  59.  
  60. -package-debug-sign:
  61. [apkbuilder] Creating Mobile_example_1-debug-unaligned.apk and signing it with a debug key...
  62.  
  63. debug:
  64.      [echo] Running zip align on final apk...
  65.      [echo] Debug Package: /home/pavel/Projects/mobile_example_1/android/bin/Mobile_example_1-debug.apk
  66.  
  67. BUILD SUCCESSFUL
  68. Total time: 3 seconds
  69. Package created.
  70. Please wait, searching for a siutable device for target:android-8.
  71. Package deploy: Running command '/home/pavel/Android/android-sdk-linux_x86/platform-tools/adb -s emulator-5554 install -r /home/pavel/Android/Ministro-1.0.apk'.
  72. 706 KB/s (31031 bytes in 0.042s)
  73.  pkg: /data/local/tmp/Ministro-1.0.apk
  74.  
  75. Success
  76. Installing package onto emulator-5554.
  77. Package deploy: Running command '/home/pavel/Android/android-sdk-linux_x86/platform-tools/adb -s emulator-5554 uninstall eu.licentia.necessitas.industrius.example.mobile_example_1'.
  78. Failure
  79. Package deploy: Running command '/home/pavel/Android/android-sdk-linux_x86/platform-tools/adb -s emulator-5554 install "/home/pavel/Projects/mobile_example_1/android/bin/Mobile_example_1-debug.apk"'.
  80. 936 KB/s (85172 bytes in 0.088s)
  81.  pkg: /data/local/tmp/Mobile_example_1-debug.apk
  82.  
  83. Failure [INSTALL_FAILED_DEXOPT]
  84.  
  85. Starting remote process ...
  86. Can't find eu.licentia.necessitas.industrius.example.mobile_example_1 precess

Does anybody know what is the problem? What to assign in settings?

January 6, 2012

chenzx chenzx
Lab Rat
1 posts

hi Pavel Mazniker
i encounter the problem on windows and fixed it

Check your NDK path: android-ndk-r6b\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows

there should be a dir “arm-linux-androideabi”, i happened to deleted this dir and caused the error above

your linux may also be this reason

you may check this

 
  ‹‹ update error on Nokia n8      qwsServer->enablePainting(false); ››

You must log in to post a reply. Not a member yet? Register here!