Bug 181124 - java/eclipse-devel broken after glib-2.36.3 update
java/eclipse-devel broken after glib-2.36.3 update
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: freebsd-eclipse
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-07 23:10 UTC by Jonathan Chen
Modified: 2013-08-15 19:09 UTC (History)
0 users

See Also:


Attachments
file.diff (1.77 KB, patch)
2013-08-07 23:10 UTC, Jonathan Chen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Chen 2013-08-07 23:10:00 UTC
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.

Fix: Please review attached patch.

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2013-08-07 23:10:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-eclipse

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 gnn 2013-08-13 03:01:08 UTC
I have tested the patch on HEAD and it indeed fixes the problem with =
eclipse-devel.

I can commit the patch, but I do not know how it will effect other =
systems, i.e. 9.0 or 8.x
sets.  Comments anyone?

Best,
George
Comment 3 kron24 2013-08-13 17:22:46 UTC
On 2013/08/13 04:01, George Neville-Neil wrote:
> I have tested the patch on HEAD and it indeed fixes the problem with
> eclipse-devel.
> 
> I can commit the patch, but I do not know how it will effect other
> systems, i.e. 9.0 or 8.x sets.  Comments anyone?
> 
> Best, George

Hi George,

I've just tested the patch in a fresh virtual machine
with FreeBSD 9.1 amd64. Working as expected.

If you want I can test 8.4 but I'm pretty sure it would
be the same...

BR
Oli
Comment 4 dfilter freebsd_committer 2013-08-14 15:52:35 UTC
Author: gnn (src,doc committer)
Date: Wed Aug 14 14:52:22 2013
New Revision: 324728
URL: http://svnweb.freebsd.org/changeset/ports/324728

Log:
  Fix for broken eclipse-devel after glib-2.36.3 update.
  Tested on HEAD, 9.1 and 8.4.
  
  PR: ports/181124
  Submitted by: Jonathan Chen jonc at chen.org.nz

Modified:
  head/java/eclipse-devel/files/freebsd-support.patch

Modified: head/java/eclipse-devel/files/freebsd-support.patch
==============================================================================
--- head/java/eclipse-devel/files/freebsd-support.patch	Wed Aug 14 14:40:17 2013	(r324727)
+++ head/java/eclipse-devel/files/freebsd-support.patch	Wed Aug 14 14:52:22 2013	(r324728)
@@ -2827,6 +2827,40 @@ $FreeBSD$
  # 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 @@
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Jonathan Chen 2013-08-15 10:20:19 UTC
On 13 August 2013 14:01, George Neville-Neil <gnn@neville-neil.com> wrote:
> I have tested the patch on HEAD and it indeed fixes the problem with eclipse-devel.
>
> I can commit the patch, but I do not know how it will effect other systems, i.e. 9.0 or 8.x
> sets.  Comments anyone?

Thanks for the commit. Can you please close the PR as well?

Cheers.
-- 
Jonathan Chen <jonc@chen.org.nz>
Comment 6 George V. Neville-Neil freebsd_committer 2013-08-15 19:09:05 UTC
State Changed
From-To: open->closed

Patch has been tested and committed.