[poppler] compiling on OSX / non standard paths

Zorg 421 zorglub421 at gmail.com
Fri Jun 18 03:35:51 PDT 2010


hello poppler users,

as a bug impact the jpeg2000 lib of osx, I wanted to give a try to
poppler based pdf readers.

but: it seems poppler is mostly used on linux using standard paths,
fontconfig is tested for presence by autotools, but it's specific
location doesn't seem to be considered when compiling. at least int
tests.

on osx (10.5.8) i use macports which install free sw under /opt/local.
i'm trying both 0.14.0 and git poppler.

on 0.14.0:

--

PKG_CONFIG_PATH="/opt/local/lib/pkgconfig/"
CFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" ./configure
--disable-libjpeg --enable-libopenjpeg=/opt/alt-pdf/
--prefix=/opt/alt-pdf/
...
Building poppler with support for:
  font configuration: fontconfig
  splash output:      yes
  cairo output:       yes
  abiword output:     yes
  qt wrapper:         no
  qt4 wrapper:        no
  glib wrapper:       yes
    use GDK:          yes
  cpp wrapper:        yes
  use gtk-doc:        no
  use libjpeg:        no
  use libpng:         yes
  use zlib:           no
  use libcurl:        no
  use libopenjpeg:    /opt/alt-pdf/
  use cms:            yes
  command line utils: yes

  Warning: Using libjpeg is recommended
  Warning: Using libopenjpeg is recommended

...
Making all in test
  CXX    gtk-splash-test.o
  CXXLD  gtk-splash-test
  CXX    gtk-cairo-test.o
  CXXLD  gtk-cairo-test
  CXX    pdf-inspector.o
  CXXLD  pdf_inspector
  CXX    perf-test.o
  CXX    perf-test-preview-dummy.o
  CXXLD  perf-test
  CXX    pdf-fullrewrite.o
  CXXLD  pdf-fullrewrite
Making all in cpp
Making all in .
  CXX    libpoppler_cpp_la-poppler-document.lo
In file included from poppler-document.cpp:31:
../poppler/GlobalParams.h:42:35: error: fontconfig/fontconfig.h: No
such file or directory
make[3]: *** [libpoppler_cpp_la-poppler-document.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

--

reenabling libjpeg:

--

philou at bookpro-rj45:~/src/poppler-0.14.0$ make
make  all-recursive
Making all in goo
  CXX    gfile.lo
  CXX    gmempp.lo
  CXX    GooHash.lo
  CXX    GooList.lo
  CXX    GooTimer.lo
  CXX    GooString.lo
  CXX    gmem.lo
  CXX    FixedPoint.lo
  CXX    PNGWriter.lo
  CXX    JpegWriter.lo
In file included from JpegWriter.cc:13:
JpegWriter.h:25:21: error: jpeglib.h: No such file or directory
JpegWriter.h:45: error: field ‘cinfo’ has incomplete type
JpegWriter.h:46: error: field ‘jerr’ has incomplete type
JpegWriter.cc:19: error: variable or field ‘outputMessage’ declared void
JpegWriter.cc:19: error: ‘j_common_ptr’ was not declared in this scope
JpegWriter.cc:20: error: expected ‘,’ or ‘;’ before ‘{’ token
JpegWriter.cc: In destructor ‘virtual JpegWriter::~JpegWriter()’:
JpegWriter.cc:43: error: ‘cinfo’ was not declared in this scope
JpegWriter.cc:43: error: ‘jpeg_destroy_compress’ was not declared in this scope
JpegWriter.cc: In member function ‘virtual bool
JpegWriter::init(FILE*, int, int, int, int)’:
JpegWriter.cc:49: error: ‘cinfo’ was not declared in this scope
JpegWriter.cc:49: error: ‘jerr’ was not declared in this scope
JpegWriter.cc:49: error: ‘jpeg_std_error’ was not declared in this scope
JpegWriter.cc:53: error: ‘jpeg_create_compress’ was not declared in this scope
JpegWriter.cc:56: error: ‘jpeg_stdio_dest’ was not declared in this scope
JpegWriter.cc:65: error: ‘JCS_RGB’ was not declared in this scope
JpegWriter.cc:66: error: ‘jpeg_set_defaults’ was not declared in this scope
JpegWriter.cc:70: error: ‘jpeg_set_quality’ was not declared in this scope
JpegWriter.cc:75: error: ‘jpeg_simple_progression’ was not declared in
this scope
JpegWriter.cc:79: error: ‘TRUE’ was not declared in this scope
JpegWriter.cc:79: error: ‘jpeg_start_compress’ was not declared in this scope
JpegWriter.cc: In member function ‘virtual bool
JpegWriter::writePointers(unsigned char**, int)’:
JpegWriter.cc:87: error: ‘cinfo’ was not declared in this scope
JpegWriter.cc:87: error: ‘jpeg_write_scanlines’ was not declared in this scope
JpegWriter.cc: In member function ‘virtual bool
JpegWriter::writeRow(unsigned char**)’:
JpegWriter.cc:95: error: ‘cinfo’ was not declared in this scope
JpegWriter.cc:95: error: ‘jpeg_write_scanlines’ was not declared in this scope
JpegWriter.cc: In member function ‘virtual bool JpegWriter::close()’:
JpegWriter.cc:102: error: ‘cinfo’ was not declared in this scope
JpegWriter.cc:102: error: ‘jpeg_finish_compress’ was not declared in this scope
make[2]: *** [JpegWriter.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
philou at bookpro-rj45:~/src/poppler-0.14.0$

--

git poppler gives me trouble with the autogen.sh, it's disable the
presence of gettext, or miss looking in /opt/local/share/aclocal for
m4 includes:

--

philou at bookpro-rj45:~/src/poppler-git$ ./autogen.sh

Checking for automake >= 1.7...

-n   Testing automake-1.11...
found 1.11.1
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
configure.ac:524: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:152: AM_ICONV_LINK is expanded from...
m4/iconv.m4:180: AM_ICONV is expanded from...
configure.ac:524: the top level
autoreconf: configure.ac: tracing
configure.ac:524: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:152: AM_ICONV_LINK is expanded from...
m4/iconv.m4:180: AM_ICONV is expanded from...
configure.ac:524: the top level
autoreconf: running: glibtoolize --copy
configure.ac:524: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:152: AM_ICONV_LINK is expanded from...
m4/iconv.m4:180: AM_ICONV is expanded from...
configure.ac:524: the top level
autoreconf: running: /usr/bin/autoconf
configure.ac:524: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but
not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:152: AM_ICONV_LINK is expanded from...
m4/iconv.m4:180: AM_ICONV is expanded from...
configure.ac:524: the top level
configure:24601: error: possibly undefined macro: AC_MSG_FAILURE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:24700: error: possibly undefined macro: AC_LIB_PREPARE_PREFIX
configure:24704: error: possibly undefined macro: AC_LIB_LINKFLAGS_BODY
configure:24712: error: possibly undefined macro: AC_LIB_APPENDTOVAR
autoreconf: /usr/bin/autoconf failed with exit status: 1
configure: error: cannot find install-sh or install.sh in "." "./.." "./../.."
philou at bookpro-rj45:~/src/poppler-git$

--

right after, trying:

--

philou at bookpro-rj45:~/src/poppler-git$ aclocal -I /opt/local/share/aclocal -I m4
philou at bookpro-rj45:~/src/poppler-git$ autoconf
philou at bookpro-rj45:~/src/poppler-git$ automake
configure.ac:524: required file `./config.rpath' not found
configure.ac:9: required file `./missing' not found
configure.ac:9:   `automake --add-missing' can install `missing'
configure.ac:9: required file `./install-sh' not found
configure.ac:9:   `automake --add-missing' can install `install-sh'
cpp/Makefile.am: required file `./depcomp' not found
cpp/Makefile.am:   `automake --add-missing' can install `depcomp'
configure.ac:11: required file `config.h.in' not found
philou at bookpro-rj45:~/src/poppler-git$ automake --add-missing
configure.ac:524: required file `./config.rpath' not found
configure.ac:9: installing `./missing'
configure.ac:9: installing `./install-sh'
cpp/Makefile.am: installing `./depcomp'

gives:

configure.ac:11: required file `config.h.in' not found

regards.


More information about the poppler mailing list