Skip to content

Portable Snapshot does not find libjava.so #5591

Closed
@reox

Description

@reox

JabRef version

JabRef 5.0.0-dev--2019-11-03----e356e4910
Linux 3.10.0-1062.1.1.el7.centos.plus.x86_64 amd64 
Java 12.0.2

Steps to reproduce the behavior:

  1. Download a portable snapshot for linux
  2. unpack
  3. run ./bin/JabRef

Will give the following error:

Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.

When running strace, you can see that it does not search for the runtime folder but stops at the lib folder:

[...]
stat("", 0x7ffe79c9cc20)                = -1 ENOENT (No such file or directory)
readlink("/proc/self/exe", "/home/reox/bin/JabRef/bin/JabRef", 4096) = 31
stat("/etc/sysconfig/64bit_strstr_via_64bit_strstr_sse2_unaligned", 0x7ffe79c97330) = -1 ENOENT (No such file or directory)
access("/home/reox/bin/JabRef/lib/libjava.so", F_OK) = -1 ENOENT (No such file or directory)
access("/home/reox/bin/JabRef/jre/lib/libjava.so", F_OK) = -1 ENOENT (No such file or directory)
lstat("/usr2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/reox", {st_mode=S_IFDIR|0770, st_size=4096, ...}) = 0
lstat("/home/reox/bin", {st_mode=S_IFDIR|0755, st_size=72, ...}) = 0
lstat("/home/reox/bin/JabRef", {st_mode=S_IFDIR|0755, st_size=63, ...}) = 0
lstat("/home/reox/bin/JabRef/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/reox/bin/JabRef/lib/runtime", {st_mode=S_IFDIR|0755, st_size=63, ...}) = 0
lstat("/home/reox/bin/JabRef/lib/runtime/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/reox/bin/JabRef/lib/runtime/lib/libjli.so", {st_mode=S_IFREG|0644, st_size=79560, ...}) = 0
stat("/home/reox/lib/libjava.so", 0x7ffe79c977e0) = -1 ENOENT (No such file or directory)
write(2, "Error: could not find libjava.so", 32Error: could not find libjava.so) = 32
write(2, "\n", 1
)                       = 1
write(2, "Error: Could not find Java SE Ru"..., 50Error: Could not find Java SE Runtime Environment.) = 50
write(2, "\n", 1
)                       = 1
exit_group(2)                           = ?
+++ exited with 2 +++

I tried the following workaround:

$ cd lib
$ find runtime/lib/ -maxdepth 1 -mindepth 1 -exec ln -s {} \;

which makes jabref start up.

I'm not sure if this problem is specific to CentOS or the current setup on my machine. I also tried it on a fresh Debian stretch VM, where JabRef would start without any problems.
Maybe there is some special ldconfig or environment variable which messes things up?
I can try to test it on a CentOS VM later, or someone has an idea what specific test I could run.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions