Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to build Okular from source. I checked out commit 8ab768 from Tue Jul 10 17:45:23 2012 +0100. However, FreeType seems to be missing in some path variable. Here is the output from cmake.

$ cd ~/src/okular/build
$ cmake ../ -DCMAKE_INSTALL_PREFIX=~/okular-install -DCMAKE_BUILD_TYPE="Debug"
-- Found Qt-Version 4.8.1 (using /usr/bin/qmake)
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found KDE 4.8 include dir: /usr/include
-- Found KDE 4.8 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- Found Freetype: -L/usr/lib/x86_64-linux-gnu -lfreetype -lz

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * QImageBlitz - An image effects library
   * libspectre - A PostScript rendering library
   * CHM - A library for dealing with Microsoft ITSS/CHM format files
   * DjVuLibre - A library for dealing with DjVu formatted files
   * libTIFF - A library for reading and writing TIFF formatted files,
   * FreeType - A font rendering engine
   * JPEG - A library for reading and writing JPEG image files.
   * ZLib - The Zlib compression library
   * libepub - A library for reading EPub documents
   * QCA - Qt Cryptographic Architecture (QCA)

-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
-----------------------------------------------------------------------------
   * Poppler-Qt4 (0.12.1 or higher)  <http://poppler.freedesktop.org>
     A PDF rendering library
     Support for PDF files in okular.

-----------------------------------------------------------------------------

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FREETYPE_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/john/src/okular/generators/dvi

-- Configuring incomplete, errors occurred!

I already tried to set the environment variable as follows.

$ export FREETYPE_INCLUDE_DIR=/usr/include/freetype2/freetype

However, it seems to have no effect. I am using Ubuntu 12.04.

The repository for Okular is available via Git under git://anongit.kde.org/okular.

share|improve this question
    
@jorge-castro Why did you remove the tag for Ubuntu 12.04 from my question? This information could be relevant. –  JJD Jul 11 '12 at 8:36
    
You usually only need that for hardware specific bits, I've added it to the bottom of your question though –  Jorge Castro Jul 11 '12 at 12:12
    
Is that commit from okular asking for a specific version of freetype or any of the latest ones will work?. Is there a newer commit that fixes a bug related to freetype? –  Luis Alvarado Jul 11 '12 at 12:24
1  
@LuisAlvarado There are certain commits referring to FreeType and the build process, however, I cannot see that a specific version is required. I added a link to the Okular repository in case you like to check this yourself. –  JJD Jul 11 '12 at 16:37
    
When I get home I will compile it and test it out if that helps. Am at work ATM. Thanks for the link. –  Luis Alvarado Jul 11 '12 at 18:22

1 Answer 1

up vote 4 down vote accepted

Try to use the -D switch of cmake:

cmake .. -DFREETYPE_INCLUDE_DIR=/usr/include/freetype2/freetype ...

share|improve this answer
    
Sorry for my late reply. I was busy with my thesis the last months. Finally, with your help Okular compiles. When I start the application however it immediately crashes. I filed a bug. The same happens for the latest version e60bba5f6b.. (2012-10-08 10:29:45). –  JJD Oct 8 '12 at 21:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.