Detect properly the libpng so that inkscape can build against 1.4.x and further too

Bug #520521 reported by Fridrich
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Alex Valavanis

Bug Description

Inkscape would not detect correctly libpng 1.4.x. The attached patch is fixing it.

Tags: build
Revision history for this message
Fridrich (fridrich-strba) wrote :
jazzynico (jazzynico)
tags: added: build
jazzynico (jazzynico)
Changed in inkscape:
milestone: none → 0.48
status: New → Triaged
jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.48 → 0.48.1
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Low
jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.48.1 → 0.48.2
Revision history for this message
Christoph Buchner (bilderbuchi) wrote :

So, is this the only bug still blocking a 0.48.2 release? https://launchpad.net/inkscape/+milestone/0.48.2

jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.48.2 → none
Revision history for this message
Jeff Kowalczyk (jfkw) wrote :

Adding my note here (also (I can't search currently, Launchpad timeouts) instead of opening a new bug:

On Gentoo Linux ~amd64, I have libpng version 1.2.46 1.4.8 1.5.5 installed in their respective slots, e.g. Google Chrome depends on libpng-1.2. Inkscape was building OK with libpng-1.4, but on 2011-09-18 when libpng-1.5 was first added to my system, Inkscape subsequently tries to build against 1.5, but fails with the following error:

  CXX helper/png-write.o
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/freetype2 -fopenmp -I/usr/include/ImageMagick -I/usr/inc
lude/libwpg-0.2 -I/usr/include/libwpd-0.9 -I/usr/include/poppler -pthread -I/usr/include/poppler/glib -I/usr/include/pop
pler -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/inc
lude -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libd
rm -I/usr/include/pango-1.0 -DPOTRACE=\"potrace\" -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/inclu
de/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/includ
e/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/libxm
l2 -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/gtkspell-2.0 -I/usr/include/glibmm-2.4 -I/usr/lib64
/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib64/gdkmm-2.4/inc
lude -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I
/usr/include/gtkmm-2.4 -I/usr/lib64/gtkmm-2.4/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-unix-print-2.0 -I../cxxtest
  -I./bind/javainc -I./bind/javainc/linux -I./extension/dbus -Werror=format-security -Wall -Wformat -Wformat-security -W -D_F
ORTIFY_SOURCE=2 -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -march=core2
-O2 -pipe -fno-strict-aliasing -fopenmp -c -o helper/png-write.o helper/png-write.cpp
helper/png-write.cpp: In function ‘bool sp_png_write_rgba_striped(SPDocument*, const gchar*, long unsigned int, long unsigned i
nt, double, double, int (*)(const guchar**, void**, int, int, void*), void*)’:
helper/png-write.cpp:169:9: error: invalid use of incomplete type ‘struct png_struct’
/usr/include/libpng15/png.h:830:16: error: forward declaration of ‘struct png_struct’

jazzynico (jazzynico)
Changed in inkscape:
assignee: JazzyNico (jazzynico) → nobody
Revision history for this message
su_v (suv-lp) wrote :

@Jeff Kowalczyk - build failure with libpng 1.5 (due to stricter type checking) is tracked in
- Bug #721029 “inkscape fails to build against libpng 1.5”
 <https://bugs.launchpad.net/inkscape/+bug/721029>

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

It would be neater to just use pkg-config as suggested in bug #261410. That will give us easy access to the library version. We can then write conditional builds (as we do with Gtk+) wherever there is an API compatibility break.

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

Fix committed in lp:inkscape r12152. We now just use pkg-config rather than unreliable manual check.

Changed in inkscape:
assignee: nobody → Alex Valavanis (valavanisalex)
milestone: none → 0.49
status: Triaged → Fix Committed
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.