Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. GCC Error During Cross Compile Setup
QtWS25 Last Chance

GCC Error During Cross Compile Setup

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 4.2k Views
  • 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.
  • S Offline
    S Offline
    Steve Mansfield
    wrote on last edited by
    #1

    I have been working this problem for more than a week. I installed QT off the QT site. I am trying to set up a cross compile environment for a Beaglebone Black ARM 8 platform. I have set up the compiler options using GNU 6.3.0 compiler. I successfully created the cross-compile environment and the Beaglebone device. The connect test worked correctly as well. When I build the default QT simple application I get these errors,

    Running Windows Runtime device detection.
    C:/Qt/5.11.0/winrt_armv7_msvc2015/bin/winrtrunner.exe --list-devices
    Found 2 Windows Runtime devices.
    Running "C:\Program Files (x86)\CMake\bin\cmake.exe -E server "--pipe=\.\pipe{2e664e46-cacb-46ae-b680-ed9c235dc502}" --experimental" in C:\Users\Stephen\AppData\Local\Temp\QtCreator-WLEKuI\qtc-cmake-IDzcFnnJ.
    Starting to parse CMake project, using: "-DCMAKE_CXX_COMPILER:STRING=C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-g++.exe", "-DCMAKE_C_COMPILER:STRING=C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe", "-DCMAKE_PREFIX_PATH:STRING=", "-DQT_QMAKE_EXECUTABLE:STRING=".
    The C compiler identification is GNU 6.3.0
    The CXX compiler identification is GNU 6.3.0
    Check for working C compiler: C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe
    Check for working C compiler: C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe -- broken
    CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
    The C compiler

    "C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe"
    

    is not able to compile a simple test program.

    It fails with the following output:

    Change Dir: C:/Users/Stephen/AppData/Local/Temp/QtCreator-WLEKuI/qtc-cmake-IDzcFnnJ/CMakeFiles/CMakeTmp
    
    Run Build Command:"C:/PROGRA~2/Ninja/ninja.exe" "cmTC_c3136"
    [1/2] Building C object CMakeFiles/cmTC_c3136.dir/testCCompiler.c.obj
    [2/2] Linking C executable cmTC_c3136.exe
    FAILED: cmTC_c3136.exe 
    cmd.exe /C "cd . && C:\SysGCC\beaglebone-6.3.0\bin\arm-linux-gnueabihf-gcc.exe    CMakeFiles/cmTC_c3136.dir/testCCompiler.c.obj  -o cmTC_c3136.exe -Wl,--out-implib,libcmTC_c3136.dll.a -Wl,--major-image-version,0,--minor-image-version,0   && cd ."
    c:/sysgcc/beaglebone-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld.exe: unrecognized option '--major-image-version'
    c:/sysgcc/beaglebone-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld.exe: use the --help option for usage information
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    

    The build seems to issues a command to the GCC compiler suite to an executable ld.exe '--major-image-version' and fails. ld.exe does not support --major-image-version. Not sure why it is issuing this command.

    I know these compilers work as I have compiled manually a QT basic example using the g++ compiler. Any suggestions?

    A 1 Reply Last reply
    0
    • S Steve Mansfield

      I have been working this problem for more than a week. I installed QT off the QT site. I am trying to set up a cross compile environment for a Beaglebone Black ARM 8 platform. I have set up the compiler options using GNU 6.3.0 compiler. I successfully created the cross-compile environment and the Beaglebone device. The connect test worked correctly as well. When I build the default QT simple application I get these errors,

      Running Windows Runtime device detection.
      C:/Qt/5.11.0/winrt_armv7_msvc2015/bin/winrtrunner.exe --list-devices
      Found 2 Windows Runtime devices.
      Running "C:\Program Files (x86)\CMake\bin\cmake.exe -E server "--pipe=\.\pipe{2e664e46-cacb-46ae-b680-ed9c235dc502}" --experimental" in C:\Users\Stephen\AppData\Local\Temp\QtCreator-WLEKuI\qtc-cmake-IDzcFnnJ.
      Starting to parse CMake project, using: "-DCMAKE_CXX_COMPILER:STRING=C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-g++.exe", "-DCMAKE_C_COMPILER:STRING=C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe", "-DCMAKE_PREFIX_PATH:STRING=", "-DQT_QMAKE_EXECUTABLE:STRING=".
      The C compiler identification is GNU 6.3.0
      The CXX compiler identification is GNU 6.3.0
      Check for working C compiler: C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe
      Check for working C compiler: C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe -- broken
      CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
      The C compiler

      "C:/SysGCC/beaglebone-6.3.0/bin/arm-linux-gnueabihf-gcc.exe"
      

      is not able to compile a simple test program.

      It fails with the following output:

      Change Dir: C:/Users/Stephen/AppData/Local/Temp/QtCreator-WLEKuI/qtc-cmake-IDzcFnnJ/CMakeFiles/CMakeTmp
      
      Run Build Command:"C:/PROGRA~2/Ninja/ninja.exe" "cmTC_c3136"
      [1/2] Building C object CMakeFiles/cmTC_c3136.dir/testCCompiler.c.obj
      [2/2] Linking C executable cmTC_c3136.exe
      FAILED: cmTC_c3136.exe 
      cmd.exe /C "cd . && C:\SysGCC\beaglebone-6.3.0\bin\arm-linux-gnueabihf-gcc.exe    CMakeFiles/cmTC_c3136.dir/testCCompiler.c.obj  -o cmTC_c3136.exe -Wl,--out-implib,libcmTC_c3136.dll.a -Wl,--major-image-version,0,--minor-image-version,0   && cd ."
      c:/sysgcc/beaglebone-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld.exe: unrecognized option '--major-image-version'
      c:/sysgcc/beaglebone-6.3.0/bin/../lib/gcc/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld.exe: use the --help option for usage information
      collect2.exe: error: ld returned 1 exit status
      ninja: build stopped: subcommand failed.
      

      The build seems to issues a command to the GCC compiler suite to an executable ld.exe '--major-image-version' and fails. ld.exe does not support --major-image-version. Not sure why it is issuing this command.

      I know these compilers work as I have compiled manually a QT basic example using the g++ compiler. Any suggestions?

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @Steve-Mansfield Try setting this set(CMAKE_SYSTEM_NAME Generic) in your cmake toolchain file.

      If it's set to Windows it will cause that issue you are seeing.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved