Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 383737

Summary: [java-overlay] dev-java/icedtea-7.1.14 fails to compile against media-libs/libpng-1.5
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED OBSOLETE    
Severity: normal CC: rb6, uzytkownik2
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 247140, 354479, 382485    
Attachments: Patch ebuild to apply fix

Description Martin von Gagern 2011-09-19 23:51:27 UTC
dev-java/icedtea-7.1.14 from the java-overlay fails to compile against media-libs/libpng-1.5.4. The code accesses members through a png_structp pointer, but the corresponding struct is now incomplete, disallowing access to its members.

../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c:
 In function 'my_png_read_stream':
39:51: error: dereferencing pointer to incomplete type
 In function 'SplashDecodePng':
74:9: error: dereferencing pointer to incomplete type
78:12: error: dereferencing pointer to incomplete type
79:12: error: dereferencing pointer to incomplete type
make[6]: *** [/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/
openjdk.build/tmp/sun/sun.awt/splashscreen/obj64/splashscreen_png.o] Error 1

Upstream has a fix already:
http://hg.openjdk.java.net/icedtea/jdk7/jdk/raw-rev/e46d527097f1
Comment 1 R Bar-On 2011-09-20 23:59:30 UTC
with the patch, I still get this:

make[5]: Entering directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk/jdk/make/sun/splashscreen'
Begin parallel compiles: /var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk/jdk/make/sun/splashscreen
make[6]: Entering directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk/jdk/make/sun/splashscreen'
/usr/bin/gcc  -O2   -fno-strict-aliasing -fPIC -W -Wall  -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer -D_LITTLE_ENDIAN -g   -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DWITH_X11 -DNDEBUG -DARCH='"amd64"' -Damd64 -DLINUX -DRELEASE='"1.7.0_136-icedtea"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_LP64=1 -I. -I/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk.build/tmp/sun/sun.awt/splashscreen/CClassHeaders -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export -I../../../src/share/native/common -I../../../src/solaris/native/common -I../../../src/share/native/sun/awt -I../../../src/solaris/native/sun/awt   -I/usr/X11R6//include -I/usr/X11R6//include/X11/extensions -I../../../src/solaris/native/sun/awt/splashscreen -I../../../src/share/native/sun/awt/splashscreen -DPNG_NO_MMX_CODE  -c -o /var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk.build/tmp/sun/sun.awt/splashscreen/obj64/splashscreen_png.o  ../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c
../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c: In function 'my_png_read_stream':
../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c:39:51: error: dereferencing pointer to incomplete type
../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c: In function 'SplashDecodePng':
../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c:74:9: error: dereferencing pointer to incomplete type
../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c:78:12: error: dereferencing pointer to incomplete type
../../../src/share/native/sun/awt/splashscreen/splashscreen_png.c:79:12: error: dereferencing pointer to incomplete type
make[6]: *** [/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk.build/tmp/sun/sun.awt/splashscreen/obj64/splashscreen_png.o] Error 1
make[6]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk/jdk/make/sun/splashscreen'
make[5]: *** [library_parallel_compile] Error 2
make[5]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk/jdk/make/sun/splashscreen'
make[4]: *** [all] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk/jdk/make/sun'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk/jdk/make'
make[2]: *** [jdk-build] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk'
make[1]: *** [build_product_image] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.1.14/work/icedtea-1.14/openjdk'
make: *** [stamps/icedtea.stamp] Error 2
emake failed
Comment 2 Martin von Gagern 2011-09-22 09:37:34 UTC
Created attachment 287385 [details, diff]
Patch ebuild to apply fix

(In reply to comment #1)
> with the patch, I still get this:

How and when did you apply the patch? In the current ebuild, src_compile does both extract the required sources and start compiling them, so there is no easy way to unpack first, then apply the patch, and then continue building. My guess would be that either the patch failed or its result got overwritten again.

It does compile all right for me after I applied the attached patch to a checkout of the overlay. That moved the extraction to the end of src_configure, with a verbose comment giving the reason for this. Fixes bug #382741 as well.

I have write permissions to the java-experimental overlay as user "mvg". I'm not sure if I have write permission for java-overlay, too. If I do, I'd commit the changes if some java dev agrees to me doing so.
Comment 3 R Bar-On 2011-09-23 20:58:52 UTC
works now, with your new ebuild and patch.  Thanks.
Comment 4 Søren Dalby Larsen 2011-09-29 08:08:27 UTC
The patch works for me too.
Comment 5 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-10-08 17:08:20 UTC
This should be fixed in 7.2.0_pre and 7.1.14 is gone, please reopen if not.