Opened 9 years ago

Closed 9 years ago

#46790 closed defect (fixed)

pdf2htmlex @0.11+: build fails after upgrade to poppler 0.31.0, cannot initialize a parameter of type 'PSOutputDev *' with an rvalue of type 'bool'

Reported by: dbevans (David B. Evans) Owned by: iapain@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec)
Port: pdf2htmlex

Description

Build fails as follows

[ 16%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/font.cc.o
/usr/bin/clang++    -pipe -Os -arch x86_64 -stdlib=libc++  -Wall -stdlib=libc++ -std=c++0x -O2 -DNDEBUG -arch x86_64 -mmacosx-version-min=10.9 -I/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src -I/opt/local/include/poppler -I/opt/local/include/fontforge -I/opt/local/include    -o CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/font.cc.o -c /opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/HTMLRenderer/font.cc
In file included from /opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/HTMLRenderer/font.cc:21:
In file included from /opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/HTMLRenderer/HTMLRenderer.h:27:
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/StringFormatter.h:37:12: warning: class 'GuardedPointer' was previously declared as a struct [-Wmismatched-tags]
    friend class GuardedPointer;
           ^
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/StringFormatter.h:19:12: note: previous use is here
    struct GuardedPointer
           ^
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/StringFormatter.h:37:12: note: did you mean struct here?
    friend class GuardedPointer;
           ^~~~~
           struct
In file included from /opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/HTMLRenderer/font.cc:21:
In file included from /opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/HTMLRenderer/HTMLRenderer.h:33:
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/BackgroundRenderer/BackgroundRenderer.h:18:1: warning: class 'Param' was previously declared as a struct [-Wmismatched-tags]
class Param;
^
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/Param.h:16:8: note: previous use is here
struct Param
       ^
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/BackgroundRenderer/BackgroundRenderer.h:18:1: note: did you mean struct here?
class Param;
^~~~~
struct
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/HTMLRenderer/font.cc:890:49: error: cannot initialize a parameter of type 'PSOutputDev *' with an rvalue of type 'bool'
    if(auto * font_loc = font->locateFont(xref, gFalse))
                                                ^~~~~~
/opt/local/include/poppler/goo/gtypes.h:36:16: note: expanded from macro 'gFalse'
#define gFalse false
               ^~~~~
/opt/local/include/poppler/GfxFont.h:243:51: note: passing argument to parameter 'ps' here
  GfxFontLoc *locateFont(XRef *xref, PSOutputDev *ps);
                                                  ^
/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc/src/HTMLRenderer/font.cc:945:56: error: cannot initialize a parameter of type 'PSOutputDev *' with an rvalue of type 'bool'
    GfxFontLoc * localfontloc = font->locateFont(xref, gFalse);
                                                       ^~~~~~
/opt/local/include/poppler/goo/gtypes.h:36:16: note: expanded from macro 'gFalse'
#define gFalse false
               ^~~~~
/opt/local/include/poppler/GfxFont.h:243:51: note: passing argument to parameter 'ps' here
  GfxFontLoc *locateFont(XRef *xref, PSOutputDev *ps);
                                                  ^
2 warnings and 2 errors generated.
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/font.cc.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_textproc_pdf2htmlex/pdf2htmlex/work/pdf2htmlEX-43e3174cbc'

Full build log attached.

Attachments (1)

main.log (105.5 KB) - added by dbevans (David B. Evans) 9 years ago.
Build log showing failure

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by dbevans (David B. Evans)

Attachment: main.log added

Build log showing failure

comment:1 Changed 9 years ago by dbevans (David B. Evans)

See upstream issue 471.

comment:2 Changed 9 years ago by mojca (Mojca Miklavec)

I think that we should also test the latest git commit, just to make sure that the problem hasn't been fixed yet (I'm currently on a very limited bandwidth and cannot do much at the moment; plus I think that this requires C++11 which adds a few more complications on my old OS).

comment:3 Changed 9 years ago by dbevans (David B. Evans)

I tried building version 0.12 but it requires fontforge 2.0 so no soap until that is accomplished (#43844). But I doubt it has been fixed upstream yet since the problem seems to be with API changes introduced in poppler 0.31.0 just a few days ago and there has been no upstream commits since then.

comment:4 Changed 9 years ago by mojca (Mojca Miklavec)

Ah, yes, I remember now. I know I had a reason for not upgrading the port to the latest version, but I thought it was because of C++11. Now I remember that I wasn't able to upgrade it due to the lack of FontForge.

comment:5 Changed 9 years ago by dbevans (David B. Evans)

Fix committed in r132692 that patches pdf2htmlex to conform to new API changes introduced in poppler 0.31.0. Builds without error and binary works as expected for all platforms but SL where build still fails. I believe this is a pre-existing issue that is unrelated to this ticket.

comment:6 Changed 9 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.