Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2015 20:41:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        java@FreeBSD.org
Subject:   [Bug 193009] java/openjdk8 does not build with OPTIONS_FILE_SET+=DEBUG
Message-ID:  <bug-193009-8522-514Yf9NxLA@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-193009-8522@https.bugs.freebsd.org/bugzilla/>
References:  <bug-193009-8522@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193009

Jung-uk Kim <jkim@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Closed                      |Open
                 CC|                            |jkim@FreeBSD.org,
                   |                            |kib@FreeBSD.org
         Resolution|FIXED                       |---

--- Comment #8 from Jung-uk Kim <jkim@FreeBSD.org> ---
Please note statically linking jli was a hack to work around a launcher
problem.

$ /usr/local/openjdk8/bin/java -version
openjdk version "1.8.0_31"
OpenJDK Runtime Environment (build 1.8.0_31-b13)
OpenJDK 64-Bit Server VM (build 25.31-b07, mixed mode)

Let's make a symlink and try the link.

$ ln -fs /usr/local/openjdk8/bin/java .
$ ./java -version
openjdk version "1.8.0_31"
OpenJDK Runtime Environment (build 1.8.0_31-b13)
OpenJDK 64-Bit Server VM (build 25.31-b07, mixed mode)

This works.  However, the following fails:

$ $PWD/java -version
Shared object "libjli.so" not found, required by "java"

That's because the actual executable was linked with '-z origin', i.e.,

$ objdump -p /usr/local/openjdk8/bin/java | grep ORIGIN
  RPATH       $ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
  RUNPATH     $ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ ldd /usr/local/openjdk8/bin/java | grep libjli
    libjli.so => /usr/local/openjdk8/bin/../lib/amd64/jli/libjli.so
(0x800a36000)
$ ldd $PWD/java | grep libjli
    libjli.so => not found (0)

As you can see, our rtld(1) resolves $ORIGIN differently if it starts with `/'.
 Arguably, it is a bug in rtld, though.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-193009-8522-514Yf9NxLA>