Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384069 - sci-geosciences/grass-6.4.1[png] fails to compile agains media-libs/libpng-1.5.4
Summary: sci-geosciences/grass-6.4.1[png] fails to compile agains media-libs/libpng-1.5.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libpng-1.5
  Show dependency tree
 
Reported: 2011-09-22 12:06 UTC by Martin von Gagern
Modified: 2011-09-27 22:25 UTC (History)
3 users (show)

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


Attachments
emerge --info (sci-geosciences:grass-6.4.1.emerge--info,6.84 KB, text/plain)
2011-09-22 12:06 UTC, Martin von Gagern
Details
build log (gziped) (sci-geosciences:grass-6.4.1:20110922-102654.log.gz,199.03 KB, application/octet-stream)
2011-09-22 12:08 UTC, Martin von Gagern
Details
Proposed patch (gentoo384069a.patch,1.36 KB, patch)
2011-09-25 00:56 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2011-09-22 12:06:18 UTC
Created attachment 287399 [details]
emerge --info

The PNG code in the Grass release currently in portage apparently accesses structure members which have become private in the latest libpng bump:

r.out.png.c: In function ‘main’:
r.out.png.c:159:2: warning: format not a string literal and no format arguments
r.out.png.c:264:13: error: dereferencing pointer to incomplete type
r.out.png.c:265:13: error: dereferencing pointer to incomplete type
r.out.png.c:266:13: error: dereferencing pointer to incomplete type
r.out.png.c:306:11: error: dereferencing pointer to incomplete type
r.out.png.c:308:11: error: dereferencing pointer to incomplete type
r.out.png.c: In function ‘write_wld’:
r.out.png.c:455:5: warning: format not a string literal and no format arguments
r.out.png.c:458:2: warning: format not a string literal and no format arguments
r.out.png.c:460:2: warning: format not a string literal and no format arguments
r.out.png.c:462:2: warning: format not a string literal and no format arguments
make[2]: *** [OBJ.x86_64-pc-linux-gnu/r.out.png.o] Error 1
Comment 1 Martin von Gagern 2011-09-22 12:08:58 UTC
Created attachment 287401 [details]
build log (gziped)

Sorry, had to gzip that log, as it is too large to attach uncompressed.
Comment 2 Martin von Gagern 2011-09-25 00:56:04 UTC
Created attachment 287639 [details, diff]
Proposed patch

This makes grass compile for me. Changes are enclosed in preprocessor switches to ensure unchanged operation with older libpng, even though I assume that the  png_set_IHDR function has been around for a while now.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-09-27 11:23:47 UTC
I dropped the #ifdef's because the code should work fine with libpng-1.2, 1.4 and 1.5

+  27 Sep 2011; Samuli Suominen <ssuominen@gentoo.org> grass-6.4.1.ebuild,
+  +files/grass-6.4.1-libpng15.patch:
+  Fix building with libpng15 wrt #384069 by Martin von Gagern
Comment 4 Martin von Gagern 2011-09-27 22:25:49 UTC
No need to take this upstream, as their trunk already takes care of this:
http://trac.osgeo.org/grass/changeset/43927
If you prefer the upstream patch over mine, you'll have to adjust the file name, but otherwise the patch will apply just as well. I don't care either way. Reminds me I should have had a look at their code before I wrote my own patch...