flbiggs has asked for the wisdom of the Perl Monks concerning the following question:

I have been trying to install the Poppler module for Perl, and make is throwing the following error:
cc -c -pthread -D_REENTRANT -I/usr/include/poppler/glib -I/usr/include +/poppler -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/inc +lude/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr +/include/gio-unix-2.0/ -I/usr/include/pango-1.0 -I/usr/include/pixman +-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/li +bpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe + -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_O +FFSET_BITS=64 -O2 -g -DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -fPIC " +-I/usr/lib/perl/5.10/CORE" Poppler.c cc -c -pthread -D_REENTRANT -I/usr/include/poppler/glib -I/usr/include +/poppler -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/inc +lude/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr +/include/gio-unix-2.0/ -I/usr/include/pango-1.0 -I/usr/include/pixman +-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/li +bpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe + -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_O +FFSET_BITS=64 -O2 -g -DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -fPIC " +-I/usr/lib/perl/5.10/CORE" Goo.c cc: Goo.c: No such file or directory cc: no input files make: *** [Goo.o] Error 1

In case it matters, in generating the make file during the initial install step, the output of perl Makefile.PL includes the following:

Unrecognized argument in LIBS ignored: '-pthread'

The module's readme lists cairo, poppler and glib as dependencies. I have cairo, poppler and glib packages installed (and development packages). I have also installed cairo and glib modules from CPAN. I regularly use cairo and gtk from perl without problems.

I am at a loss as to what this Goo.c error is. Any ideas? If I can provide more information, then please let me know. Thanks

Replies are listed 'Best First'.
Re: Problem Installing Poppler Module
by syphilis (Archbishop) on Nov 12, 2010 at 05:46 UTC
    In the Makefile.PL I see:
    XS => { 'Poppler.xs' => 'Poppler.c', 'Goo.xs' => 'Goo.c', },
    which would indicate that there should be a file called Goo.xs that shipped with the Poppler-0.03 source ... but there's no such file mentioned in the MANIFEST.
    Does the source distro contain such a file ? If not try removing 'Goo.xs' => 'Goo.c', from the Makefile.PL, and also change 'OBJECT' => 'Poppler$(OBJ_EXT) Goo$(OBJ_EXT)' , to 'OBJECT' => 'Poppler$(OBJ_EXT)',.
    Then remove the Makefile that got written, and start over again with perl Makefile.PL etc.
    If Goo.xs is not needed, that might work. In any case submit a bug report to the author.

    Cheers,
    Rob
      Rob, Thanks for the advice. I tried the modification suggested. It allowed the module to be made and installed, but when I use it to load a pdf file, it throws an error. So, I think there is some defect in how the wrapper is linking to the underlying library. I now see from CPAN testing reports that testers had the same problem. I emailed the author asking if he would suggest a correction ... I don't have nearly the skills needed to tinker with XS. Hopefully he will address because I think that module would be very useful. Thanks again!
        FYI -- The author of this module just posted revised code on module's github repository. I installed the revised module and basic tests were successful.