Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2013 22:02:51 GMT
From:      Jonathan Chen <jonc@chen.org.nz>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181124: java/eclipse-devel broken after glib-2.36.3 update
Message-ID:  <201308072202.r77M2p19059412@oldred.freebsd.org>
Resent-Message-ID: <201308072210.r77MA0k7080904@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181124
>Category:       ports
>Synopsis:       java/eclipse-devel broken after glib-2.36.3 update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 07 22:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Chen
>Release:        FreeBSD 9.1-STABLE
>Organization:
>Environment:
FreeBSD jonathan.chen 9.1-STABLE FreeBSD 9.1-STABLE #0 r252120: Fri Aug  2 11:06:27 NZST 2013     root@jonathan.chen:/usr/obj/usr/src/sys/TAO  amd64
>Description:
Eclipse-devel builds but fails to run with:

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
        no swt-gtk-4233 in java.library.path
        no swt-gtk in java.library.path

glib-2.36+ has removed some deprecated functions.

>How-To-Repeat:

>Fix:
Please review attached patch.

Patch attached with submission follows:

diff -ruN /usr/ports/java/eclipse-devel/files/freebsd-support.patch ./files/freebsd-support.patch
--- /usr/ports/java/eclipse-devel/files/freebsd-support.patch	2013-03-04 08:41:41.347992087 +1300
+++ ./files/freebsd-support.patch	2013-08-08 09:24:43.561696432 +1200
@@ -2827,6 +2827,40 @@
  # GLX lib
  #
  make_glx: $(GLX_LIB)
+--- build.orig/eclipse-3.5.2-src/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h.orig	2012-06-28 01:39:42.000000000 +1200
++++ build.orig/eclipse-3.5.2-src/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h	2013-08-08 09:17:59.133694911 +1200
+@@ -38,6 +38,11 @@
+ 
+ #define OS_LOAD_FUNCTION LOAD_FUNCTION
+ 
++/*
++	g_thread_init() is non-existent in glib-2.36+
++ */
++#define NO__1g_1thread_1init
++
+ #ifndef GDK_WINDOWING_X11
+ 
+ /* X Structures */
+--- build.orig/eclipse-3.5.2-src/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c.orig	2013-08-08 09:18:14.525694799 +1200
++++ build.orig/eclipse-3.5.2-src/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c	2013-08-08 09:19:42.847695428 +1200
+@@ -4434,11 +4434,17 @@
+ JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1thread_1supported)
+ 	(JNIEnv *env, jclass that)
+ {
++	return 1;
++	/*
++		g_thread_supported is non-existent in glib-2.36+,
++		but is still referenced.
++
+ 	jboolean rc = 0;
+ 	OS_NATIVE_ENTER(env, that, _1g_1thread_1supported_FUNC);
+ 	rc = (jboolean)g_thread_supported();
+ 	OS_NATIVE_EXIT(env, that, _1g_1thread_1supported_FUNC);
+ 	return rc;
++	 */
+ }
+ #endif
+ 
 --- build.orig/eclipse-3.5.2-src/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java	2009-12-23 15:12:33.298742157 -0500
 +++ build/eclipse-3.5.2-src/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java	2009-12-23 15:14:12.577551971 -0500
 @@ -23,18 +23,19 @@


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308072202.r77M2p19059412>