Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

package 'poppler>=0.20.0' not found on CentOS 5 #44

Closed
haisum opened this issue Oct 31, 2012 · 21 comments
Closed

package 'poppler>=0.20.0' not found on CentOS 5 #44

haisum opened this issue Oct 31, 2012 · 21 comments

Comments

@haisum
Copy link

haisum commented Oct 31, 2012

I am trying to cmake it on CentOS 5 and here's the output:

cmake . -DCMAKE_C_COMPILER=/usr/bin/gcc44 -DCMAKE_CXX_COMPILER=/usr/bin/g++44
-- The C compiler identification is GNU 4.4.6
-- The CXX compiler identification is GNU 4.4.6
-- Check for working C compiler: /usr/bin/gcc44
-- Check for working C compiler: /usr/bin/gcc44 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++44
-- Check for working CXX compiler: /usr/bin/g++44 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.21") 
-- checking for module 'poppler>=0.20.0'
--   package 'poppler>=0.20.0' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:275 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:329 (_pkg_check_modules_internal)
  CMakeLists.txt:18 (pkg_check_modules)


-- checking for module 'libfontforge>=2.0.0'
--   package 'libfontforge>=2.0.0' not found
Trying to locate fontforge...
Found fontforge.h: /usr/local/include/fontforge/fontforge.h
Found fontforge: /usr/local/lib/libfontforge.so
Found gunicode: /usr/local/lib/libgunicode.so
Looking for libraries of python, which is required by fontforge, if you can link fontforge without python, you may disable this
-- checking for one of the modules 'python;python-2.7'
Found config.h: /usr/local/include/fontforge/config.h
-- Performing Test CXX0X_SUPPORT
-- Performing Test CXX0X_SUPPORT - Success
-- Configuring incomplete, errors occurred!

I installed every required package and utility. Any ideas what I am missing?

@iapain
Copy link
Collaborator

iapain commented Oct 31, 2012

Pay attention to error message it says package 'poppler>=0.20.0' not found

@haisum
Copy link
Author

haisum commented Oct 31, 2012

I do have poppler installed

@haisum
Copy link
Author

haisum commented Oct 31, 2012

may be it should try to locate poppler like it does for fontforge if it's not found

@iapain
Copy link
Collaborator

iapain commented Oct 31, 2012

It does try to locate poppler. Could you please check your poppler version?

@haisum
Copy link
Author

haisum commented Oct 31, 2012

I compiled it from http://poppler.freedesktop.org/poppler-0.20.5.tar.gz

@iapain
Copy link
Collaborator

iapain commented Oct 31, 2012

can you locate your libpoppler.so ?

@haisum
Copy link
Author

haisum commented Oct 31, 2012

/usr/local/lib/libpoppler.so

$ ls /usr/local/lib | grep poppler
libpoppler.a
libpoppler-cpp.a
libpoppler-cpp.la
libpoppler-cpp.so
libpoppler-cpp.so.0
libpoppler-cpp.so.0.2.0
libpoppler.la
libpoppler.so
libpoppler.so.28

@iapain
Copy link
Collaborator

iapain commented Oct 31, 2012

That's pretty odd. IMO cmake seems to be doing something weird while locating poppler. I don't have access to centOS so cannot say anything. BTW patches are always welcome here :)

@coolwanglu
Copy link
Owner

What's the output of pkg-config --libs poppler

And what's the content of /usr/local/lib/pkgconfig/poppler.pc

@haisum
Copy link
Author

haisum commented Nov 1, 2012

Since I compiled poppler myself, it didn't set environment variable PKG_CONFIG_PATH. So this is how I got it fixed:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
cmake . -DCMAKE_C_COMPILER=/usr/bin/gcc44 -DCMAKE_CXX_COMPILER=/usr/bin/g++44

Thanks coolwanglu and iapain for your help :) and great work with this project coolwanglu 👍

@haisum haisum closed this as completed Nov 1, 2012
@haisum
Copy link
Author

haisum commented Nov 1, 2012

Since I installed it successfully on CentOS here are steps I followed for reference of others:

--if it fails for zlib requirement, install zlib from
http://sourceforge.net/projects/libpng/files/zlib/1.2.7/

Then do

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ cmake . -DCMAKE_C_COMPILER=/usr/bin/gcc44 -DCMAKE_CXX_COMPILER=/usr/bin/g++44
########### cmake . is to be run in directory containing source files of pdf2htmlEx###########
$ make
$ make install

@vungnhanh
Copy link

thanks haisum for the instructions above, I have installed
however, when run, I get the following error:

[....]#pdf2htmlEX --help
pdf2htmlEX: error while loading shared libraries: libfontforge.so.1: cannot open shared object file: No such file or directory

I have build pdf2htmlEX on CentOS 5.8 / 64bit

can you help me resolve problem ?

thanks

(sorry, my english is not good )

@haisum
Copy link
Author

haisum commented Nov 9, 2012

can you verify if libfontforge.so exists?
One of these commands should list it:

ls /usr/local/lib | grep fontforge
ls /usr/lib | grep fontforge

@vungnhanh
Copy link

Fontforge already exist
# ls /usr/local/lib | grep fontforge
libfontforge.la
libfontforge.so
libfontforge.so.1
libfontforge.so.1.0.0

I find that after set the LD_LIBRARY_PATH :
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
the above error is fixed
now, pdf2htmlEX works very well!

# pdf2htmlEX --help
pdftohtmlEX version 0.6
Copyright 2012 Lu Wang coolwanglu@gmail.com
Usage: pdf2htmlEX [Options] <input.pdf> [<output.html>]
Options:
-h,--help show all options
-v,--version show copyright and version info
-o,--owner-password owner password (for encrypted files)
-u,--user-password user password (for encrypted files)
--dest-dir (=".") specify destination directory
--data-dir (="/usr/local/share/pdf2htmlEX") specify data directory

..............

thanks for all the help :)

@coolwanglu
Copy link
Owner

Congratulations!
And thank you @haisum for your info.

@jahewson
Copy link
Contributor

jahewson commented Feb 7, 2013

@haisum why not use Yum?

@theZiki
Copy link

theZiki commented Feb 7, 2013

@jahewson how to use yum, it isn't in package manager?

@jahewson
Copy link
Contributor

jahewson commented Feb 7, 2013

I mean use Yum to install Poppler and FontForge

@haisum
Copy link
Author

haisum commented Feb 17, 2013

Yum, in some distros might install older/incompatible versions, but there's no bad in installing it with yum if it works for you.

@flyandi
Copy link

flyandi commented Dec 14, 2013

Here is my solution for CentOS .. It's a complete script that will do everything automatically.

#!/bin/bash

(deps)

echo "Installing Dependencies"
yum -y install gcc
yum -y install gcc-c++
yum -y install cmake
yum -y install libtool
yum -y install libpng-devel
yum -y install libjpeg-devel
yum -y install fontconfig-devel

(tmpdir)

echo "Preparing Directory"
mkdir -p /tmp/code
cd /tmp/code

(resources)

echo "Downloading Sources"
wget http://poppler.freedesktop.org/poppler-0.20.5.tar.gz
wget http://poppler.freedesktop.org/poppler-data-0.4.6.tar.gz
wget http://sourceforge.net/projects/fontforge/files/fontforge-source/fontforge_full-20120731-b.tar.bz2/download
wget https://github.com/coolwanglu/pdf2htmlEX/archive/v0.10.tar.gz
tar xfv poppler-0.20.5.tar.gz
tar xfv poppler-data-0.4.6.tar.gz
tar jxf fontforge_full-20120731-b.tar.bz2
tar xfv v0.10

(Installing)

echo "Installing"
cd poppler-0.20.5
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure "--enable-xpdf-headers"
make
make install
cd ../poppler-data-0.4.6
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
cmake .
make
make install
cd ../fontforge-20120731-b
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure "--without-libzmq" "--without-x" "--without-iconv" "--disable-python-scripting" "--disable-python-extension"
make
make install
cd ../pdf2htmlEX-0.10
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
cmake .
make
make install
echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
ldconfig

@w2pmedia
Copy link

these instruction work great except for some minor issues( running on Centos 6.5)

  • Make sure that you are running python2.7 environment
  • Before you compile do the last steps in the instructions above
    echo /usr/local/lib > /etc/ld.so.conf.d/local.conf && ldconfig
  • If python2.7 is in /usr/local/bin make sure that it's the first thing in your path and that it is linked to python

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants