Bug 248099 - java/bootstrap-openjdk8: broken on arm (requires libffi.so.6)
Summary: java/bootstrap-openjdk8: broken on arm (requires libffi.so.6)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Greg Lewis
URL: http://thunderx1.nyi.freebsd.org/data...
Keywords:
Depends on: 248391
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-19 12:32 UTC by Mikael Urankar
Modified: 2020-08-06 04:28 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (java)


Attachments
RUN_DEPENDS update (412 bytes, patch)
2020-07-24 03:19 UTC, Greg Lewis
no flags Details | Diff
patch (482 bytes, patch)
2020-08-05 16:10 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2020-07-19 12:32:58 UTC
configure: Potential Boot JDK found at /usr/local/bootstrap-openjdk8 is incorrect JDK version (Error: dl failure on line 902); ignoring

readelf -a /usr/ports/java/bootstrap-openjdk8/work/bootstrap-openjdk8/jre/lib/aarch64/server/libjvm.so | grep libffi
 0x0000000000000001 NEEDED               Shared library: [libffi.so.6]

recreate the bootstrap for armv6 / arm64 or add a build dep on devel/libffi321?
Comment 1 Greg Lewis freebsd_committer freebsd_triage 2020-07-23 02:45:21 UTC
The bootstrap port already has a RUN_DEPENDS for this:

https://svnweb.freebsd.org/ports/head/java/bootstrap-openjdk8/Makefile?revision=541232&view=markup#l39
Comment 2 Greg Lewis freebsd_committer freebsd_triage 2020-07-23 02:49:01 UTC
Are you sure that is definitely the shared library that it can't find?  If so then it seems like libffi was uninstalled at some point after bootstrap-openjdk8 was installed.  In that case I'm going to close this.
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2020-07-23 06:15:49 UTC
(In reply to Greg Lewis from comment #2)
libffi was recently updated with a shlib bump (libffi.so.7, ports r541231)
devel/libffi321 was created to fix problem like this one (ports r541359, ports r541399)
Comment 4 Greg Lewis freebsd_committer freebsd_triage 2020-07-24 03:19:32 UTC
Created attachment 216734 [details]
RUN_DEPENDS update

Let me know if this works
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2020-07-24 11:07:42 UTC
Thanks, will try it next monday
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2020-07-28 06:17:40 UTC
(In reply to Greg Lewis from comment #4)
Unfortunately it doesn't work, libffi321 install libffi.so.6 in /usr/local/lib/compat/ and this path is not scanned by rc.d/ldconfig...
Comment 7 Greg Lewis freebsd_committer freebsd_triage 2020-07-30 07:25:28 UTC
That is where the misc/compatNNx ports install libraries too, so it's weird that ldconfig isn't scanning it.  It seems like the right place for the port to put things.
Comment 8 Mikael Urankar freebsd_committer freebsd_triage 2020-07-30 18:27:23 UTC
(In reply to Greg Lewis from comment #7)
There is a bug in devel/libffi321, your patch works fine if libffi321 is patched this way.

--- devel/libffi321/Makefile    (revision 543486)
+++ devel/libffi321/Makefile    (working copy)
@@ -14,7 +14,7 @@
 LICENSE_FILE=  ${WRKSRC}/LICENSE
 
 USES=          libtool
-USE_LDCONFIG=  yes
+USE_LDCONFIG=  ${PREFIX}/lib/compat
 GNU_CONFIGURE= yes
 CONFIGURE_ARGS=        --libdir=${PREFIX}/lib/compat \
                --disable-static
Comment 9 Greg Lewis freebsd_committer freebsd_triage 2020-07-31 04:17:50 UTC
Cool, that is what the compatNNx ports do as well, I missed that when I looked at them.

Can you put a bug in against libffi321?
Comment 10 Greg Lewis freebsd_committer freebsd_triage 2020-08-05 02:56:49 UTC
Looks like there has been an update of bootstrap-openjdk8 to just depend on the new version of libffi.  I don't think that works based on the discussion here.  Mikael, can you please test to see if the update works or not?  If it doesn't I'll commit the change I have to resolve.
Comment 11 Mikael Urankar freebsd_committer freebsd_triage 2020-08-05 16:08:43 UTC
(In reply to Greg Lewis from comment #10)
My mistake, the problem is in the bootstrap not openjdk8.
Comment 12 Mikael Urankar freebsd_committer freebsd_triage 2020-08-05 16:10:20 UTC
Created attachment 217030 [details]
patch
Comment 13 commit-hook freebsd_committer freebsd_triage 2020-08-06 04:27:37 UTC
A commit references this bug:

Author: glewis
Date: Thu Aug  6 04:27:10 UTC 2020
New revision: 544263
URL: https://svnweb.freebsd.org/changeset/ports/544263

Log:
  Unbreak on ARM by depending on the previous libffi version

  PR:		248099

Changes:
  head/java/bootstrap-openjdk8/Makefile