Dynamically linked libjli for *BSD
Jung-uk Kim
jkim at FreeBSD.org
Mon May 18 19:16:53 UTC 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 05/18/2015 14:38, Kurt Miller wrote:
> On Mon, 2015-05-18 at 13:14 -0400, Jung-uk Kim wrote:
>> On 05/18/2015 02:52, Greg Lewis wrote:
>>> On Sun, May 17, 2015 at 11:30:26AM -0400, Christos Zoulas
>>> wrote:
>>>> On May 16, 3:06pm, kurt at intricatesoftware.com (Kurt Miller)
>>>> wrote: -- Subject: Dynamically linked libjli for *BSD
>>>>
>>>> | Hi Greg, Christos, | | Currently building the jdk with
>>>> debug symbols fails on OpenBSD and | I suspect at least
>>>> FreeBSD (since it is disabled in the ports tree |
>>>> java/openjdk8/Makefile too). This was determined to be caused
>>>> by | libjli being statically linked on *BSD. [1] | |
>>>> Statically linking libjli was a work-around introduced in 1.5
>>>> or 1.6 | most likely due to the lack of rpath $ORIGIN support
>>>> in our runtime | linkers. All of the BSD's have rpath $ORIGIN
>>>> support for several | years now. I propose that we eliminate
>>>> linking libjli statically and | remove another difference we
>>>> have in the build when compared to | Linux and Solaris.
>>>> Dynamically linking libjli fixes the build with | debug
>>>> symbols. | | Please review/test this diff on FreeBSD and
>>>> NetBSD and let me know if | you are okay with the change.
>>>>
>>>> Works on NetBSD. Just a note, $ORIGIN support is not fully
>>>> implemented on NetBSD, there is a #ifdef notyet in
>>>> kern_exec.c... But running java with a full path in $0 works.
>>>> I'd say apply it if it works for others.
>>>
>>> Works for me too on FreeBSD 10.1.
>>
>> A PR with the same idea was filed but I rejected it:
>>
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193009
>
>
> Oh, I wasn't aware of the parallel FreeBSD work on this.
>
>> Actually, we had a $ORIGIN problem, which affected some ports,
>> e.g., java/icedtea-web. I fixed it in r279364 for head and
>> MFC'ed in r279713, r279714 and r279715 to stable/10, stable/9 and
>> stable/8, respectively.
>>
>> https://svnweb.freebsd.org/changeset/base/279364
>> https://svnweb.freebsd.org/changeset/base/279713
>> https://svnweb.freebsd.org/changeset/base/279714
>> https://svnweb.freebsd.org/changeset/base/279715
>>
>> Unfortunately, no FreeBSD *release* has this fix.
>
> What do you suggest we do with bsd-port/jdk8? Should I make this
> change OpenBSD specific or are you okay with how it is now?
Ideally, I think we have to make this conditional by adding a
variable, e.g., USE_STATIC_LIBJLI, and set it only on macosx by
default. Then we can set it from our port makefile depending on
target FreeBSD version.
Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJVWjqhAAoJEHyflib82/FGlEMH/jFSgpKjOvS9qJ4/fzi/8N71
6ytcoEtLw5Q9yOM5LPWYW/Q+m8cTgvgoTn3bZwvUGNL9Zi2mvHJYp1XQZBT5z9Dz
stK91PpJkjFSpS6+oFay0CcTFMeN5wbFR2g/mr8xwRHyb5iKhbnN1DaGDSvNPK8z
zmEUi4xug+4KUiwsSAd2ezL2QkLKBh2468aO3rENmfvhjpRp0KO2TdNBOKKw7lhh
PUwYtp8goMu6zWE/dbLyiLAOmLuIRvWnf9aUclDAQ1X+SmRTRWBzbvEKhT0g2/rt
rh8ZXwvhoD0F9K/3ZVqMANJeNUnkneEFEQojx9ncgix6iO7Mdn4hbuxipb3AYJo=
=+XsE
-----END PGP SIGNATURE-----
More information about the bsd-port-dev
mailing list