Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Error building freetype2 for Android with Qt Creator
QtWS25 Last Chance

Error building freetype2 for Android with Qt Creator

Scheduled Pinned Locked Moved Solved Mobile and Embedded
androidfreetypearmv7
2 Posts 1 Posters 1.8k 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.
  • T Offline
    T Offline
    Tom_H
    wrote on last edited by Tom_H
    #1

    Hello. I'm trying to build freetype-2.7 for Android with Qt Creator but it's not working. I open the project as a CMake project. I can build it for win32-desktop but not for Android. It's failing at the cmake configure phase. I know my android kit is working because I can build and deploy a simple Qt project. I've seen some articles on how to build it using make-standalone-toolchain.sh from the Android SDK, but I'd like to do everything from Qt Creator.

    The first error shows up in the General Messages window:

    CMake Error at C:/Programs/cmake-3.6.3-win64-x64/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
      The C compiler
      "C:/.../Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-gcc.exe"
      is not able to compile a simple test program.
    
      It fails with the following output:
    
       Change Dir: C:/Users/tom/tmp/freetype-2.7/_build_android/CMakeFiles/CMakeTmp
    

    Then, in the CMakeError.log file:

    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: C:/.../Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-gcc.exe 
    Build flags: 
    Id flags: 
    
    The output was:
    1
    .../i686-linux-android/bin/ld.exe: error: cannot open crtbegin_dynamic.o: No such file or directory
    .../i686-linux-android/bin/ld.exe: error: cannot open crtend_android.o: No such file or directory
    .../i686-linux-android/bin/ld.exe: error: cannot find -lc
    .../i686-linux-android/bin/ld.exe: error: cannot find -ldl
    collect2.exe: error: ld returned 1 exit status
    

    The linker can't find some files even though they exist. Is there a way to tell cmake the library search path? (I'm a cmake noob)

    Here are the full texts:
    General Messages: http://pastebin.com/debk1hH2
    CMakeError.log: http://pastebin.com/SAHgctRe

    And the articles:
    article1
    article 2

    My config:
    Qt version: Qt 5.7.0 MinGW 32bit
    Qt Creator version: 4.1.0
    Android kit: Android for x86 (GCC 4.9, Qt 5.7.0)
    OS: Windows 8.1

    Any ideas? Thanks.

    T 1 Reply Last reply
    0
    • T Tom_H

      Hello. I'm trying to build freetype-2.7 for Android with Qt Creator but it's not working. I open the project as a CMake project. I can build it for win32-desktop but not for Android. It's failing at the cmake configure phase. I know my android kit is working because I can build and deploy a simple Qt project. I've seen some articles on how to build it using make-standalone-toolchain.sh from the Android SDK, but I'd like to do everything from Qt Creator.

      The first error shows up in the General Messages window:

      CMake Error at C:/Programs/cmake-3.6.3-win64-x64/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
        The C compiler
        "C:/.../Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-gcc.exe"
        is not able to compile a simple test program.
      
        It fails with the following output:
      
         Change Dir: C:/Users/tom/tmp/freetype-2.7/_build_android/CMakeFiles/CMakeTmp
      

      Then, in the CMakeError.log file:

      Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
      Compiler: C:/.../Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-gcc.exe 
      Build flags: 
      Id flags: 
      
      The output was:
      1
      .../i686-linux-android/bin/ld.exe: error: cannot open crtbegin_dynamic.o: No such file or directory
      .../i686-linux-android/bin/ld.exe: error: cannot open crtend_android.o: No such file or directory
      .../i686-linux-android/bin/ld.exe: error: cannot find -lc
      .../i686-linux-android/bin/ld.exe: error: cannot find -ldl
      collect2.exe: error: ld returned 1 exit status
      

      The linker can't find some files even though they exist. Is there a way to tell cmake the library search path? (I'm a cmake noob)

      Here are the full texts:
      General Messages: http://pastebin.com/debk1hH2
      CMakeError.log: http://pastebin.com/SAHgctRe

      And the articles:
      article1
      article 2

      My config:
      Qt version: Qt 5.7.0 MinGW 32bit
      Qt Creator version: 4.1.0
      Android kit: Android for x86 (GCC 4.9, Qt 5.7.0)
      OS: Windows 8.1

      Any ideas? Thanks.

      T Offline
      T Offline
      Tom_H
      wrote on last edited by
      #2

      Update: This is definitely not a problem with Qt or Qt Creator. I tried building it with Android Studio and got the same problem when I used gcc, and a different problem when I used clang (no errors, but no output). I was able to build it from the command line using the make_standalone_toolchain.py utility from the Android SDK and CMake.

      1 Reply Last reply
      0

      • Login

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