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. Freetype2-dev package not found when crosscompiling
QtWS25 Last Chance

Freetype2-dev package not found when crosscompiling

Scheduled Pinned Locked Moved Solved Mobile and Embedded
crosscompileraspberryfreetypeqmake
4 Posts 1 Posters 3.5k 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.
  • B Offline
    B Offline
    ben80
    wrote on 23 Nov 2016, 20:10 last edited by ben80
    #1

    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
    0
    • B Offline
      B Offline
      ben80
      wrote on 26 Nov 2016, 10:54 last edited by
      #2

      Thanks for moving the thread.

      Any Ideas for solving my problem?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        ben80
        wrote on 27 Nov 2016, 11:28 last edited by
        #3

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

        1 Reply Last reply
        0
        • B Offline
          B Offline
          ben80
          wrote on 11 Dec 2016, 12:22 last edited by
          #4

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

          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