From nobody@FreeBSD.org  Sun May  2 15:43:09 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 41BFF106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 May 2010 15:43:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 317B18FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 May 2010 15:43:09 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o42Fh8sM022852
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 2 May 2010 15:43:08 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o42Fh8dY022851;
	Sun, 2 May 2010 15:43:08 GMT
	(envelope-from nobody)
Message-Id: <201005021543.o42Fh8dY022851@www.freebsd.org>
Date: Sun, 2 May 2010 15:43:08 GMT
From: Barbara <barbara.xxx1975@libero.it>
To: freebsd-gnats-submit@FreeBSD.org
Subject: java/openjdk6: build broken after upgrade to xorg-7.5
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: openjdk@getsnappy.com

>Number:         146240
>Category:       ports
>Synopsis:       java/openjdk6: build broken after upgrade to xorg-7.5
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 02 15:50:07 UTC 2010
>Closed-Date:    Sun May 02 23:32:57 UTC 2010
>Last-Modified:  Sun May 02 23:32:57 UTC 2010
>Originator:     Barbara
>Release:        RELENG_8_0
>Organization:
>Environment:
FreeBSD l0v3.local.net 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Sun Jan 10 00:05:04 CET 2010     root@l0v3.local.net:/usr/obj/usr/src/sys/L0V3  i386

>Description:
While rebuilding java/openjdk6 after upgrading to xorg-7.5, I got the following error:

/usr/bin/gcc  -O2    -fno-strict-aliasing -fPIC -W -Wall  -Wno-unused -Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN   -Di586 -DARCH='"i586"' -D_ALLBSD_SOURCE -DRELEASE='"1.6.0"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -I. -I/usr/ports/java/openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/CClassHeaders -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export -I../../../src/share/javavm/include -I../../../src/solaris/javavm/include -I../../../src/share/native/common -I../../../src/solaris/native/common -I../../../src/share/native/sun/awt/X11 -I../../../src/solaris/native/sun/awt/X11   -DXAWT -DXAWT_HACK -I/usr/ports/java/openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/../../sun.awt/awt/CClassHeaders -I../../../src/solaris/native/sun/awt -I../../../src/solaris/native/sun/xawt -I../../../src/solaris/native/sun/jdga -I../../../src/share/native/sun/awt/debug -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/
 sun/java2d -I../../../src/share/native/sun/java2d/loops -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/font -I../../../src/solaris/native/sun/java2d -I../../../src/share/native/sun/java2d/pipe -I../../../src/share/native/sun/java2d/opengl -I../../../src/solaris/native/sun/java2d/opengl -I../../../src/solaris/native/sun/java2d/x11 -I../../../src/share/native/sun/dc/path -I../../../src/share/native/sun/dc/doe -I../../../src/share/native/sun/awt/alphacomposite -I../../../src/share/native/sun/awt/medialib -I../../../src/solaris/native/sun/awt/medialib -I../../../src/solaris/native/sun/font -I../../../src/share/native/sun/awt -I../../../src/solaris/native/sun/awt  -I/usr/local/include -I/usr/local/include/X11/extensions -I/usr/local/include -DX11_PATH=\"/usr/local\" -DPACKAGE_PATH=\"/usr/local\"  -c -o /usr/ports/java/openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/obj/awt_InputMethod.o  ../../../s
 rc/solaris/native/sun/awt/awt_InputMethod.c
./../../src/solaris/native/sun/awt/awt_InputMethod.c:50:1: warning: "XtWindow" redefined
In file included from ../../../src/solaris/native/sun/awt/awt_p.h:45,
                 from ../../../src/solaris/native/sun/awt/awt_InputMethod.c:43:
/usr/local/include/X11/IntrinsicP.h:207:1: warning: this is the location of the previous definition
./../../src/solaris/native/sun/awt/awt_InputMethod.c: In function 'createStatusWindow':
./../../src/solaris/native/sun/awt/awt_InputMethod.c:687: warning: pointer targets in passing argument 6 of 'XGetGeometry' differ in signedness
./../../src/solaris/native/sun/awt/awt_InputMethod.c:687: warning: pointer targets in passing argument 7 of 'XGetGeometry' differ in signedness
./../../src/solaris/native/sun/awt/awt_InputMethod.c:687: warning: pointer targets in passing argument 8 of 'XGetGeometry' differ in signedness
./../../src/solaris/native/sun/awt/awt_InputMethod.c:687: warning: pointer targets in passing argument 9 of 'XGetGeometry' differ in signedness
./../../src/solaris/native/sun/awt/awt_InputMethod.c: In function 'createXIC':
./../../src/solaris/native/sun/awt/awt_InputMethod.c:1036: warning: comparison between pointer and integer
./../../src/solaris/native/sun/awt/awt_InputMethod.c:1216: warning: assignment from incompatible pointer type
./../../src/solaris/native/sun/awt/awt_InputMethod.c: In function 'Java_sun_awt_X11_XInputMethod_openXIMNative':
./../../src/solaris/native/sun/awt/awt_InputMethod.c:1517: warning: cast to pointer from integer of different size
./../../src/solaris/native/sun/awt/awt_InputMethod.c:1527: warning: passing argument 5 of 'XRegisterIMInstantiateCallback' from incompatible pointer type
./../../src/solaris/native/sun/awt/awt_InputMethod.c: In function 'Java_sun_awt_X11_XInputMethod_createXICNative':
./../../src/solaris/native/sun/awt/awt_InputMethod.c:1562: warning: comparison between pointer and integer
./../../src/solaris/native/sun/awt/awt_InputMethod.c: In function 'Java_sun_awt_X11_XInputMethod_setXICFocusNative':
./../../src/solaris/native/sun/awt/awt_InputMethod.c:1712: warning: comparison between pointer and integer
./../../src/solaris/native/sun/awt/awt_GraphicsEnv.c: In function 'makeDefaultConfig':
./../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:291: warning: format '%x' expects type 'unsigned int *', but argument 3 has type 'VisualID *'
./../../src/solaris/native/sun/awt/awt_GraphicsEnv.c: In function 'J2DXErrHandler':
./../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:966: error: 'X_ShmAttach' undeclared (first use in this function)
./../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:966: error: (Each undeclared identifier is reported only once
./../../src/solaris/native/sun/awt/awt_GraphicsEnv.c:966: error: for each function it appears in.)
gmake[4]: *** [/usr/ports/java/openjdk6/work/build/bsd-i586/tmp/sun/sun.awt.X11/xawt/obj/awt_GraphicsEnv.o] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory `/usr/ports/java/openjdk6/work/jdk/make/sun/xawt'
gmake[3]: *** [library_parallel_compile] Error 2
gmake[3]: Leaving directory `/usr/ports/java/openjdk6/work/jdk/make/sun/xawt'
gmake[2]: *** [all] Error 1
gmake[2]: Leaving directory `/usr/ports/java/openjdk6/work/jdk/make/sun'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/usr/ports/java/openjdk6/work/jdk/make'
gmake: *** [jdk-build] Error 2
*** Error code 1

Stop in /usr/ports/java/openjdk6.
*** Error code 1

Stop in /usr/ports/java/openjdk6.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20100502-25699-7htc53-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=openjdk6-b17_2 UPGRADE_PORT_VER=b17_2 make WITH_POLICY=1 DEPENDS_TARGET=package
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! java/openjdk6 (openjdk6-b17_2)	(compiler error)


>How-To-Repeat:
Upgrade to xorg-7.5
Rebuild java/openjdk6

>Fix:
I was able to build it after applying the attached patch, hoping that it's correct. Please, have a look at it.

Patch attached with submission follows:

--- files/patch-set.orig	2010-01-21 09:51:59.000000000 +0100
+++ files/patch-set	2010-05-02 17:02:22.000000000 +0200
@@ -15829,6 +15829,15 @@
  }
  #endif /* HEADLESS */
  
+@@ -958,7 +963,7 @@
+ 
+ int J2DXErrHandler(Display *display, XErrorEvent *xerr) {
+     int ret = 0;
+-    if (xerr->minor_code == X_ShmAttach) {
++    if (xerr->minor_code == XShmAttach) {
+         xshmAttachFailed = JNI_TRUE;
+     } else {
+         ret = (*xerror_saved_handler)(display, xerr);
 @@ -1600,7 +1605,7 @@
  {
      jobject point = NULL;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun May 2 15:50:30 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146240 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: openjdk@getsnappy.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/146240: java/openjdk6: build broken after upgrade to xorg-7.5
Date: Sun, 2 May 2010 15:50:15 UT

 Maintainer of java/openjdk6,
 
 Please note that PR ports/146240 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/146240
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->closed 
State-Changed-By: fluffy 
State-Changed-When: Sun May 2 23:32:55 UTC 2010 
State-Changed-Why:  
Fixed by PR/145757 (backport of official openjdk6 patch) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146240 
>Unformatted:
