From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Apr 13 19:50:01 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF31D16A404 for ; Fri, 13 Apr 2007 19:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id AEDE013C46A for ; Fri, 13 Apr 2007 19:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3DJo16o013462 for ; Fri, 13 Apr 2007 19:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3DJo1ui013461; Fri, 13 Apr 2007 19:50:01 GMT (envelope-from gnats) Resent-Date: Fri, 13 Apr 2007 19:50:01 GMT Resent-Message-Id: <200704131950.l3DJo1ui013461@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jonas Wolz Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28E1116A400 for ; Fri, 13 Apr 2007 19:49:02 +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 17F3613C457 for ; Fri, 13 Apr 2007 19:49:02 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l3DJn1q0006028 for ; Fri, 13 Apr 2007 19:49:01 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l3DJi0jI005267; Fri, 13 Apr 2007 19:44:00 GMT (envelope-from nobody) Message-Id: <200704131944.l3DJi0jI005267@www.freebsd.org> Date: Fri, 13 Apr 2007 19:44:00 GMT From: Jonas Wolz To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/111544: WITH_JAVA_AWT=yes does not work with lang/gcc41 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2007 19:50:01 -0000 >Number: 111544 >Category: ports >Synopsis: WITH_JAVA_AWT=yes does not work with lang/gcc41 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 13 19:50:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Jonas Wolz >Release: 6.2-RELEASE >Organization: >Environment: FreeBSD nobby 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Sun Jan 21 18:11:14 CET 2007 jonas@nobby:/usr/obj/usr/src/sys/JW_NOBBY i386 >Description: When building devel/gcc41-withgcjawt or devel/gcc41 with WITH_JAVA_AWT defined the AWT library seems not to be built. This results in the error "java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit" when you try to run a java application. >How-To-Repeat: Copy the following source code into the file "Hello2.java", compile it with "gcj41 Hello2.java --main=Hello2" and execute ./a.out //// begin Hello2.java //// import javax.swing.*; public class Hello2 extends JFrame { public static void main(String[] args) { Hello2 h = new Hello2(); h.setVisible(true); } public Hello2() { super("Hello World"); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); pack(); } } //// end Hello2.java //// >Fix: Apply the attached patch to the port's Makefile. I don't know if it is the cleanest or best solution because I have no experience with creating ports but it works for me. Patch attached with submission follows: *** Makefile.old Tue Apr 10 07:24:27 2007 --- Makefile Fri Apr 13 18:58:37 2007 *************** *** 40,43 **** --- 40,51 ---- NOMANCOMPRESS= yes # too hard to deal with differences on 5-cur and releng4 + + .if defined(WITH_JAVA_AWT) + LIB_DEPENDS+= cairo.2:${PORTSDIR}/graphics/cairo + USE_GNOME= gtk20 libartlgpl2 + CONFIGURE_ARGS+= --enable-java-awt=gtk,xlib \ + --enable-gtk-cairo + .endif + .include *************** *** 113,122 **** PLIST_SUB+= JAVA="@comment " - .if defined(WITH_JAVA_AWT) - LIB_DEPENDS+= cairo.2:${PORTSDIR}/graphics/cairo - USE_GNOME= gtk20 libartlgpl2 - CONFIGURE_ARGS+= --enable-java-awt=gtk,xlib \ - --enable-gtk-cairo - .endif .endif --- 121,124 ---- >Release-Note: >Audit-Trail: >Unformatted: