1 To enable the ffi fallback for the foreign linker:
3 --enable-fallback-linker
5 That works, but adds FFI to the dependencies. To bundle the FFI we
8 --enable-libffi-bundling
10 and then help the build out so it can find the right file. The search
11 logic (see make/autoconf/lib-ffi.m4) is a bit of guesswork and
14 You can't use a simple --with-libffi=/usr, because it doesn't know
15 where our 64-bit library is. So you have to be more specific:
17 --with-libffi-include=/usr/include
18 --with-libffi-lib=/usr/lib/amd64
20 (You don't need the first one, as that's already the default.)
22 That still doesn't quite work, as we have multiple libffi.so.X files
23 (for backwards compatibility) which causes confusion:
25 checking for libffi lib file location... /var/tmp/ud/jdk21-jdk-21-28/build/.configure-support/generated-configure.sh: line 144232: test: too many arguments
26 configure: error: Could not locate libffi.so.? for bundling in /usr/lib/amd64
28 So I think the way to avoid that would be to create a temporary
29 directory and structure that in a way the configure script expects.