Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41969 - [openjdk] Incorrect path in post-install script causes errors on install

Attached to Project: Arch Linux
Opened by Daniel (weirddan455) - Sunday, 14 September 2014, 09:02 GMT
Last edited by Guillaume ALAUX (galaux) - Tuesday, 16 September 2014, 13:13 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Guillaume ALAUX (galaux)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

version: openjdk-8.u20-1-x86_64

It looks like the path is set wrong in the post-install script. It's looking for /usr/lib/jvm/java-default-runtime which doesn't exist. I believe the correct path should be /usr/lib/jvm/default-runtime which symlinks to /usr/lib/jvm/java8-openjdk in my case. Here is the output from pacman:

(1/5) installing java-common [###################################] 100%
Please make sure JAVA_HOME is set to /usr/lib/jvm/default
If not, you may have to logout and login again to set it according to /etc/profile.d/jre.sh
(2/5) installing ca-certificates-java [###################################] 100%
(3/5) installing jre8-openjdk-headless [###################################] 100%
/usr/bin/java: line 2: /usr/lib/jvm/java-default-runtime/bin/java: No such file or directory
find: `standard output': Broken pipe
find: `standard output': Broken pipe
find: write error
Optional dependencies for jre8-openjdk-headless
java-rhino: for some JavaScript support
(4/5) installing jre8-openjdk [###################################] 100%
when you use a non-reparenting window manager
set _JAVA_AWT_WM_NONREPARENTING=1 in
/etc/profile.d/jre.sh
Optional dependencies for jre8-openjdk
alsa-lib: for basic sound support [installed]
gtk2: for the Gtk+ look and feel - desktop usage [installed]
(5/5) installing jdk8-openjdk [###################################] 100%
/usr/bin/java: line 2: /usr/lib/jvm/java-default-runtime/bin/java: No such file or directory
find: `standard output': Broken pipe
find: `standard output': Broken pipe
find: write error
This task depends upon

Closed by  Guillaume ALAUX (galaux)
Tuesday, 16 September 2014, 13:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 8.u20-2
Comment by Pessimist (Pessimist_) - Sunday, 14 September 2014, 15:32 GMT
Not sure if this error is about the post-install script but I'm hitting the same thing.
Comment by David (dg) - Sunday, 14 September 2014, 16:47 GMT
I get the same error with openjdk7 (7.u65_2.5.2-1 x86_64).
A symlink from "java-default-runtime" to "default-runtime" seems to fix it for me.
Comment by Guillaume ALAUX (galaux) - Tuesday, 16 September 2014, 07:55 GMT
Could you please confirm this is fixed by current "-2" of OpenJDK 7 and 8 (or at least just one)
Comment by Pessimist (Pessimist_) - Tuesday, 16 September 2014, 13:11 GMT
Upgrading jdk8-openjdk, jre8-openjdk and jre8-openjdk-headless to 8.u20-2 from 8.u20-1 didn't give me any errors so I guess it's fixed. Also it seems to properly set everything up in /usr/lib/jvm/:

$ ls /usr/lib/jvm
default default-runtime java-8-openjdk
`file /usr/lib/jvm/default` => default: symbolic link to `java-8-openjdk'
`file /usr/lib/jvm/default-runtime` => default-runtime: symbolic link to `java-8-openjdk/jre'
`file /usr/lib/jvm/java-8-openjdk` => java-8-openjdk: directory

Loading...