Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320407 - dev-util/android-sdk-update-manager breaks with internal swt
Summary: dev-util/android-sdk-update-manager breaks with internal swt
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Richard Freeman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: bundled-libs
  Show dependency tree
 
Reported: 2010-05-18 14:24 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-06-10 22:34 UTC (History)
4 users (show)

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


Attachments
Use system swt for ddms too (android-sdk-update-manager-6-swt.patch,1.24 KB, patch)
2010-08-26 21:28 UTC, Frédéric Barthelery
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-05-18 14:24:31 UTC
flame@yamato tree % /opt/android-sdk-update-manager/tools/android
Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-gtk-3550 or swt-gtk in swt.library.path, java.library.path or the jar file
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
	at com.android.sdkuilib.internal.repository.UpdaterWindowImpl.open(UpdaterWindowImpl.java:93)
	at com.android.sdkuilib.repository.UpdaterWindow.open(UpdaterWindow.java:110)
	at com.android.sdkmanager.Main.showMainWindow(Main.java:281)
	at com.android.sdkmanager.Main.doAction(Main.java:247)
	at com.android.sdkmanager.Main.run(Main.java:92)
	at com.android.sdkmanager.Main.main(Main.java:81)

Not sure what is causing this but having the internal copies dropped might actually help, you know…
Comment 1 Richard Freeman gentoo-dev 2010-05-26 01:58:15 UTC
Yup, deleting the internal swt and adding a line to the android script (after all the logic that sets this internally) fixes this:

swtpath="/usr/share/swt-3.5/lib/"

Swt isn't the only thing that is bundled here so there is probably further room for improvement.

Unless we want to depend on only a single version of swt we'll need some logic to set this to the correct path at the time of install.  We'll also need to figure out the paths to all the other dependencies and patch those in as well.

Unless somebody already following this bug knows the RightWay(TM) to do this in Gentoo I might try pinging somebody on the java team.  I really only know enough Java to be dangerous, and I know almost nothing about how the packages are managed/etc.

Flameeyes - can you at least confirm that patching your android script fixes your swt issues?  That will confirm if the problem is indeed the redundant swt libs or if it is something else.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-05-26 09:54:29 UTC
Yup, changing the path used for swt loading (actually, for a single run I didn't even have to edit the file, just used ANDROID_SWT=/usr/share/swt-3.5/lib/ /opt/android-sdk-update-manager/tools/android and it worked) get the UI to start up properly.

As for the version; the easiest way to deal with this is likely let it go through java-config: java-config -p swt-3.5… the 3.5 here is not the version, but the slot, and should likely be hardcoded given it changes if the API/ABI changes.
Comment 3 Richard Freeman gentoo-dev 2010-08-17 00:38:38 UTC
sorry about the lag - fixed in -r1.

Diego - feedback regarding the ebuild is welcome as always...
Comment 4 Frédéric Barthelery 2010-08-26 21:28:30 UTC
Created attachment 244789 [details, diff]
Use system swt for ddms too
Comment 5 Frédéric Barthelery 2010-08-26 21:29:33 UTC
The actual patch in the tree fixes only the android script. The ddms script is broken. The attached patch fixes ddms too.
Comment 6 Richard Freeman gentoo-dev 2010-08-27 01:12:24 UTC
Thanks - good catch!  Fixed in cvs, with a bump to trigger a rebuild...
Comment 7 Bear Tung 2010-10-29 03:36:38 UTC
bear@minnow ~ $ eix android
[I] dev-util/android-sdk-update-manager
     Available versions:  ~3!m (~)3-r1!m (~)4!m (~)5!m (~)6!m (~)6-r1!m 6-r2!m
     Installed versions:  6-r2!m(11:28:33 AM 10/29/2010)
     Homepage:            http://developer.android.com
     Description:         Open Handset Alliance's Android SDK

bear@minnow ~ $ echo $ANDROID_SWT
/usr/share/swt-3.5/lib
bear@minnow ~ $ java-config -p swt-3.5
/usr/share/swt-3.5/lib/swt.jar
bear@minnow ~ $ android
Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-gtk-3557 or swt-gtk in swt.library.path, java.library.path or the jar file
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
	at com.android.sdkmanager.Main.showMainWindow(Main.java:265)
	at com.android.sdkmanager.Main.doAction(Main.java:249)
	at com.android.sdkmanager.Main.run(Main.java:94)
	at com.android.sdkmanager.Main.main(Main.java:83)

so, 6-r2 is not work!! 
Comment 8 Richard Freeman gentoo-dev 2010-10-29 14:43:20 UTC
(In reply to comment #7)
> so, 6-r2 is not work!! 

Hmm, not sure what is going on there.  Perhaps something is wrong with your swt install?  I have the same paths/etc configured and I'm not running into these errors.

Comment 9 Matt Wood 2011-06-10 22:19:14 UTC
This is happening to me with 10-r1.  Here is my emerge --info:

Portage 2.1.10.1 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.2, glibc-2.13-r2, 2.6.39-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.0.2
Timestamp of tree: Fri, 10 Jun 2011 20:45:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1, 3.2
dev-util/cmake:           2.8.4-r1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1-r1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.4.5, 4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
Repositories: gentoo java-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ http://mirror.datapipe.net/gentoo http://www.gtlib.gatech.edu/pub/gentoo http://lug.mtu.edu/gentoo/ http://gentoo.netnitco.net http://mirrors.rit.edu/gentoo/ http://gentoo.llarian.net/ http://gentoo.mirrors.tds.net/gentoo http://mirror.lug.udel.edu/pub/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirror.usu.edu/mirrors/gentoo/"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/java-overlay"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth branding bzip2 cairo cddb cdr cli consolekit cracklib crypt cups cxx dbus device-mapper dri dts dvd dvdr eds emboss encode evo exif fbondecor ffmpeg firefox flac fortran ftp gdbm gdu gif gimp gnome gnome-keyring gpm gstreamer gtk iconv ipv6 java jpeg lcms ldap libnotify logrotate lzo mad mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support quicktime readline samba scanner sdl session smp spell sse sse2 ssht ssl startup-notification svg symlink sysfs tcpd tiff truetype udev unicode usb vorbis wifi x264 xcb xine xml xorg xulrunner xv xvid 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="braindump flow karbon kexi kpresenter krita tables words" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 10 Matt Wood 2011-06-10 22:34:41 UTC
Nevermind...I'm an idiot!!  Had Java-1.5 set as my user JDK.  Changed to 1.6 and i'm good to go!