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).
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?
Created attachment 211787 [details] GENERIC kernel diff for only 10.x binary compat Tried it again with fresh 12.1 release install and same issue. Attached is diff for kernel config, which disables all binary compatibility except 10.x (which should be enough for the FreeBSD 10.3 bootstrap javac binary). -<>-<>-<>-<>- % uname -a FreeBSD freebsd-12-1 12.1-RELEASE-p2 FreeBSD 12.1-RELEASE-p2 GENERIC_COMPAT10 amd64 % /usr/local/bootstrap-openjdk8/bin/javac Bad system call (core dumped) % ktrace -i /usr/local/bootstrap-openjdk8/bin/javac Bad system call (core dumped) % kdump . . . 824 javac CALL compat11.stat 824 javac RET compat11.stat -1 errno 78 Function not implemented 824 javac PSIG SIGSYS SIG_DFL code=SI_KERNEL 824 javac NAMI "javac.core" % 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 % pkg info | grep '^compat' compat10x-amd64-10.4.1004000.20181014 Convenience package to install the compat10x libraries compat11x-amd64-11.2.1102000.20181014 Convenience package to install the compat11x libraries