poppler 0.20 breaks build

Bug #1005565 reported by Denis Declara on 2012-05-28
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Luca Bruno
inkscape (Debian)
Fix Released
Unknown
inkscape (Fedora)
Fix Released
Undecided
inkscape (Ubuntu)
High
Andy Whitcroft

Bug Description

Poppler 0.20 has some changes that break compilation. On the redhat bugtracker there is a patch that seems to fix the compilation problems. https://bugzilla.redhat.com/show_bug.cgi?id=822413

* Note that this patch is for inkscape-0.48.2-5 in Fedora, and needs checking for compatibility with lp:inkscape

Description of problem:
inkscape fails when built with new poppler-0.20.0.

Version-Release number of selected component (if applicable):
inkscape-0.48.2-5

Additional info:
This patch should fix the problem:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/poppler20.patch?h=packages/inkscape

Created attachment 587053
Patch

Patch modified to apply cleanly on top of existing fedora package patches.

su_v (suv-lp) on 2012-05-28
tags: added: build
su_v (suv-lp) on 2012-05-29
Changed in inkscape:
importance: Undecided → High
Alex Valavanis (valavanisalex) wrote :

Confirmed in trunk PPA for Ubuntu Quantal (Poppler 0.20.0).

From build log [1]:

 CXX extension/internal/pdfinput/svg-builder.o
extension/internal/pdfinput/svg-builder.cpp: In member function 'void Inkscape::Extension::Internal::SvgBuilder::updateFont(GfxState*)':
extension/internal/pdfinput/svg-builder.cpp:1007:15: error: 'class GfxFont' has no member named 'getOrigName'
extension/internal/pdfinput/svg-builder.cpp:1008:37: error: 'class GfxFont' has no member named 'getOrigName'

[1] https://launchpadlibrarian.net/107139828/buildlog_ubuntu-quantal-amd64.inkscape-trunk_1%3A0.48%2Bdevel%2B11467%2B32~quantal1_FAILEDTOBUILD.txt.gz

Changed in inkscape:
status: New → Triaged
description: updated
Andy Whitcroft (apw) on 2012-06-11
Changed in inkscape (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Andy Whitcroft (apw)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package inkscape - 0.48.3.1-1ubuntu2

---------------
inkscape (0.48.3.1-1ubuntu2) quantal; urgency=low

  * Follow ABI changes for libpoppler25 (poppler 0.20.0-0ubuntu1).
    (LP: #1005565)
 -- Andy Whitcroft <email address hidden> Mon, 11 Jun 2012 19:22:46 +0100

Changed in inkscape (Ubuntu):
status: In Progress → Fix Released
Luca Bruno (lucab) wrote :

As we're using older poppler libs on various architecture (prominently 0.12 in windows devlibs), I'd suggest going for conditional building instead.

The attached patch works both with newer and older poppler version, and it's up for review.
If no objections received, I'm going to commit this to trunk in a couple of days.

Changed in inkscape:
assignee: nobody → Luca Bruno (lucab)
ScislaC (scislac) wrote :

Luca,

Patch works on Quantal. I was working on very similar patch and you beat me to adding the "or" for the color space stuff (my build was still failing at that point). :)

Denis Declara (declara91) wrote :

Luca,

as far as I understand your patch targets only autotools. What about CMake?

su_v (suv-lp) wrote :

Luca Bruno wrote:
> As we're using older poppler libs on various architecture
> (prominently 0.12 in windows devlibs), I'd suggest going for
> conditional building instead.
>
> The attached patch works both with newer and older poppler version,
> and it's up for review. If no objections received, I'm going to
> commit this to trunk in a couple of days.

The changes to 'src/extension/internal/pdfinput/svg-builder.cpp' are not conditional - are there any test cases around to confirm that switching from 'getOrigName()' to 'getName()' has no adverse side-effects with older poppler versions?

Luca Bruno (lucab) wrote :

@declara91 I still hate having 3 build mechanisms, but I'm patching cmake and btool too right now, for the sake of completeness

@suv-lp looking at http://cgit.freedesktop.org/poppler/poppler/commit/?id=c0affb1845c339f89ca67608cb9fd9134ff902f5 and speaking with poppler devs, those two should have been redundant with different visibility. It's working for me, but we can re-enable if any regression is seen.

0.48.2-8

- fix icon/desktop-file scriptlets (#739375)
- drop .desktop vendor (f18+)
- inkscape doesn't build with poppler-0.20.0 (#822413)

http://koji.fedoraproject.org/koji/taskinfo?taskID=4190484

boo, patch doesn't seem to work as advertised, looking closer now.

Hrm, seems to build ok locally on my f17 x86_64 box with poppler-0.20.0-1 installed. Something odd going on. (f18 gcc/glibc differences?, missing builddep?)

From the build failure, it looks like the first argument to the function "error" is being eaten somewhere, maybe something defining "error" as a macro?

OK, the version of the patch from https://launchpad.net/bugs/1005565 works, build succeeds now.

Luca Bruno (lucab) wrote :

Fixed in bzr revision 11518.

Changed in inkscape:
status: Triaged → Fix Released
su_v (suv-lp) wrote :

Since another bug-fix release (0.48.4) is planned, this needs to be backported to the 0.48.x branch AFAIU.

Changed in inkscape:
milestone: none → 0.49
status: Fix Released → Fix Committed
tags: added: backport-proposed
ScislaC (scislac) wrote :

Backported to 0.48.x branch, commit 9905.

Changed in inkscape:
milestone: 0.49 → 0.48.4
su_v (suv-lp) on 2012-08-14
tags: removed: backport-proposed
jazzynico (jazzynico) wrote :

Apparently the changes were introduced in Poppler 0.18 (at least it doesn't compile on Crunchbang 11, based on Debian Wheezy, Poppler 0.18.4-3).
I'm going to try with a modified configure.ac with a test on 0.18.0 instead of 0.20.0.

su_v (suv-lp) wrote :

> Apparently the changes were introduced in Poppler 0.18 (at least it doesn't compile
> on Crunchbang 11, based on Debian Wheezy, Poppler 0.18.4-3).

Current trunk compiles fine for me both with poppler 0.18.4 and with poppler 2.20.3 (no poppler-specific local changes to configure.ac) on OS X 10.7.4 (dependencies installed in separate MacPorts trees).

Trunk Build breaks with poppler-0.20.5-1 and before that on 0.20.4-1.

Given: poppler-0.20.5-1, poppler-data-0.4.6-1, Debian Linux

In file included from /usr/include/poppler/Object.h:41:0,
                 from /usr/include/poppler/GfxState.h:40,
                 from /usr/include/poppler/Gfx.h:40,
                 from /home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:35:
/usr/include/poppler/Error.h:54:19: note: declared here
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp: In member function ‘void PdfParser::opImageData(Object*, int)’:
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:3312:67: error: invalid conversion from ‘int’ to ‘ErrorCategory’ [-fpermissive]
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:3312:67: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive]
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:3312:67: error: too few arguments to function ‘void error(ErrorCategory, int, const char*, ...)’
In file included from /usr/include/poppler/Object.h:41:0,
                 from /usr/include/poppler/GfxState.h:40,
                 from /usr/include/poppler/Gfx.h:40,
                 from /home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:35:
/usr/include/poppler/Error.h:54:19: note: declared here
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp: In member function ‘void PdfParser::opEndImage(Object*, int)’:
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:3321:67: error: invalid conversion from ‘int’ to ‘ErrorCategory’ [-fpermissive]
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:3321:67: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive]
/home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:3321:67: error: too few arguments to function ‘void error(ErrorCategory, int, const char*, ...)’
In file included from /usr/include/poppler/Object.h:41:0,
                 from /usr/include/poppler/GfxState.h:40,
                 from /usr/include/poppler/Gfx.h:40,
                 from /home/mdriftmeyer/DeveloperProjects/GTKProjects/Inkscape/bazaar-fork/inkscape/src/extension/internal/pdfinput/pdf-parser.cpp:35:
/usr/include/poppler/Error.h:54:19: note: declared here
make[2]: *** [src/CMakeFiles/inkscape_LIB.dir/extension/internal/pdfinput/pdf-parser.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/inkscape_LIB.dir/all] Error 2
make: *** [all] Error 2
mdriftmeyer@horus:~/DeveloperProjects/GTKProjects/Inkscape/cmake-trunk$

su_v (suv-lp) wrote :

> Trunk Build breaks with poppler-0.20.5-1 and before that on 0.20.4-1.

Not confirmed: current trunk builds ok with poppler 0.20.3, 0.20.4 and 0.20.5, tested on
- OS X 10.7.4 (poppler 0.20.3, 0.20.5 via MacPorts)
- Ubuntu 12.10 (poppler 0.20.4)

su_v (suv-lp) wrote :

Marc J. Driftmeyer wrote on 2012-11-15:
> mdriftmeyer@horus:~/DeveloperProjects/GTKProjects/Inkscape/cmake-trunk$

If you are trying to build with 'cmake', please file a separate report (and mention 'cmake'): the official build system for Inkscape is based on Autotools (autogen.sh; configure && make).

Ted Gould (ted) on 2012-12-17
Changed in inkscape:
status: Fix Committed → Fix Released
Changed in inkscape (Debian):
status: Unknown → Confirmed
Changed in inkscape (Debian):
status: Confirmed → Fix Released
Changed in inkscape (Fedora):
importance: Unknown → Undecided
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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