poppler deleted Object::dictAdd(char*, Object&&)

Bug #1789208 reported by vivo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Critical
Thomas Holder

Bug Description

In commit dcd8ad25023db542ade5edc23fc5f943d8ee6376 poppler marked as deleted Object::dictAdd.
As a result inkscape-0.92.3 does not compile anymore

commit dcd8ad25023db542ade5edc23fc5f943d8ee6376
Author: Albert Astals Cid <email address hidden>
Date: Thu Aug 23 23:07:41 2018 +0200

    Also delete Object::dictAdd that takes a char *

    Makes sure noone gets a char * -> const char * promotion via Object

ERROR message:

In file included from /usr/include/gtk-2.0/gtk/gtk.h:173,
                 from /usr/include/gtkmm-2.4/gtkmm/box.h:44,
                 from extension/internal/grid.cpp:18:
/usr/include/gtk-2.0/gtk/gtkstatusicon.h:76:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^
/usr/include/gtk-2.0/gtk/gtkstatusicon.h:77:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved2’ [-Wparentheses]
   void (*__gtk_reserved2);
        ^
extension/internal/pdfinput/pdf-parser.cpp: In member function ‘Stream* PdfParser::buildImageStream()’:
extension/internal/pdfinput/pdf-parser.cpp:3689:39: error: use of deleted function ‘void Object::dictAdd(char*, Object&&)’
       dict.dictAdd(key, std::move(obj));
                                       ^
In file included from /usr/include/poppler/GfxState.h:43,
                 from /usr/include/poppler/Gfx.h:42,
                 from extension/internal/pdfinput/pdf-parser.cpp:35:
/usr/include/poppler/Object.h:267:8: note: declared here
   void dictAdd(char *key, Object &&val) = delete;
        ^~~~~~~

Tags: build
Revision history for this message
Mc (mc...) wrote :

Seriously poppler should consider having a deprecation period, we already have way too many #if for poppler stuff.
They can't just go from
  void dictAdd(const char *key, Object &&val);
to
  void dictAdd(char *key, Object &&val) = delete;
  void dictAdd(const char *key, Object &&val);
and just expect everyone to #if all uses of it ?

Revision history for this message
Mc (mc...) wrote :

(sorry, no const in the first one ^^)

Revision history for this message
Mc (mc...) wrote :

Is there even a #if which can sort out if the code is newer than this commit ?

Changed in inkscape:
status: New → Triaged
Revision history for this message
Patrick Storz (ede123) wrote :

I wouldn't care until there's a stable version released containing this fix...

Revision history for this message
Patrick Storz (ede123) wrote :

Poppler 0.69 with the change was released on 21 Sep 2018, so we might consider fixing this now ;-)

Mac CI is currently failing because of this [2].

[1] https://gitlab.freedesktop.org/poppler/poppler/commit/2052dc60f5b7403418384237d4bad2c7faf0acee
[2] https://gitlab.com/inkscape/inkscape/-/jobs/101052146

Changed in inkscape:
status: Triaged → Confirmed
importance: Undecided → Critical
tags: added: build
Revision history for this message
Thomas Holder (speleo3) wrote :
Thomas Holder (speleo3)
Changed in inkscape:
assignee: nobody → Thomas Holder (speleo3)
Thomas Holder (speleo3)
Changed in inkscape:
status: Confirmed → Fix Committed
Revision history for this message
vivo (francesco-riosa) wrote :

nice! Thanks

Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

Fix was released to 0.92.4.

Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.