Compile against external libpotrace

Bug #1156664 reported by Alex Valavanis
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Alex Valavanis
Inkscape Devlibs
Fix Released
High
jazzynico

Bug Description

We currently bundle a copy of the potrace library in Inkscape trunk. A quick search tells me that libpotrace is available in Ubuntu, Fedora and OpenSUSE. For the sake of maintainability, and reducing our installation footprint, we should allow building against the external library.

Tags: build tracing

Related branches

jazzynico (jazzynico)
Changed in inkscape-devlibs:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Low
status: New → Triaged
jazzynico (jazzynico)
Changed in inkscape-devlibs:
assignee: jazzynico (jazzynico) → nobody
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Bug #1438366 might provide added incentive to address this bug.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Current status in distros:

Ubuntu Precise: 1.10
Ubuntu Trusty, Utopic, Vivid: 1.11

Fedora 20,21,22: 1.12

OpenSUSE 12.2,12.3: 1.10
OpenSUSE 13.1,13.2: 1.11
OpenSUSE tumbleweed: 1.12

Seems like it should be fairly straightforward to switch to a regular dependency... any objections? Do we have any in-trunk modifications to the package?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Ubuntu Vivid now has potrace 1.12 (see Bug #1443467)

Revision history for this message
jazzynico (jazzynico) wrote :

> Do we have any in-trunk modifications to the package?

Some code-design changes only, and no bug fix in the trunk.

Changed in inkscape:
status: Triaged → In Progress
assignee: nobody → Alex Valavanis (valavanisalex)
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Merge proposed from lp:~valavanisalex/inkscape/fix-1156664

Anyone keen to look at adding upstream Potrace to DevLibs?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Fix committed in lp:inkscape r14480

DevLibs update still needed

Changed in inkscape:
status: In Progress → Fix Committed
milestone: none → 0.92
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Potrace build-dep added in PPA.

Bumped importance in DevLibs, since Potrace-dependent features are now disabled

Changed in inkscape-devlibs:
importance: Low → High
Revision history for this message
Patrick Storz (ede123) wrote :

This actually broke building on Windows completely (see below). Please fix ASAP!

    cc : compile src/trace/potrace/decompose.cpp (src/trace/potrace/bitmap.h modified)
Make error line 307: problem compiling: mingw32-g++: error: src/trace/potrace/decompose.cpp: No such file or directory
mingw32-g++: fatal error: no input files
compilation terminated.

compile src/trace/potrace/inkscape-potrace.cpp
Make error line 307: problem compiling: In file included from src/trace/potrace/inkscape-potrace.cpp:17:0:
src/trace/potrace/inkscape-potrace.h:21:24: fatal error: potracelib.h: No such file or directory
compilation terminated.

    cc : compile src/trace/trace.cpp (src/document.h modified)
Make error line 307: problem compiling: In file included from src/trace/trace.cpp:15:0:
src/trace/potrace/inkscape-potrace.h:21:24: fatal error: potracelib.h: No such file or directory
compilation terminated.

    cc : compile src/ui/dialog/tracedialog.cpp (src/trace/potrace/inkscape-potrace.h modified)
Make error line 307: problem compiling: In file included from src/ui/dialog/tracedialog.cpp:33:0:
src/trace/potrace/inkscape-potrace.h:21:24: fatal error: potracelib.h: No such file or directory
compilation terminated.

    cc : compile src/ui/tools/flood-tool.cpp (src/document.h modified)
Make error line 307: problem compiling: In file included from src/ui/tools/flood-tool.cpp:24:0:
src/trace/potrace/inkscape-potrace.h:21:24: fatal error: potracelib.h: No such file or directory
compilation terminated.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Eduard,

Sorry to hear this... I don't have a Windows machine to test this, I'm afraid. It looks like it's trying to build the potrace-dependent tools, which should not be possible without the HAVE_POTRACE flag being defined.

Did you run a clean build? I believe this would just need:

btool clean
btool

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced with a clean build, Inkscape rev. 14495.

> It looks like it's trying to build the potrace-dependent tools, which should not be possible without the HAVE_POTRACE flag being defined.

The attached patch can be used as a workaround until Potrace is available in the devlibs (sorry, I no longer have the necessary tools installed to compile it myself). All Potrace related tools are disabled, but at least Inkscape compiles correctly.

Revision history for this message
jazzynico (jazzynico) wrote :

Temporary workaround committed rev. 14496. Don't forget to revert it when it's fixed in the devlibs!

Revision history for this message
LucaDC (lucadc) wrote :

Just confirming that the workaround worked for me: clean build successful on Windows XP SP 3.
Thank you jazzynico!

Revision history for this message
jazzynico (jazzynico) wrote :

Tests in progress with Inkscape trunk rev. 14557, devlibs rev. 32 and libpotrace 1.13 (compiles locally).
Looks good for now.

Changed in inkscape-devlibs:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

libpotrace added in the devlibs, rev. 54.
build.xml file modified in the trunk, rev. 14559.

Changed in inkscape-devlibs:
status: In Progress → Fix Committed
jazzynico (jazzynico)
Changed in inkscape-devlibs:
status: Fix Committed → Fix Released
Bryce Harrington (bryce)
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.