Bug 238855 - java/bootstrap-openjdk8 requires binary compatibility on 12.0-RELEASE
Summary: java/bootstrap-openjdk8 requires binary compatibility on 12.0-RELEASE
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jung-uk Kim
Depends on:
Reported: 2019-06-27 20:17 UTC by chadf
Modified: 2019-11-06 18:31 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description chadf 2019-06-27 20:17:36 UTC
On FreeBSD 12.0, without binary compatibility enabled, bootstrap-openjdk8 fails when building openjdk8.

# /usr/local/bootstrap-openjdk8/bin/javac
Bad system call (core dumped)

# file /usr/local/bootstrap-openjdk8/bin/javac
/usr/local/bootstrap-openjdk8/bin/javac: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.3, FreeBSD-style, stripped

# uname -a
FreeBSD myhostname 12.0-RELEASE-p6 FreeBSD 12.0-RELEASE-p6 MYKERNELNAME  amd64

This port requires appropriate COMPAT_FREEBSDxx kernel options for FreeBSD 12.0 (and 11.x, presumably). Perhaps it could check and give a noticeable warning if not enabled in the running kernel. If currently undetectable, maybe sysctl entries could be added to communicate such functionality (or lack of) to userland, e.g. "compat.10x.enabled" (but adding such a feature is probably beyond the scope of this bug report).

Note #1: ktrace shows the failing syscall for be one for compat11. This seemes odd for a 10.3 binary. Maybe it is normal, but I thought it was worth mentioning in case it was a symptom of a hidden problem. I also had to enable COMPAT_FREEBSD11 in the kernel to get this port to work.

    . . .
  1067 javac    CALL  compat11.stat
  1067 javac    RET   compat11.stat -1 errno 78 Function not implemented
  1067 javac    PSIG  SIGSYS SIG_DFL code=SI_KERNEL
  1067 javac    NAMI  "javac.core"

Note #2: It does not appear to require the misc/compat10x port (when used to build java/openjdk8).
Comment 1 Greg Lewis freebsd_committer 2019-11-06 18:31:17 UTC
I can't reproduce this on my 12.1 machine.  Can you update to 12.1 and see if you still need the compat package?