Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 424151 - dev-java/swt-3.7.2 Program.launch fails when opening by URI
Summary: dev-java/swt-3.7.2 Program.launch fails when opening by URI
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 432146
  Show dependency tree
 
Reported: 2012-06-29 18:22 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2013-08-24 21:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
vuze backtrace (vuze-backtrace,3.01 KB, text/plain)
2013-01-24 05:09 UTC, Ryan Hill (RETIRED)
Details
swt-3.7.2-gio_launch.broken.patch (swt-3.7.2-gio_launch.patch.broken,3.47 KB, patch)
2013-01-25 06:06 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2012-06-29 18:22:16 UTC
vuze 
<snip>
java.lang.reflect.InvocationTargetException
<snip>
Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
        no swt-gnome-gtk-3740 in java.library.path
        no swt-gnome-gtk in java.library.path
        Can't load library: /home/kent/.swt/lib/linux/x86_64/libswt-gnome-gtk-3740.so
        Can't load library: /home/kent/.swt/lib/linux/x86_64/libswt-gnome-gtk.so
<snip>
<vuze fails to load>


So, I install swt with USE="gnome"

>>> /usr/lib64/libswt-gnome-gtk-3740.so

And then try again: 

And it works \o/

Portage 2.2.0_alpha114 (default/linux/amd64/10.0, gcc-4.7.1, glibc-2.15-r2, 3.4.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.4.4-gentoo-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.1
Timestamp of tree: Thu, 28 Jun 2012 00:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.22-r1, 2.22.52.0.3
sys-devel/gcc:            4.5.3-r2, 4.6.3, 4.7.1
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS=" -j3 "
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl amd64 berkdb bzip2 cli cracklib crypt cxx dbus dri fortran gdbm gpm iconv ipv6 jpeg jpeg2k mmx modules mudflap multilib ncurses nls nptl opengl openmp pam pcre png pppd qt4 readline session sse sse2 ssl tcpd tiff unicode vim-syntax xinerama xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


=================================================================
                        Package Settings
=================================================================

net-p2p/vuze-4.7.0.2 was built with the following:
USE="(multilib) -source"


dev-java/swt-3.7.2 was built with the following:
USE="cairo gnome (multilib) opengl webkit"
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2012-07-02 18:27:45 UTC
I've never built swt with USE=gnome and it works fine for me.
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2012-07-03 02:20:27 UTC
(In reply to comment #1)
> I've never built swt with USE=gnome and it works fine for me.

If it helps, I'm using icedtea-7 for my jvm, which may play part of the equation.

I'm not actually sure why I get the error telling me I need gnome-gtk, its no longer loaded at runtime:

sudo lsof -p 17265 | grep -i swt
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/kent/.gvfs
      Output information may be incomplete.
java    17265 kent  mem    REG                8,6     39440   8416760 /usr/lib64/libswt-webkit-gtk-3740.so
java    17265 kent  mem    REG                8,6     51576   8416754 /usr/lib64/libswt-atk-gtk-3740.so
java    17265 kent  mem    REG                8,6     60344   8416756 /usr/lib64/libswt-cairo-gtk-3740.so
java    17265 kent  mem    REG                8,6    522200   8416759 /usr/lib64/libswt-pi-gtk-3740.so
java    17265 kent  mem    REG                8,6    561000   8416758 /usr/lib64/libswt-gtk-3740.so
java    17265 kent  mem    REG                8,6   1331931   8416751 /usr/share/swt-3.7/lib/swt.jar
java    17265 kent    5r   REG                8,6   1331931   8416751 /usr/share/swt-3.7/lib/swt.jar

sudo lsof -p 17265 | grep -i gnome
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/kent/.gvfs
      Output information may be incomplete.
java    17265 kent  mem    REG                8,6     18736  10532858 /usr/lib64/gio/modules/libgiognomeproxy.so
java    17265 kent  mem    REG                8,6  60481204   1060654 /usr/share/icons/gnome/icon-theme.cache


^ might be related, but *shrug*
Comment 3 Dustin C. Hatch 2012-10-18 03:49:34 UTC
I just encountered this same problem. Launching vuze resulted in the same error/traceback as listed in the description. Rebuilding dev-java/swt:3.7 with USE=gnome (and thus pulling in a crapton of dependencies) corrected the problem.

I use dev-java/icedtea-bin:6 as my JVM
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2013-01-24 05:08:34 UTC
I couldn't reproduce this before but now I'm hitting it on a new system.  I'm using sun-jdk-1.6.0.38 and swt-3.7.2.

Looking at the swt code (org/eclipse/swt/program/Program.java) it looks like it's supposed to try using libgio first and only use the gnome-vfs-based library when that isn't available:

 100     if (desktop == DESKTOP_UNKNOWN) {
 101         byte[] gnomeName = Converter.wcsToMbcs(null, "_NET_SUPPORTING_WM_CHECK", true);
 102         long /*int*/ gnome = OS.XInternAtom(xDisplay, gnomeName, true);
 103         if (gnome != OS.None) {
 104             /* Check for the existence of libgio libraries first */
 105             byte[] buffer;
 106             int flags = OS.RTLD_LAZY;
 107             if (OS.IsAIX) {
 108                 buffer = Converter.wcsToMbcs(null, "libgio-2.0.a(libgio-2.0.so.0)", true);
 109                 flags |= OS.RTLD_MEMBER;
 110             } else  if (OS.IsHPUX) {
 111                 buffer = Converter.wcsToMbcs(null, "libgio-2.0.so", true);
 112             } else {
 113                 buffer =  Converter.wcsToMbcs(null, "libgio-2.0.so.0", true);
 114             }
 115             long /*int*/ libgio = OS.dlopen(buffer, flags);
 116             if (libgio != 0) {
 117                 buffer = Converter.wcsToMbcs(null, "g_app_info_launch_default_for_uri", true);
 118                 long /*int*/ g_app_info_launch_default_for_uri = OS.dlsym(libgio, buffer);
 119                 if (g_app_info_launch_default_for_uri != 0) {
 120                     desktop = DESKTOP_GIO;
 121                 }
 122                 OS.dlclose(libgio);
 123             }

If I'm reading that right it should be setting desktop = DESKTOP_GIO, which should make it call gio_launch later on:

1082     switch (getDesktop (display)) {
1083         case DESKTOP_GIO:
1084             if (gio_launch (fileName)) return true;
1085         case DESKTOP_GNOME_24:
1086             if (gnome_24_launch (fileName)) return true;
1087

But you can see it's calling gnome_24_launch instead:

	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.gnome.GNOME.<clinit>(Unknown Source)
	at org.eclipse.swt.program.Program.gnome_24_launch(Unknown Source)
	at org.eclipse.swt.program.Program.launch(Unknown Source)
	at org.eclipse.swt.program.Program.launch(Unknown Source)
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2013-01-24 05:09:17 UTC
Created attachment 336696 [details]
vuze backtrace
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2013-01-24 05:33:33 UTC
Even crazier, DESKTOP_GNOME_24 is only set if libgnomevfs-2.so.0 is available and I don't have gnome-vfs installed.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2013-01-25 06:06:08 UTC
Created attachment 336814 [details, diff]
swt-3.7.2-gio_launch.broken.patch

The problem is that gio_launch uses g_file_new_for_path which doesn't handle URIs.  Vuze is calling Program.launch("http://....).  It switches to gnome as a fallback when that fails.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=362246

I backported a patch which seems to work, except now I'm get an UnsatisfiedLinkError at runtime so I must have missed something.  Java guys, could you take a look?
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2013-01-25 06:09:58 UTC
Here's the backtrace with the patch:

Caused by: java.lang.UnsatisfiedLinkError: org.eclipse.swt.internal.gtk.OS._g_file_new_for_commandline_arg([B)I
	at org.eclipse.swt.internal.gtk.OS._g_file_new_for_commandline_arg(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_file_new_for_commandline_arg(Unknown Source)
	at org.eclipse.swt.program.Program.gio_launch(Unknown Source)
	at org.eclipse.swt.program.Program.launch(Unknown Source)
	at org.eclipse.swt.program.Program.launch(Unknown Source)
	at org.gudy.azureus2.ui.swt.Utils.launch(Utils.java:967)
Comment 9 Denis M. (Phr33d0m) 2013-02-12 02:11:06 UTC
I'd want to comment here that the purposed patch in comment 7 here fixes this bug for me. Vuze starts without problems.
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2013-02-12 02:31:51 UTC
It actually works?!

Uh, I mean, of course it does...

Not for me though. :/
Comment 11 Denis M. (Phr33d0m) 2013-02-12 02:39:04 UTC
(In reply to comment #10)
> It actually works?!
Yup. I should have given some environment info in my previous comment, so here's how I have it:

JAVA:
Works with both icedtea-7 (7.2.3.4) and sun-jdk-6 (1.6.0.39-r1).

SWT:
[ebuild   R    ] dev-java/swt-3.7.2-r1:3.7::x-portage  USE="cairo opengl -gnome -webkit" 0 kB
-r1 because of the applied patch:
-       epatch "${FILESDIR}"/as-needed-and-flag-fixes-3.6.patch
+       epatch "${FILESDIR}"/as-needed-and-flag-fixes-3.6.patch \
+               "${FILESDIR}"/swt-3.7.2-gio_launch.broken.patch

VUZE:
[ebuild   R    ] net-p2p/vuze-4.7.1.2  USE="-source" 0 kB

Start/stop vuze:
$ ▶ vuze
using /home/n0ks/.azureus/gentoo.config
$UI not set defaulting to swt
file:/usr/share/vuze/lib/Azureus2.jar ; file:/usr/share/bcprov-1.3/lib/bcprov.jar ; file:/usr/share/commons-cli-1/lib/commons-cli.jar ; file:/usr/share/json-simple/lib/json-simple.jar ; file:/usr/share/log4j/lib/log4j.jar ; file:/usr/share/swt-3.7/lib/swt.jar ; file:/home/n0ks/
changeLocale: *Default Language* != English (United States). Searching without country..
changeLocale: Searching for language English in *any* country..
changeLocale: no message properties for Locale 'English (United States)' (en_US), using 'English (default)'
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
UIFunctions/ImageLoad took 0ms
new shell took 75ms
new shell setup took 0ms
skin init took 51ms
MainMenu init took 25ms
pre skin widgets init took 25ms
WARNING: already added UIUpdatable com.aelitis.azureus.ui.swt.views.skin.sidebar.SideBar@56acdd02
skin widgets (1/2) init took 50ms
skin widgets (2/2) init took 25ms
pre SWTInstance init took 0ms
Init Core Columns took 25ms
SWTInstance init took 0ms
shell.layout took 25ms
---------SHOWN AT 1360636625931;785ms
---------DONE DISPATCH AT 1360636626307;1161ms
---------READY AT 1360636626357;1211ms
shell.open took 426ms
processStartupDMS took 0ms
postPluginSetup init took 0ms
Locale Initializing took 25ms
04868:    Core: 25ms for activity between 'Loading Plugin: aefeatman_v' and 'Loading Torrents'
04881:    Core: 25ms for activity between 'Loading Plugin: azupdater' and 'Loading Plugin: azupnpav'
04906:    Core: 26ms for activity between 'Loading Plugin: azplugins' and 'Loading Plugin: azrating'
04935:    Core: 25ms for activity between 'Loading Plugin: UPnP' and 'Loading Plugin: DHT'
04957:    Core: 25ms for activity between 'Loading Plugin: Network Status' and 'Loading Plugin: Buddy'
05009:    Core: 50ms for activity between 'Loading Plugin: RSS' and 'Initializing Plugin: Vuze Feature Manager'
05009:    Core: 50ms for activity between 'Loading Plugin: RSS' and 'Initializing Plugin: Azureus Update Support'
05032:    Core: 25ms for activity between 'Initializing Plugin: Tracker Static Pages' and 'Initializing Plugin: Rating'
Core Initializing took 226ms
psDMS 0ms
core.stop
31171:    Core: 26143ms for activity between 'Initializing Plugin: Local RSS etc.' and 'Unloading Torrents'
core.stop done in 2684
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2013-02-12 03:31:29 UTC
I must've had something screwed up in my environment then because it's working fine for me too now.

Thanks for testing.
Comment 13 Ryan Hill (RETIRED) gentoo-dev 2013-08-21 06:02:22 UTC
+*swt-3.7.2-r1 (21 Aug 2013)
+
+  21 Aug 2013; Ryan Hill <dirtyepic@gentoo.org> +swt-3.7.2-r1.ebuild,
+  +files/swt-3.7.2-gio_launch-URI.patch:
+  Add patch for bug #424151 (gio_launch fails when opening by URI, causing
+  unnecessary dependencies on gnome libs).
Comment 14 Guillaume Horel 2013-08-24 16:48:17 UTC
Patch doesn't apply on on x86 and ebuild fails.


***** swt-3.7.2-gio_launch-URI.patch *****
PWD: /var/tmp/portage/dev-java/swt-3.7.2-r1/work

==========================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < '/usr/portage/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch'

==========================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Program.launch will first attempt to open files using libgio and then fallback
|to gnome-vfs.  gio_launch uses g_file_new_for_path which fails when passed a
|URI.  If swt was built with USE="-gnome" then the fallback fails as well,
|making it appear that a package has a dependency on swt[gnome] when it does
|not.
|
|Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
|        no swt-gnome-gtk-3740 in java.library.path
|        no swt-gnome-gtk in java.library.path
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk-3740.so
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk.so
|
|Use g_file_new_for_commandline_arg instead.
|
|https://bugs.gentoo.org/424151
|
|
|--- a/os.c
|+++ b/os.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 53
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_custom.h
|+++ b/os_custom.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 63
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.c
|+++ b/os_stats.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 84
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.h
|+++ b/os_stats.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 94
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/internal/gtk/OS.java
|+++ b/src/org/eclipse/swt/internal/gtk/OS.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/program/Program.java
|+++ b/src/org/eclipse/swt/program/Program.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
==========================================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  < '/usr/portage/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch'

==========================================
checking file os.c
checking file os_custom.h
checking file os_stats.c
checking file os_stats.h
checking file src/org/eclipse/swt/internal/gtk/OS.java
Hunk #1 FAILED at 2113.
1 out of 1 hunk FAILED
checking file src/org/eclipse/swt/program/Program.java
Hunk #1 FAILED at 954.
1 out of 1 hunk FAILED

patch program exited with status 1
==========================================

PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch  < '/usr/portage/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch'

==========================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Program.launch will first attempt to open files using libgio and then fallback
|to gnome-vfs.  gio_launch uses g_file_new_for_path which fails when passed a
|URI.  If swt was built with USE="-gnome" then the fallback fails as well,
|making it appear that a package has a dependency on swt[gnome] when it does
|not.
|
|Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
|        no swt-gnome-gtk-3740 in java.library.path
|        no swt-gnome-gtk in java.library.path
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk-3740.so
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk.so
|
|Use g_file_new_for_commandline_arg instead.
|
|https://bugs.gentoo.org/424151
|
|
|--- a/os.c
|+++ b/os.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 53
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_custom.h
|+++ b/os_custom.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 63
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.c
|+++ b/os_stats.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 84
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.h
|+++ b/os_stats.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 94
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/internal/gtk/OS.java
|+++ b/src/org/eclipse/swt/internal/gtk/OS.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/program/Program.java
|+++ b/src/org/eclipse/swt/program/Program.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
==========================================

PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch  < '/usr/portage/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch'

==========================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Program.launch will first attempt to open files using libgio and then fallback
|to gnome-vfs.  gio_launch uses g_file_new_for_path which fails when passed a
|URI.  If swt was built with USE="-gnome" then the fallback fails as well,
|making it appear that a package has a dependency on swt[gnome] when it does
|not.
|
|Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
|        no swt-gnome-gtk-3740 in java.library.path
|        no swt-gnome-gtk in java.library.path
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk-3740.so
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk.so
|
|Use g_file_new_for_commandline_arg instead.
|
|https://bugs.gentoo.org/424151
|
|
|--- a/os.c
|+++ b/os.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 53
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_custom.h
|+++ b/os_custom.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 63
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.c
|+++ b/os_stats.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 84
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.h
|+++ b/os_stats.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 94
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/internal/gtk/OS.java
|+++ b/src/org/eclipse/swt/internal/gtk/OS.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/program/Program.java
|+++ b/src/org/eclipse/swt/program/Program.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
==========================================

PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch  < '/usr/portage/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch'

==========================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Program.launch will first attempt to open files using libgio and then fallback
|to gnome-vfs.  gio_launch uses g_file_new_for_path which fails when passed a
|URI.  If swt was built with USE="-gnome" then the fallback fails as well,
|making it appear that a package has a dependency on swt[gnome] when it does
|not.
|
|Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
|        no swt-gnome-gtk-3740 in java.library.path
|        no swt-gnome-gtk in java.library.path
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk-3740.so
|        Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk.so
|
|Use g_file_new_for_commandline_arg instead.
|
|https://bugs.gentoo.org/424151
|
|
|--- a/os.c
|+++ b/os.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 53
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_custom.h
|+++ b/os_custom.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 63
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.c
|+++ b/os_stats.c
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 84
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/os_stats.h
|+++ b/os_stats.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 94
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/internal/gtk/OS.java
|+++ b/src/org/eclipse/swt/internal/gtk/OS.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 113
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/src/org/eclipse/swt/program/Program.java
|+++ b/src/org/eclipse/swt/program/Program.java
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
Comment 15 Andrew Savchenko gentoo-dev 2013-08-24 21:30:58 UTC
(In reply to Guillaume Horel from comment #14)
> Patch doesn't apply on on x86 and ebuild fails.

Same problem here, see bug 482362 for a fix.
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2013-08-24 21:53:27 UTC
Right, because the best way to handle differing type sizes is separate arch-specific distfiles.  Jesus.

Fixed.