I clean up my patch
here<https://www.jfrog.org/svn-jfrog/openjdk/patch/SplashScreen_libpng12.patch>,
and tested before/after on my
config<http://www.jfrog.org/wiki/index.php/Fred:OpenJDK_Page>only.
Sorry, I missed the part where you stated the name of the macro ;-) I used
ALT_EXT_LIB_PNG.

By the way, I have a feeling that a movement to use more and more library
from the host OS (especially on Linux) is going on. Am I wrong?
Because, with this macro set the j2se image will not run on a system with no
libpng12. That sounds a little strange to me.

Anyway, hope it helps.

On 10/12/07, Anthony Petrov <[EMAIL PROTECTED]> wrote:
>
> This is a known issue. Anyway, thanks for reporting it! Please refer to
> the following bug to track the status of the problem:
>
> http://bugs.sun.com/view_bug.do?bug_id=6613927
>
> Currently the bug is being fixed.
>
> Concerning the possibility of using an external libpng library, we've
> got the following bug report:
>
> http://bugs.sun.com/view_bug.do?bug_id=6565114
>
> However, we're postponing the fix because the submitter of the patch
> haven't prepared a clean patch yet. The main reason to use a slightly
> more comprehensive patch is to be able to use both the internal version
> of the library and the external one (if the developer defines the
> EXTERNAL_LIBPNG macro when building OpenJDK). It would be very helpful
> if someone could provide a clean patch for the latter bug.
>
> --
> best regards,
> Anthony
>
>
> On 10/12/2007 05:14 AM Frederic Simon wrote:
> > I tried to build b21 on my Ubuntu 7.04 and got:
> >
> /work/java.net/openjdk.trunk/control/build/linux-amd64/tmp/sun/sun.awt/splashscreen/obj64/png.o:
> > In function `png_init_mmx_flags':
> > png.c:(.text+0xbc): undefined reference to `png_mmx_support'
> >
> /work/java.net/openjdk.trunk/control/build/linux-amd64/tmp/sun/sun.awt/splashscreen/obj64/pngpread.o:
> > In function `png_push_process_row':
> > pngpread.c:(.text+0x86e): undefined reference to `png_read_filter_row'
> > pngpread.c:(.text+0x934): undefined reference to `png_do_read_interlace'
> >
> /work/java.net/openjdk.trunk/control/build/linux-amd64/tmp/sun/sun.awt/splashscreen/obj64/pngpread.o:
> > In function `png_progressive_combine_row':
> > pngpread.c:(.text+0x141): undefined reference to `png_combine_row'
> >
> /work/java.net/openjdk.trunk/control/build/linux-amd64/tmp/sun/sun.awt/splashscreen/obj64/pngread.o:
> > In function `png_read_row':
> > pngread.c: (.text+0xa7d): undefined reference to `png_combine_row'
> > pngread.c:(.text+0xbd8): undefined reference to `png_combine_row'
> > pngread.c:(.text+0xbfc): undefined reference to `png_combine_row'
> > pngread.c:(.text+0xc98): undefined reference to `png_combine_row'
> >
> /work/java.net/openjdk.trunk/control/build/linux-amd64/tmp/sun/sun.awt/splashscreen/obj64/pngread.o:
> pngread.c:(.text+0xcb4):
> > more undefined references to `png_combine_row' follow
> >
> /work/java.net/openjdk.trunk/control/build/linux-amd64/tmp/sun/sun.awt/splashscreen/obj64/pngread.o:
> > In function `png_read_row':
> > pngread.c:(.text+0xce5): undefined reference to `png_read_filter_row'
> > pngread.c:(.text+0xd0d): undefined reference to `png_do_read_interlace'
> > collect2: ld returned 1 exit status
> > make[3]: ***
> >
> [/work/java.net/openjdk.trunk/control/build/linux-amd64/lib/amd64/libsplashscreen.so]
> > Error 1
> > make[3]: Leaving directory
> > `/work/java.net/openjdk.trunk/j2se/make/sun/splashscreen'
> >
> > I found this thread talking about it:
> >
> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2007-August/000192.html
> >
> > So, I tried to modified the makefile to use the system png. It's very
> > roughly removing the integrated libpng and linking with png12.
> > Here is the patch:
> >
> https://www.jfrog.org/svn-jfrog/openjdk/patch/SplashScreen_libpng12.patch
> >
> > Hope it helps.
> >
> > --
> > http://freddy33.bglogspot.com/
> > http://www.jfrog.org/
> >
>



-- 
http://freddy33.bglogspot.com/
http://www.jfrog.org/
Index: j2se/make/sun/splashscreen/FILES_c.gmk
===================================================================
--- j2se/make/sun/splashscreen/FILES_c.gmk	(revision 256)
+++ j2se/make/sun/splashscreen/FILES_c.gmk	(working copy)
@@ -31,21 +31,6 @@
 	splashscreen_jpeg.c \
 	splashscreen_png.c \
 	splashscreen_sys.c \
-	png.c \
-	pngerror.c \
-	pngget.c \
-	pngmem.c  \
-	pngpread.c \
-	pngread.c \
-	pngrio.c \
-	pngrtran.c \
-	pngrutil.c \
-	pngset.c \
-	pngtrans.c \
-	pngwio.c \
-	pngwrite.c \
-	pngwtran.c \
-	pngwutil.c \
 	dgif_lib.c \
 	gif_err.c \
 	gifalloc.c \
@@ -108,3 +93,20 @@
 	jfdctfst.c \
 	jfdctint.c
 
+FILES_png_c = \
+        png.c \
+        pngerror.c \
+        pngget.c \
+        pngmem.c  \
+        pngpread.c \
+        pngread.c \
+        pngrio.c \
+        pngrtran.c \
+        pngrutil.c \
+        pngset.c \
+        pngtrans.c \
+        pngwio.c \
+        pngwrite.c \
+        pngwtran.c \
+        pngwutil.c \
+
Index: j2se/make/sun/splashscreen/Makefile
===================================================================
--- j2se/make/sun/splashscreen/Makefile	(revision 256)
+++ j2se/make/sun/splashscreen/Makefile	(working copy)
@@ -40,6 +40,12 @@
 FILES_export = \
     java/awt/SplashScreen.java
 
+#
+# compile png C files if ALT_EXT_PNG_LIB is not set
+# 
+ifndef ALT_EXT_PNG_LIB
+FILES_c += $(FILES_png_c)
+endif # ALT_EXT_PNG_LIB not set
 
 #
 # Rules
@@ -65,6 +71,9 @@
   CFLAGS += -DWITH_X11
   CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
   OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
+ifdef ALT_EXT_PNG_LIB
+  OTHER_LDLIBS += -lpng12
+endif # ALT_EXT_PNG_LIB set
 else # PLATFORM
   CFLAGS += -DWITH_WIN32
   OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib 
@@ -78,7 +87,9 @@
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/giflib
 vpath %.c   $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+ifndef ALT_EXT_PNG_LIB
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/libpng
+endif # ALT_EXT_PNG_LIB not set
 vpath %.c   $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
 vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen
 

Reply via email to