cmake can't find libfreetype6-dev >= 2.5

Bug #1417732 reported by Jools Wills on 2015-02-03
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

recently freetype6 2.5.x was introduced into Raspbian (currently running 2.5.2-2rpi1rpi1). This has caused a breakage with cmake due to file location changes for headers etc - it is this bug I believe:

so raspbian will need an update to cmake also, or lots of stuff that uses cmake is going to stop building out of the box - such as emulationstation (the example I have found)

Jools Wills (jools) wrote :

Example output when building emulationstation:

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Looking for bcm_host.h
bcm_host.h found
Looking for not found
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/;/usr/lib/arm-linux-gnueabihf/
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/;/usr/lib/arm-linux-gnueabihf/ - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/arm-linux-gnueabihf/
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
  Could NOT find Freetype (missing: FREETYPE_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindFreetype.cmake:106 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:45 (find_package)

-- Configuring incomplete, errors occurred!
make: *** No rule to make target 'clean'. Stop.
make: *** No targets specified and no makefile found. Stop

manually downgrading libfreetype6 / libfreetype6-dev to 2.4.9-1.1 fixes the problem.

Jools Wills (jools) wrote :

In case any users find this issue, a workaround is to tell cmake exactly where the headers are.


"cmake . -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype/"

Jools Wills (jools) wrote :

That should be

cmake . -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/

KaZeR (kazer) wrote :

This issue is breaking the compilation of Navit on the raspberry Pi.

Please provide an updated package for cmake ( I know it works with >= ) as cmake 2.8.9 is over 2 years old now.

peter green (plugwash) wrote :

The problem with just updating packages is it can break other things. The raspberry pi foundation updating core system packages to support their web browser effort is what got us into this mess in the first place. I'm not going to extend that mess into raspbian proper.

If someone wants to try backporting the fix at to the version of cmake in raspbian wheezy and confirming it works with both the raspbian and raspberry pi foundation freetype6 packages I may consider including it.

I believe Raspbian jessie runs cmake 3.0.2-1.
Could this be considered solved/fixed now?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers