Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Solved Freetype2-dev package not found when crosscompiling

    Mobile and Embedded
    crosscompile raspberry freetype qmake
    1
    4
    2905
    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.
    • B
      ben80 last edited by ben80

      Hi @all,

      i am trying to crosscompile a plugin for QT5.6, but the necessary freetype2 development package is not found by qmake (->pkg-config).

      I already asked in the freetype forum, with no success.
      So, i would appreciate any advice.

      my system:

      • Host: debian 8, jessie
      • target: raspberry pi 1, raspbian, jessie
      • i installed: libfreetype2-dev on the target through sudo apt-get install
      • i updated my host sysroot

      qt pro file:

      • CONFIG += link_pkgconfig
      • PKGCONFIG += freetype2

      Error message:

      • qmake fails with the message: "Project ERROR: freetype2 development package not found"

      Environment variables:
      sysroot=~/opt_qt_for_rpi/qt5.6.1-1/sysroot
      export PKG_CONFIG_SYSROOT_DIR=${sysroot}
      export PKG_CONFIG_DIR=
      export PKG_CONFIG_DEBUG_SPEW=1
      export PKG_CONFIG_LIBDIR=${sysroot}/usr/lib/pkgconfig:${sysroot}/usr/share/pkgconfig
      export PKG_CONFIG_PATH=${sysroot}
      export COMPILER_PATH=~/opt_qt_for_rpi/qt5.6.1-1/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

      This is what i tried so far:

      1. Searching for "ft2build.h" on the host: -> it's there in the sysroot folder
        ..sysroot/usr/include/freetype2/ft2build.h

      2. letting pkg-config search for it on the host: -> it's there in the sysroot folder
        set PKG_CONFIG_DEBUG_SPEW
        pkg-config --modversion freetype2

        Output:

      Looking for package 'freetype2'
      Looking for package 'freetype2-uninstalled'
      Reading 'freetype2' from file '/home/niki/opt_qt_for_rpi/qt5.6.1-1/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig/freetype2.pc'
      Parsing package file '/home/niki/opt_qt_for_rpi/qt5.6.1-1/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig/freetype2.pc'
        line>prefix=/usr
       Variable declaration, 'prefix' has value '/usr'
        line>exec_prefix=/usr
       Variable declaration, 'exec_prefix' has value '/usr'
        line>libdir=/usr/lib/arm-linux-gnueabihf
       Variable declaration, 'libdir' has value '/usr/lib/arm-linux-gnueabihf'
        line>includedir=/usr/include/freetype2
       Variable declaration, 'includedir' has value '/usr/include/freetype2'
        line>
        line>Name: FreeType 2
        line>URL: http://freetype.org
        line>Description: A free, high-quality, and portable font engine.
        line>Version: 18.0.12
        line>Requires:
        line>Requires.private:
        line>Libs: -L${libdir} -lfreetype
        line>Libs.private: -lz -lpng12 -lz -lm
      Unknown keyword 'Libs.private' in '/home/niki/opt_qt_for_rpi/qt5.6.1-1/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig/freetype2.pc'
        line>Cflags: -I${includedir}
      Path position of 'freetype2' is 2
      Adding 'freetype2' to list of known packages
      18.0.12
      

      Thanks a lot,
      Nik

      1 Reply Last reply Reply Quote 0
      • B
        ben80 last edited by

        Thanks for moving the thread.

        Any Ideas for solving my problem?

        1 Reply Last reply Reply Quote 0
        • B
          ben80 last edited by

          Anybody who could provide some hints?
          How do qmake and pkg-config work together?

          1 Reply Last reply Reply Quote 0
          • B
            ben80 last edited by

            Ok, i found the solution.
            I had to recompile qmake with pkg-config enabled.

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