Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 363049 - dev-java/icedtea-web drops symlinks to javaws binary
Summary: dev-java/icedtea-web drops symlinks to javaws binary
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 08:13 UTC by Paolo Pedroni
Modified: 2011-06-20 12:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Pedroni 2011-04-11 08:13:26 UTC
Ever since I updated to icedtea-web-1.0.2, one of my .jnlp scripts refuses to run with the following error:
net.sourceforge.jnlp.LaunchException: Fatal: External Launch Error: Could not launch JNLP file.
        at net.sourceforge.jnlp.Launcher.launchExternal(Launcher.java:356)
        at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:417)
        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:830)
Caused by: java.io.IOException: Cannot run program "/usr/lib64/icedtea6/jre/bin/javaws": java.io.IOException: error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
        at java.lang.Runtime.exec(Runtime.java:610)
        at java.lang.Runtime.exec(Runtime.java:483)
        at net.sourceforge.jnlp.Launcher.launchExternal(Launcher.java:348)
        ... 2 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
        at java.lang.ProcessImpl.start(ProcessImpl.java:81)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
        ... 5 more
Caused by: 
java.io.IOException: Cannot run program "/usr/lib64/icedtea6/jre/bin/javaws": java.io.IOException: error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
        at java.lang.Runtime.exec(Runtime.java:610)
        at java.lang.Runtime.exec(Runtime.java:483)
        at net.sourceforge.jnlp.Launcher.launchExternal(Launcher.java:348)
        at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:417)
        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:830)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
        at java.lang.ProcessImpl.start(ProcessImpl.java:81)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
        ... 5 more

In fact there is no /usr/lib64/icedtea6/jre/bin/javaws binary, just /usr/lib64/icedtea6/bin/javaws. In the previous version there was a symlink from /usr/lib64/icedtea6/jre/bin/javaws (and itweb-settings, as well) to /usr/lib64/icedtea6/bin/javaws, now it's gone and the .jnlp script doesn't work anymore.

Reproducible: Always

Steps to Reproduce:
1. javaws ./oneclick.jnlp
Actual Results:  
The error above.

Expected Results:  
Java Web Start application starting properly.

# emerge --info
Portage 2.1.9.42 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.5, glibc-2.11.3-r0, 2.6.38-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.38-gentoo-r1-x86_64-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-gentoo-2.0.2
Timestamp of tree: Mon, 11 Apr 2011 05:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache compress-build-logs distcc distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""                                                                                                                           
GENTOO_MIRRORS="http://mirrors.linuxant.fr/distfiles.gentoo.org/ http://gentoo.modulix.net/gentoo/ ftp://mirror.netcologne.de/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/"                                                   
LANG="it_IT.UTF-8"                                                                                                                  
LC_ALL="it_IT.UTF-8"                                                                                                                
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                                   
LINGUAS="it"                                                                                                                        
MAKEOPTS="-j2"
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="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 ao audiofile bash-completion bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus dga djvu dri dts dvd dvdr emboss encode exif expat fam fbcon ffmpeg fftw firefox flac fontconfig foomaticdb fortran ftp gd gdbm gdu geoip ggi gif gimp gmp gnutls gphoto2 gpm graphviz gstreamer gtk handbook iconv icu idn ieee1394 imagemagick imlib ipv6 java jbig jpeg jpeg2k kde lame lcms libcaca libsamplerate lm_sensors lua lzma lzo mad mikmod mmap mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp pam pango pch pcre pdf perl png policykit ppds pppd python qt3support qt4 rdesktop readline recode sdl semantic-desktop session smartcard sndfile sockets speex spell sqlite sqlite3 sse sse2 ssl startup-notification subversion svg symlink sysfs syslog sysvipc taglib tcpd theora threads tidy tiff truetype udev unicode usb vcd vim-syntax vnc vorbis wmf wxwidgets x264 xattr xcb xcomposite xinerama xml xorg xpm xscreensaver xulrunner xv xvid yahoo zlib" ALSA_CARDS="hda-intel virmidi" 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" CAMERAS="kodak 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" LINGUAS="it" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-04-11 14:16:53 UTC
Which version of icedtea-6 is installed? What's the output of 'equery f icedtea-web'?
What if you remerge icedtea-web with FEATURES=keepwork temporarily enabled, and then look in /var/tmp/portage/dev-java/icedtea-web-1.0.2/image - do the symlinks exist there?
Comment 2 Paolo Pedroni 2011-04-11 16:12:01 UTC
(In reply to comment #1)
> Which version of icedtea-6 is installed? What's the output of 'equery f
> icedtea-web'?

# equery l icedtea
* Searching for icedtea ...
[IP-] [  ] dev-java/icedtea-6.1.10.1:6

# equery f icedtea-web
* Searching for icedtea-web ...
* Contents of dev-java/icedtea-web-1.0.2:
/usr
/usr/lib64
/usr/lib64/icedtea6
/usr/lib64/icedtea6/bin
/usr/lib64/icedtea6/bin/itweb-settings
/usr/lib64/icedtea6/bin/javaws
/usr/lib64/icedtea6/bin/pluginappletviewer
/usr/lib64/icedtea6/jre
/usr/lib64/icedtea6/jre/bin
/usr/lib64/icedtea6/jre/lib
/usr/lib64/icedtea6/jre/lib/about.jar
/usr/lib64/icedtea6/jre/lib/about.jnlp
/usr/lib64/icedtea6/jre/lib/amd64
/usr/lib64/icedtea6/jre/lib/amd64/IcedTeaPlugin.so
/usr/lib64/icedtea6/jre/lib/netx.jar
/usr/lib64/icedtea6/jre/lib/plugin.jar
/usr/lib64/icedtea6/man
/usr/lib64/icedtea6/man/man1
/usr/lib64/icedtea6/man/man1/javaws.1.bz2
/usr/share
/usr/share/doc
/usr/share/doc/icedtea-web-1.0.2
/usr/share/doc/icedtea-web-1.0.2/AUTHORS.bz2
/usr/share/doc/icedtea-web-1.0.2/NEWS.bz2
/usr/share/doc/icedtea-web-1.0.2/README.bz2
/usr/share/java-config-2
/usr/share/java-config-2/nsplugin
/usr/share/java-config-2/nsplugin/icedtea6-javaplugin.so -> /usr/lib64/icedtea6/jre/lib/amd64/IcedTeaPlugin.so

> What if you remerge icedtea-web with FEATURES=keepwork temporarily enabled, and
> then look in /var/tmp/portage/dev-java/icedtea-web-1.0.2/image - do the
> symlinks exist there?

There is no such directory.

Looking closely at the log I see this, during the install phase:
if [ -d /usr/lib64/icedtea6/jre/bin ] ; then \
          /bin/sh /var/tmp/portage/dev-java/icedtea-web-1.0.2/work/icedtea-web-1.0.2/install-sh -d /var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6/jre/bin ; \
          if [ -L /var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6/jre/bin/javaws ] ; then \
            rm -f /var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6/jre/bin/javaws ; \
          fi ; \
          if [ -L /var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6/jre/bin/itweb-settings ] ; then \
            rm -f /var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6/jre/bin/itweb-settings ; \
          fi ; \
          if [ ! -e /usr/lib64/icedtea6/jre/bin/javaws ] ; then \
            ln -s ../../bin/javaws /var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6/jre/bin ; \
          fi ; \
          if [ ! -e /usr/lib64/icedtea6/jre/bin/itweb-settings ] ; then \
            ln -s ../../bin/itweb-settings /var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6/jre/bin ; \
          fi ; \
        fi

Aren't the checks on the "/usr/lib64/icedtea6..." directory supposed to be on the "/var/tmp/portage/dev-java/icedtea-web-1.0.2/image//usr/lib64/icedtea6..." one?

This way (and I can confirm it) the ebuild installs the symlinks if they are not currently present in the system (modulo a race in the install phase that must be fixed with MAKEOPTS=-j1) and it does not install them if they are already present.

It must be something in the makefiles or a configure flag, no idea how to fix it, though.
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-04-15 15:29:05 UTC
Andrew: can you please look at this? Seems the makefiles do not honour DESTDIR when checking if the symlinks already exist. And then there's the -jX problem (which we could workaround in the ebuild).
Comment 4 Andrew John Hughes 2011-04-15 16:14:40 UTC
I think the problem is DESTDIR not being used in the body not its absence in the conditional.

The first condition is meant to check that IcedTea6 has installed a jre/bin (always the case with Gentoo as we don't mess about with jres and jdks like other distros) so we know whether jre/bin symlinks should be created.
Without this test, an install without jre/bin would have one created containing just the symlinks.

The problem is:

          if [ ! -e $(prefix)/jre/bin/javaws ] ; then \
	    ln -s ../../bin/javaws $(DESTDIR)$(prefix)/jre/bin ; \
          fi ; \
	  if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \
            ln -s ../../bin/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \
          fi ; \

On a user-install this would work AFAICS.  The problem is that portage will remove the symlinks from the old ebuild.  For Gentoo, patching out those two conditionals would fix this.

I don't see an obvious race.  Can you go into more detail?
Comment 5 Andrew John Hughes 2011-04-15 16:15:49 UTC
Note that 1.1 will be released soon which drops all this and installs like a normal application.
Comment 6 Paolo Pedroni 2011-04-18 07:45:37 UTC
(In reply to comment #4)

> I don't see an obvious race.  Can you go into more detail?

I don't remember the exact details, since it's been a week, but I remember that once in a while, during the install phase of the ebuild, the ebuild bombed out with some error, but it never did with 'MAKEOPTS=-j1'. I'd like to troubleshoot it better but I don't have the time at the moment, it's not really relevant for this bug, anyway, so you're free to not care, right now.
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-06-20 12:29:20 UTC
The symlinks problem should be fixed in icedtea-web-1.1, parallel make problem probably exists as reported in bug 372235.