Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383567 - app-office/abiword fails to compile with >=media-libs/libpng-1.5
Summary: app-office/abiword fails to compile with >=media-libs/libpng-1.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GNOME Office (OBSOLETE)
URL:
Whiteboard:
Keywords: Inclusion, PATCH
Depends on:
Blocks: libpng-1.5
  Show dependency tree
 
Reported: 2011-09-19 01:46 UTC by Ed Catmur
Modified: 2011-09-24 11:23 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
garble-png.patch (garble-png.patch,558 bytes, text/plain)
2011-09-19 01:46 UTC, Ed Catmur
Details
garble-png.patch (garble-png.patch,2.09 KB, patch)
2011-09-19 01:54 UTC, Ed Catmur
Details | Diff
build.log (build.log,37.16 KB, text/plain)
2011-09-21 09:09 UTC, Markos Chandras (RETIRED)
Details
correct patch (abiword-2.8.6-libpng15.patch,3.62 KB, patch)
2011-09-21 18:13 UTC, Markos Chandras (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2011-09-19 01:46:20 UTC
Created attachment 286949 [details]
garble-png.patch

CXX   abiword-garble-png.o
abiword-garble-png.cpp: In member function ‘bool abiword_document::garble_png(void*&, size_t&)’:
abiword-garble-png.cpp:82:22: error: invalid use of incomplete type ‘struct png_info’
/usr/include/libpng15/png.h:696:16: error: forward declaration of ‘struct png_info’
make[4]: *** [abiword-garble-png.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

From png.h:
/* The complete definition of png_info has, as of libpng-1.5.0,
 * been moved into a separate header file that is not accessible to
 * applications.  Read libpng-manual.txt or libpng.3 for more info.
 */
Comment 1 Ed Catmur 2011-09-19 01:46:39 UTC
Patch attached.
Comment 2 Ed Catmur 2011-09-19 01:54:56 UTC
Created attachment 286951 [details, diff]
garble-png.patch
Comment 3 Samuli Suominen gentoo-dev 2011-09-19 11:57:09 UTC
Looks like the patch for bug 356287 wasn't enough then ... I guess this can be triggered by some USE flag combination I didn't test.
Comment 4 Kamen Dokov 2011-09-19 16:35:06 UTC
(In reply to comment #3)
> Looks like the patch for bug 356287 wasn't enough then ... I guess this can be
> triggered by some USE flag combination I didn't test.

I have the same problem and my useflags are: 

[ebuild   R    ] app-office/abiword-2.8.6-r1  USE="cups grammar latex math openxml ots plugins readline spell thesaurus wmf wordperfect -collab -debug -gnome"
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2011-09-20 12:53:58 UTC
(In reply to comment #2)
> Created attachment 286951 [details, diff]
> garble-png.patch

Where did you find this patch? Did you contact upstream about that?
Comment 6 thunderrd 2011-09-20 15:16:26 UTC
My error is similar enough to be related:

  CXX   abiword-garble-png.o
abiword-garble.cpp: In destructor ‘abiword_document::~abiword_document()’:
abiword-garble.cpp:90:54: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
abiword-garble.cpp:92:53: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
abiword-garble-png.cpp: In member function ‘bool abiword_document::garble_png(void*&, size_t&)’:
abiword-garble-png.cpp:82:22: error: invalid use of incomplete type ‘struct png_info’
/usr/include/libpng15/png.h:696:16: error: forward declaration of ‘struct png_info’
make[4]: *** [abiword-garble-png.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
emake failed

Use flags are:

USE="collab cups plugins readline spell thesaurus -debug -gnome -grammar -latex -math -openxml -ots -wmf -wordperfect"
Comment 7 Ed Catmur 2011-09-20 16:41:00 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > Created attachment 286951 [details, diff]
> > garble-png.patch
> Where did you find this patch? Did you contact upstream about that?

Wrote it myself.  Haven't got round to upstreaming it yet;I'll do that when I'm back at a proper computer:)
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2011-09-21 09:09:55 UTC
Created attachment 287245 [details]
build.log

The proposed patch does not seem to work
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2011-09-21 18:00:33 UTC
(In reply to comment #9)
> I think we are missing the following patches from netbsd to work with
> libpng-1.5... but I am still using png-1.4 and, then, cannot test if they fix
> all issues.
> 
> http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/editors/abiword/patches/patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp?rev=1.1;content-type=text%2Fplain
> http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/editors/abiword/patches/patch-plugins_garble_xp_abiword-garble-png.cpp?rev=1.1;content-type=text%2Fplain

I get the exact same build failure when using the netbsd patches.
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2011-09-21 18:13:03 UTC
Created attachment 287339 [details, diff]
correct patch

Could someone please test this patch? I can't test it because I hit bug #367865. If someone manages to compile it let me know and I will commit it. Maybe it is time to close both bugs at once though
Comment 12 Jesús Guerrero Botella (RETIRED) gentoo-dev 2011-09-21 21:08:45 UTC
(In reply to comment #11)
> Created attachment 287339 [details, diff]
> correct patch
> 
> Could someone please test this patch? I can't test it because I hit bug
> #367865. If someone manages to compile it let me know and I will commit it.
> Maybe it is time to close both bugs at once though

It solved the problem for me.
Comment 13 Pacho Ramos gentoo-dev 2011-09-22 15:36:40 UTC
(In reply to comment #11)
> Created attachment 287339 [details, diff]
> correct patch
> 
> Could someone please test this patch? I can't test it because I hit bug
> #367865. If someone manages to compile it let me know and I will commit it.
> Maybe it is time to close both bugs at once though

Markos, feel free to commit and fix both (I am trying upstream to release a fixed 2.8.x version for weeks without success :( )
Comment 14 Lars Wendler (Polynomial-C) gentoo-dev 2011-09-23 09:08:30 UTC
+  23 Sep 2011; Lars Wendler <polynomial-c@gentoo.org>
+  files/abiword-2.8.6-libpng15.patch:
+  non-maintainer commit: Added fixed patch to build with libpng15 (bug
+  #383567).
+
Comment 15 Kamen Dokov 2011-09-23 19:28:47 UTC
Still failing for me with:

Making all in xp
  CXX   AiksaurusABI.o
  LINK  libxp.la
  LINK  aiksaurus.la
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpng14
collect2: ld returned 1 exit status
make[4]: *** [aiksaurus.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
Comment 16 Markos Chandras (RETIRED) gentoo-dev 2011-09-23 21:55:56 UTC
(In reply to comment #15)
> Still failing for me with:
> 
> Making all in xp
>   CXX   AiksaurusABI.o
>   LINK  libxp.la
>   LINK  aiksaurus.la
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -lpng14
> collect2: ld returned 1 exit status
> make[4]: *** [aiksaurus.la] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1

This is a different sort of problem. emerge lafilefixer and run lafilefixer --justfixit. Consult bug #319101
Comment 17 Kamen Dokov 2011-09-23 22:51:03 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Still failing for me with:
> > 
> > Making all in xp
> >   CXX   AiksaurusABI.o
> >   LINK  libxp.la
> >   LINK  aiksaurus.la
> > /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld:
> > cannot find -lpng14
> > collect2: ld returned 1 exit status
> > make[4]: *** [aiksaurus.la] Error 1
> > make[3]: *** [all-recursive] Error 1
> > make[2]: *** [all-recursive] Error 1
> > make[1]: *** [all-recursive] Error 1
> 
> This is a different sort of problem. emerge lafilefixer and run lafilefixer
> --justfixit. Consult bug #319101

Thank you!

lafilefixer --justfixit did NOT do anything but the script from bug #319101 

rebuilt those 2 packages :

app-text/aiksaurus-1.2.1
media-libs/libexif-gtk-0.3.5-r2

and after that abiword emerged just fine :)

the actual script:

emerge -a1 --keep-going $(find /usr/lib* /lib* -name '*.la' -print0 \
 | xargs -0 grep -l png14 | while read f; do qfile -C -v "$f" \ | awk '{print $1}'; done | sort -u | sed 's:^:=:')
Comment 18 Pacho Ramos gentoo-dev 2011-09-24 11:23:06 UTC
(In reply to comment #17)
[...]
> the actual script:
> 
> emerge -a1 --keep-going $(find /usr/lib* /lib* -name '*.la' -print0 \
>  | xargs -0 grep -l png14 | while read f; do qfile -C -v "$f" \ | awk '{print
> $1}'; done | sort -u | sed 's:^:=:')

Samuli, could this script be suggested in some way (elog message or news item) when updating to libpng-1.5? Looks like it's not obvious to manually check for broken .la files as I can see from similar bug reports that need this to be run

Thanks