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.



  • I don't know necessitas...i can only redirect to ufficial support "page":http://groups.google.com/group/android-qt?pli=1.



  • [quote author="Pavel Mazniker" date="1305015198"]
    Assembler messages:
    Fatal error: Invalid -march= option: `armv5te'
    [/quote]

    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.



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



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



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



  • bq. 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:

    @
    CONFIG += cross_compile release shared dll qpa stl precompile_header dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
    QT_SOURCE_TREE = $$quote(/opt/necessitas/Android/4.7.60)
    QT_BUILD_TREE = $$quote(/opt/necessitas/Android/4.7.60)
    QT_BUILD_PARTS = libs docs translations
    QMAKE_ABSOLUTE_SOURCE_ROOT = $$QT_SOURCE_TREE
    QMAKE_MOC_SRC = $$QT_BUILD_TREE/src/moc

    #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
    QMAKE_MOC = $$QT_BUILD_TREE/bin/moc
    QMAKE_UIC = $$QT_BUILD_TREE/bin/uic
    QMAKE_UIC3 = $$QT_BUILD_TREE/bin/uic3
    QMAKE_RCC = $$QT_BUILD_TREE/bin/rcc
    QMAKE_QDBUSXML2CPP = $$QT_BUILD_TREE/bin/qdbusxml2cpp
    QMAKE_INCDIR_QT = $$QT_BUILD_TREE/include
    QMAKE_LIBDIR_QT = $$QT_BUILD_TREE/lib

    QT_LFLAGS_ODBC = -lodbc
    QMAKESPEC = $$QT_BUILD_TREE/mkspecs/android-g++
    styles += cde mac motif plastique cleanlooks windows
    decorations += default windows styled
    mouse-drivers += pc
    gfx-drivers += linuxfb
    mouse-drivers += linuxtp
    kbd-drivers += tty
    styles += android
    DEFINES += QT_NO_CORESERVICES
    JAVASCRIPTCORE_JIT = no
    PRECOMPILED_DIR = .pch/release-shared
    OBJECTS_DIR = .obj/release-shared
    MOC_DIR = .moc/release-shared
    RCC_DIR = .rcc/release-shared
    UI_DIR = .uic/release-shared
    QMAKE_RPATHDIR += "/data/data/eu.licentia.necessitas.ministro/files/qt/lib"
    sql-drivers =
    sql-plugins = sqlite

    also when compiling the next command with flags executed:

    The process "/usr/bin/make" exited normally.
    Configuration unchanged, skipping qmake step.
    Starting: "/usr/bin/make" -w
    make: Entering directory /home/pavel/Projects/mobile_example_1-build-android' /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/mainwindow.ui -o ui_mainwindow.h /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/map.ui -o ui_map.h /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/contact_options.ui -o ui_contact_options.h /opt/necessitas/Android/4.7.60/bin/uic ../mobile_example_1/amf.ui -o ui_amf.h /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 Assembler messages: Fatal error: Invalid -march= option:armv5te'
    make: Leaving directory `/home/pavel/Projects/mobile_example_1-build-android'
    make: *** [main.o] Error 1
    @
    A bit later you will get additional experiments' to fix this problem examples.



  • 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:
    ...
    @
    -resource-src:
    [echo] Generating R.java / Manifest.java from the resources...
    [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: error: No resource identifier found for attribute 'largeScreens' in package 'android'
    [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: error: No resource identifier found for attribute 'normalScreens' in package 'android'
    [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: e_
    [aapt] rror: No resource identifier found for attribute 'anyDensity' in package 'android'
    [aapt] /home/pavel/Projects/mobile_example_1/android/AndroidManifest.xml:14: error: No resource identifier found for attribute 'smallScreens' in package 'android'

    _BUILD FAILED
    /home/pavel/Android/android-sdk-linux_x86/tools/ant/main_rules.xml:310: null returned: 1

    Total time: 0 seconds
    Packaging Error: Command '/usr/bin/ant debug' failed.Exit code: 1
    Error while building project mobile_example_1 (target: Android)
    When executing build step 'Packaging for Android'_
    @
    that I try to solve now. Does anybody know what is the problem now?



  • I've fixed previous problem,

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

    @
    Creating package file ...
    Package Creation: Running command '/usr/bin/ant debug'
    Buildfile: /home/pavel/Projects/mobile_example_1/android/build.xml

    [setup] Android SDK Tools Revision 11
    [setup] Project Target: Android 2.2
    [setup] API level: 8
    [setup] 
    [setup] ------------------
    [setup] Resolving library dependencies:
    [setup] No library dependencies.
    
    [setup] 
    
    [setup] 
    [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
    [setup] 
    [setup] Importing rules file: tools/ant/main_rules.xml
    

    -debug-obfuscation-check:

    -set-debug-mode:

    -compile-tested-if-test:

    -pre-build:

    -dirs:
    [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/pavel/Projects/mobile_example_1/android/bin
    [mkdir] Created dir: /home/pavel/Projects/mobile_example_1/android/gen
    [mkdir] Created dir: /home/pavel/Projects/mobile_example_1/android/bin/classes

    -aidl:
    [echo] Compiling aidl files into Java classes...

    -renderscript:
    [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...

    -resource-src:
    [echo] Generating R.java / Manifest.java from the resources...

    -pre-compile:

    compile:
    [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
    [javac] Compiling 6 source files to /home/pavel/Projects/mobile_example_1/android/bin/classes

    -post-compile:

    -obfuscate:

    -dex:
    [echo] Converting compiled files and external libraries into /home/pavel/Projects/mobile_example_1/android/bin/classes.dex...

    -package-resources:
    [echo] Packaging resources
    [aapt] Creating full resource package...

    -package-debug-sign:
    [apkbuilder] Creating Mobile_example_1-debug-unaligned.apk and signing it with a debug key...

    debug:
    [echo] Running zip align on final apk...
    [echo] Debug Package: /home/pavel/Projects/mobile_example_1/android/bin/Mobile_example_1-debug.apk

    BUILD SUCCESSFUL
    Total time: 3 seconds
    Package created.
    Please wait, searching for a siutable device for target:android-8.
    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'.
    706 KB/s (31031 bytes in 0.042s)
    pkg: /data/local/tmp/Ministro-1.0.apk

    Success
    Installing package onto emulator-5554.
    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'.
    Failure
    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"'.
    936 KB/s (85172 bytes in 0.088s)
    pkg: /data/local/tmp/Mobile_example_1-debug.apk

    Failure [INSTALL_FAILED_DEXOPT]

    Starting remote process ...
    Can't find eu.licentia.necessitas.industrius.example.mobile_example_1 precess
    @

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



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.