4

Not able to build the poppler 0.62.0, getting following error

Source Code: https://poppler.freedesktop.org/poppler-0.62.0.tar.xz

 -- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found
 -- Checking for module 'gobject-introspection-1.0'
 --   No package 'gobject-introspection-1.0' found
 -- Checking for modules 'gtk+-3.0>=3.8;gdk-pixbuf-2.0'
 --
 -- Could NOT find GTK (missing:  GTK3_LIBRARIES GTK3_CFLAGS)
 -- Checking for module 'libopenjp2'
 --   No package 'libopenjp2' found CMake Error at CMakeLists.txt:199 (message):   Install libopenjpeg2 before trying to build poppler.  You
 can also decide   to use the internal unmaintained JPX decoder or none
 at all.

 -- Configuring incomplete, errors occurred! See also "/home/ubuntu/imagemagick_build/poppler-0.62.0/build/CMakeFiles/CMakeOutput.log".
 See also
 "/home/ubuntu/imagemagick_build/poppler-0.62.0/build/CMakeFiles/CMakeError.log".

I have installed libopenjp2-tools as well, still its giving error

3
  • Ubuntu 16.04 already has poppler package named libpoppler58 with version 0.41.0-0ubuntu1.5. Why you need exactly 0.62? When your are going to compile something, you need to install its build-dependencies before compilation (with sudo apt-get build-dep libpoppler58 in your case).
    – N0rbert
    Dec 6, 2017 at 18:18
  • output of the poppler 0.41 and 0.62 of pdftotext are different. I am using the mac and on it I have 0.60.1 and giving better result than ubuntu's 0.41.
    – jbmyid
    Dec 7, 2017 at 5:20
  • 1
    Tried sudo apt-get build-dep libpoppler58 but still same.
    – jbmyid
    Dec 7, 2017 at 5:24

2 Answers 2

6

For installation of Poppler on 16.04 LTS do the following:

  1. Enable source packages from Software & Updates.
  2. Install build dependencies with sudo apt-get build-dep libpoppler58
  3. Install cmake with sudo apt-get install cmake
  4. Install development package for libopenjp2 with sudo apt-get install libopenjp2-7-dev
  5. Install Gdk-PixBuf with sudo apt-get install libgdk-pixbuf2.0-dev
  6. Install checkinstall to make deb-package sudo apt-get install checkinstall
  7. Download and run the compilation:

    cd /tmp
    wget https://poppler.freedesktop.org/poppler-0.62.0.tar.xz
    tar -xf poppler-0.62.0.tar.xz
    cd poppler-0.62.0
    
    mkdir build
    cd build
    cmake ..
    sudo checkinstall make install
    

In checkinstall session do the following:

  1. for Should I create a default set of package docs? answer n.
  2. enter libpoppler-0.62.0 as package description and press Ctrl+D;
  3. enter 2 and enter libpoppler as package Name, press Enter;
  4. enter 3 and enter 0.62.0-local as package Version, press Enter;
  5. press Enter to continue (start compilation and deb-package building)

You can verify installation of your package with apt-cache policy libpoppler:

libpoppler:
  Installed: 0.62.0-local-1
  Candidate: 0.62.0-local-1
  Version table:
 *** 0.62.0-local-1 100
        100 /var/lib/dpkg/status

Binaries will be install into /usr/local/bin (you can check this with dpkg -L libpoppler).

2
  • 1
    following these instructions I get: undefined reference to 'SSLv2_client_method' collect2: error: ld returned 1 exit status , recipe for target 'utils/pdfimages' failed , recipe for target 'utils/CMakeFiles/pdfimages.dir/all' failed , and recipe for target 'all' failed - What can I do?
    – Clay
    Aug 21, 2018 at 12:18
  • Works. checked today.
    – vineeshvs
    Mar 3, 2020 at 7:31
1

(This should be a comment on N0rbert's answer, but I can't comment)

I had several problems following N0rbert's solution, but I managed to solve them by doing this

Everytime either cmake or checkinstall would complain about missing files, I'd use

apt-file search name-of-missing-file

(you may have to install it through sudo apt-get install apt-file)

the search would return the name of the pack that contained such file, and then all I had to do was install each package that cmake or checkinstall were complaining about

sudo apt-get install --reinstall name-of-pack-according-to-search

then run cmake or checkinstall again (depending on whichone complained), and search for the file and install packages until it complained no more and the installation succeeded.

In my case most of the problems were about Qt5, which I must have installed at some point of my running around trying to install poppler. Somehow I must have made a faulty installation, which is why I had to use --reinstall on every package

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .