Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Android Error: arm-linux-androideabi-g++: error: unrecognized command line option '-fstack-protector-strong'

    Mobile and Embedded
    2
    4
    2073
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Ali Samimi last edited by

      I have an error while building android application with newly installed Qt 5.8.0 for Android in Windows 10 This is my compile output:

      ```
      [~11:06:25: Running steps for project untitled5...
      11:06:26: Starting: "C:\Qt\Qt5.8.0_Android\5.8\android_armv7\bin\qmake.exe" C:\Users\mir.moezi\Documents\untitled5\untitled5.pro -spec android-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
      11:06:28: The process "C:\Qt\Qt5.8.0_Android\5.8\android_armv7\bin\qmake.exe" exited normally.
      11:06:29: Starting: "C:\Qt\Qt5.8.0_Android\Tools\mingw530_32\bin\mingw32-make.exe" qmake_all
      mingw32-make: Nothing to be done for 'qmake_all'.
      11:06:31: The process "C:\Qt\Qt5.8.0_Android\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
      11:06:31: Starting: "C:\Qt\Qt5.8.0_Android\Tools\mingw530_32\bin\mingw32-make.exe" 
      C:\Qt\Qt5.8.0_Android\5.8\android_armv7\bin\uic.exe ..\untitled5\mainwindow.ui -o ui_mainwindow.h
      C:\Qt\Android\android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -c -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=C:\Qt\Android\android-ndk-r10/platforms/android-16/arch-arm/ -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\untitled5 -I. -I..\..\..\..\Qt\Qt5.8.0_Android\5.8\android_armv7\include -I..\..\..\..\Qt\Qt5.8.0_Android\5.8\android_armv7\include\QtWidgets -I..\..\..\..\Qt\Qt5.8.0_Android\5.8\android_armv7\include\QtGui -I..\..\..\..\Qt\Qt5.8.0_Android\5.8\android_armv7\include\QtCore -I. -I. -I..\..\..\..\Qt\Android\android-ndk-r10\sources\cxx-stl\gnu-libstdc++\4.8\include -I..\..\..\..\Qt\Android\android-ndk-r10\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include -I..\..\..\..\Qt\Android\android-ndk-r10\platforms\android-16\arch-arm\usr\include -I..\..\..\..\Qt\Qt5.8.0_Android\5.8\android_armv7\mkspecs\android-g++ -o main.obj ..\untitled5\main.cpp
      arm-linux-androideabi-g++: error: unrecognized command line option '-fstack-protector-strong'
      Makefile:1291: recipe for target 'main.obj' failed
      mingw32-make: *** [main.obj] Error 1
      11:06:33: The process "C:\Qt\Qt5.8.0_Android\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
      Error while building/deploying project untitled5 (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.8.0))
      When executing step "Make"
      11:06:33: Elapsed time: 00:08.]([link url](link url))
      ```
      ```~~~~
      Please help me to solve this error! Here is my packages installed :
      
      qt-opensource-windows-x86-android-5.8.0 
      JDK.7.Update.80.x64
      apache-ant-1.10.1-bin 
      Android-NDK32-r10-windows-x86_64
      Android.SDK.Release.v24.4.1.Windowsinstaller_r24.4.1-windows
      what is '-fstack-protector-strong' ? I think this prevents Qt Creator from continuing !
      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        You should try setting the Android gcc to 4.9.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • A
          Ali Samimi last edited by Ali Samimi

          Thanks you for your answer!
          How can I set the Android gcc to 4.9?
          How can I find out my current gcc version?

          Thanks in advance !

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            AFAIK, in the Kit for Android.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • First post
              Last post