0.47 build error with poppler 0.12.2 on Linux

Bug #487038 reported by Masato HASHIMOTO
70
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Critical
Krzysztof Kosinski
Gentoo Linux
Fix Released
Medium
inkscape (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned

Bug Description

0.47 (trunk, branches/RELEASE_0_47_BRANCH and tarball on SF) build error on Linux.
By 2009-11-20, I could build trunk normally. I think it cause by some upgrade of depending packages recently...

Build and platform:
Build 2009-11-23 on Arch Linux (x86_64)

Related package's version:
gtkmm 2.18.2
gc 7.1
libxslt 1.1.26
perl 5.10.1
lcms 1.18
poppler-glib 0.12.2
imagemagick 6.5.7.10
python 2.6.4
libjpeg 7

Tags: build linux
Revision history for this message
Masato HASHIMOTO (hashimo) wrote :
su_v (suv-lp)
tags: added: build
tags: added: linux
Revision history for this message
Masato HASHIMOTO (hashimo) wrote :

I confirmed if popler's version is 0.12.2, build fails.
poppler 0.12.1 is OK.

Revision history for this message
Koop Mast (kwm) wrote :
Revision history for this message
sachahony (sacha-hony) wrote :

I have found the same problem. Comparing the newer Gfx.cc with the pdf-parser.c in inkscape I have made a patch to allow compilation.

Revision history for this message
Masato HASHIMOTO (hashimo) wrote :

Thanks sachahony, it works fine.

su_v (suv-lp)
Changed in inkscape:
status: New → Triaged
summary: - 0.47 build error on Linux
+ 0.47 build error with poppler 0.12.2 on Linux
Revision history for this message
Michael Witten (mfwitten) wrote :

From what I can tell, that patch is horrendously incorrect; it will allow inkscape to build, but then inkscape will only run as long as you never execute certain color space code in poppler (who knows what constraints the future will bring).

Specifically, inkscape's PdfParser class was apparently "derived" from poppler's Gfx class in the sense that the code was copied from Gfx.h a LONG time ago and then refactored; there is no formal derivation (that is, using Gfx as a base class). Ergo, casting (with a C-style cast, no less) the PdfParser (`this') to type Gfx* is non-portable over time and indeed makes no sense as of today.

Revision history for this message
su_v (suv-lp) wrote :

@JazzyNico - should we raise importance to 'high'? I can't estimate how many users will already compile/work with the updated poppler library 0.12.2 - released on Nov 18, 2009 (according to their website <http://poppler.freedesktop.org/>).

Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
jazzynico (jazzynico) wrote :

Ubuntu 9.10 still uses 0.12.0, but I can't says which version will be included in the next version and the other Linux distros.
But sooner or later, it will probably cause trouble to most users who compile Inkscape.
Yes, let's raise to "High" and target it to 0.48.

Changed in inkscape:
importance: Medium → High
milestone: none → 0.48
Revision history for this message
ScislaC (scislac) wrote :

Ubuntu Lucid (10.04) already has 12.2 in the repos, I had to use the "bad" patch above to compile.

Revision history for this message
su_v (suv-lp) wrote :

On OS X MacPorts currently has 0.12.1, but looking at the revision log of the portfile it seems actively maintained and has seen 9 version updates in the last 12 months. I expect the new 0.12.2 will soon be the current version in MacPorts too. (This only concerns mac users that compile Inkscape themselves, the packages from sf.net include the library similar to the windows installer).

Revision history for this message
Kees Cook (kees) wrote :

Looks like it's safe to just pass a NULL gfx there. Might eliminate caching in certain situations, but it won't explode, I don't think.

Kees Cook (kees)
Changed in inkscape (Ubuntu Lucid):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package inkscape - 0.47.0-1ubuntu1

---------------
inkscape (0.47.0-1ubuntu1) lucid; urgency=low

  * Merge with Debian testing (LP: #498150). Remaining changes:
    - debian/control:
      - promote python-lxml, python-numpy, python-uniconvertor to Recommends.
      - demote pstoedit to Suggests (universe package).
      - drop libssl-dev, no longer needed (Debian bug 484527).
    - debian/rules:
      - Handle parallel builds via -j (Debian bug 562226).
      - Run intltool-update on build (Ubuntu-specific).
      - Add translation domain to .desktop files (Ubuntu-specific).
    - debian/watch:
      - Correctly handle "pre" versions (Debian bug 562225).
  * 50-poppler-API.patch, debian/control: poppler 0.12.2 changed the
    GfxColorSpace API (LP: #487038).

inkscape (0.47.0-1) unstable; urgency=low

  * Imported Upstream version 0.47
  * This is upstream version 0.47, I added the .0 because
    I forget the ~ in the -pre versions.
  * add proper Vcs-fields to debian/control
  * upload sponsored by Guido Guenther <email address hidden>

inkscape (0.47pre4-1) unstable; urgency=low

  * Imported Upstream version 0.47pre4
  * upload sponsored by Guido Guenther <email address hidden>

inkscape (0.47pre2-2) unstable; urgency=low

  * fix installation of usr/share/application-
    registry/inkscape.applications
  * upload sponsored by Guido Guenther <email address hidden>

inkscape (0.47pre2-1) unstable; urgency=low

  * new upstream release (closes: #532277)
    Improvements and new features include:
    - code cleanups and refractoring
    - autosave feature, configurable via Inkscape preferences
    - new and enhanced tools, extensions and filters
    - new path effects
    - enhanced import and export features
    - improved svg support
    - many other improvements and new features. For a better and more
      comprehensive decription of enhancements see the online release notes at
      http://wiki.inkscape.org/wiki/index.php/Release_notes/0.47
  * remove 04-only-use-valid-font-families-in-text-tool.dpatch
    since there is a better fix in the code now (closes: #496784)
  * remove other patches which are no longer needed:
    - 01_mips.dpatch
    - 02-poppler-0.8.3.dpatch
    - 03-chinese-inkscape.dpatch
    - 05_fix_latex_patch.dpatch
    - 06_gcc-4.4.dpatch
    - 07_cdr2svg.dpatch
    - 08_skip-bad-utf-on-pdf-import.dpatch
    - 09_gtk-clist.dpatch
    - 10_belarussian.dpatch
    - 12_desktop.dpatch
    fix patch permissions in clean target
  * upload sponsored by Guido Guenther <email address hidden>
  * build-depend on libgsl0-dev
  * small adations to debian/rules
 -- Kees Cook <email address hidden> Wed, 23 Dec 2009 15:38:43 -0800

Changed in inkscape (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Marcel Partap (empee584) wrote :

nice to hear it has been fixed for the ubuntus, alas we gentooers ssstill waiting for the patch to be applied! because ...
> 15 Jan 2010; Ben de Groot <email address hidden> +poppler-0.12.3.ebuild
so pleeeease... ;-)

Changed in gentoo:
status: Unknown → Confirmed
Changed in gentoo:
status: Confirmed → Fix Released
Revision history for this message
Helmut Jarausch (jarausch) wrote :

I'm not sure but this looks like a new bug.
Bazaar-Version from 2010/02/16

extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opSetExtGState(Object*, int)':
extension/internal/pdfinput/pdf-parser.cpp:812: error: no matching function for call to 'GfxColorSpace::parse(Object*)'
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opSetFillColorSpace(Object*, int)':

and similar errors.
This is with poppler-0.12.3-r3 (GenToo revision 3)

Revision history for this message
HJarausch (jarausch-skynet) wrote :

The patch to Inkscape-0.47 on GenToo works with the Bazaar-version, as well.
Please apply it to the Bazaar-version.

Revision history for this message
su_v (suv-lp) wrote :

@HJarausch - we can't apply the patch as it is to bzr trunk because then AFAIU it would fail on all systems using older poppler versions which are still supported (at least that is what happened when the patch from comment #4 was applied to bzr trunk by mistake).

Revision history for this message
su_v (suv-lp) wrote :

While the patch allows to compile Inkscape with poppler >= 0.12.2 apparently there have been other changes in poppler 0.12.2 that now cause Inkscape to crash when importing certain PDF files, as was recently reported in bug #258504 “PDF import: crash in PopplerCache::lookup() with poppler >= 0.12.2” <https://bugs.launchpad.net/inkscape/+bug/258504>

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

this must be addressed before release - bumping to critical

Changed in inkscape:
importance: High → Critical
Changed in inkscape:
assignee: nobody → Krzysztof Kosinski (tweenk)
status: Triaged → Fix Committed
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Fixed in 9217. I used the second patch but modified it so that the new API is in ifdefs, and added some configure code. Compiles with both 0.12.1 and 0.12.4.

So far I can't reproduce the crashes from bug 258504 - it looks like Poppler upstream made a new ABI-incompatible release without bumping the soname, and this was the cause of crashes x_x

Revision history for this message
davidetkarine (saveurlinux) wrote :

Dear you
I'm running mandriva 2010.0 an I get this error while trying to open a .ai file:
inkscape: symbol lookup error: inkscape: undefined symbol: _ZN13GfxColorSpace5parseEP6Object
I think this problem is also related to the poppler version.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

davidetkarine: Please see comment 24 for bug 258504.
You need to recompile Inkscape against the updated Poppler libraries, or tell your distributor to fix this.

jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
Paul Ryan (tolzidan) wrote :

This appears to have reared it's head in macports any chance of the patch being ported to it?

I'm getting the described error with revision 22756 from trunk.

Thanks, I can probably apply the patch locally if someone can give me a hint as to what the patch was that fixed it for the other two (I just don't know your code organization yet).

Revision history for this message
su_v (suv-lp) wrote :

@Paul Ryan - don't install 'inkscape-devel' from MacPorts - it's an outdated port older than Inkscape 0.47 and 0.48. Install inkscape, the main port, which already includes the fix for poppler.

<http://www.macports.org/ports.php?by=name&substr=inkscape>

Changed in gentoo:
importance: Unknown → Medium
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.