Building on Ubuntu 18.04

66 views
Skip to first unread message

Dotan Cohen

unread,
Nov 29, 2018, 12:43:38 PM11/29/18
to pdf2htmlEX
Hello friends. I am trying to build pdf2htmlEX from the pdf2htmlEX/pdf2htmlEX repo as documented in these to places:


I believe that I have the proper packages installed, however the versions are not identical to those mentioned in the above-linked posts. Here are the packages that I've installed:

cmake pkg-config libpoppler-dev libpoppler-private-dev libpng-dev libjpeg-dev libfontforge-dev libspiro-dev python yui-compressor libjs-pdf pngnq librsvg2-bin closure-compiler libc6 libfontforge2 libfontforge-dev libgcc1 libpoppler73 libstdc++6 libjs-pdf

The cmake command completed as expected, but the make command fails like so:

$ make
[  2%] Building CXX object CMakeFiles/pdf2htmlEX.dir/3rdparty/poppler/git/CairoOutputDev.cc.o
/home/oem/code/pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.cc: In member function ‘GBool CairoOutputDev::setMimeDataForCCITTParams(Stream*, cairo_surface_t*, int)’:
/home/oem/code/pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.cc:2954:55: error: ‘class CCITTFaxStream’ has no member named ‘getEncodedByteAlign’
   params.appendf(" EncodedByteAlign={0:d}", ccittStr->getEncodedByteAlign() ? 1 : 0);
                                                       ^~~~~~~~~~~~~~~~~~~
/home/oem/code/pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.cc:2955:49: error: ‘class CCITTFaxStream’ has no member named ‘getEndOfBlock’; did you mean ‘endOfBlock’?
   params.appendf(" EndOfBlock={0:d}", ccittStr->getEndOfBlock() ? 1 : 0);
                                                 ^~~~~~~~~~~~~
                                                 endOfBlock
/home/oem/code/pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.cc:2957:61: error: ‘class CCITTFaxStream’ has no member named ‘getDamagedRowsBeforeError’
   params.appendf(" DamagedRowsBeforeError={0:d}", ccittStr->getDamagedRowsBeforeError());
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~
CMakeFiles/pdf2htmlEX.dir/build.make:110: recipe for target 'CMakeFiles/pdf2htmlEX.dir/3rdparty/poppler/git/CairoOutputDev.cc.o' failed
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/3rdparty/poppler/git/CairoOutputDev.cc.o] Error 1
CMakeFiles/Makefile2:355: recipe for target 'CMakeFiles/pdf2htmlEX.dir/all' failed
make[1]: *** [CMakeFiles/pdf2htmlEX.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2



I'm thinking that I have a version mismatch. Either the getEncodedByteAlign() was removed from CCITTFaxStream, or whatever is invoking that method needs a later version of CCITTFaxStream. I don't want to start compiling every dependency from scratch (Ubuntu is actually an ancient African word that means "Slackware is difficult") but these are the software versions available on this distro. Unfortunately, I'm stuck with this distro as all the other infrastructure is running it. Have I any hope to build and run pdf2htmlex on this system?

Thanks!

Shawn McMurdo

unread,
Oct 9, 2019, 6:09:05 PM10/9/19
to pdf2htmlEX
I am also trying to build pdf2htmlEX on Ubuntu 18.04 without luck.
I did try building the latest version of poppler from source and cmake works fine but make fails:

make
Scanning dependencies of target pdf2htmlEX
[  2%] Building CXX object CMakeFiles/pdf2htmlEX.dir/3rdparty/poppler/git/CairoFontEngine.cc.o
/home/shawn/readdie/TaggedPdf/pdftohtmlex/git/pdf2htmlEX/3rdparty/poppler/git/CairoFontEngine.cc:36:10: fatal error: poppler-config.h: No such file or directory
 #include <poppler-config.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/pdf2htmlEX.dir/build.make:62: recipe for target 'CMakeFiles/pdf2htmlEX.dir/3rdparty/poppler/git/CairoFontEngine.cc.o' failed
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/3rdparty/poppler/git/CairoFontEngine.cc.o] Error 1

CMakeFiles/Makefile2:355: recipe for target 'CMakeFiles/pdf2htmlEX.dir/all' failed
make[1]: *** [CMakeFiles/pdf2htmlEX.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Has anyone had any luck with pdf2htmlEX on modern Ubuntu?
Thanks.
Shawn
Reply all
Reply to author
Forward
0 new messages