# Unable to build any of openjdk ports on 12.0-RELEASE/amd64



## Minotaur (Mar 22, 2019)

Hello!

I'm unable to build any of openjdk ports on my 12.0-RELEASE/amd64 box. The build fails on configure stage because of non-working /usr/local/bootstrap-openjdk*/bin/javac:



```
# /usr/local/bootstrap-openjdk11/bin/javac --version
Bad system call (core dumped)

# truss /usr/local/bootstrap-openjdk11/bin/javac --version
[...]
mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34370785280 (0x800a89000)
mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34370789376 (0x800a8a000)
mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34370801664 (0x800a8d000)
__sysctl(0x7fffffffcfa0,0x4,0x7fffffffd3b0,0x7fffffffd7c0,0x0,0x0) = 0 (0x0)
access("/usr/local/bootstrap-openjdk11/lib/libjava.so",F_OK) = 0 (0x0)
open("/usr/local/bootstrap-openjdk11/lib/jvm.cfg",O_RDONLY,0666) = 3 (0x3)
fstat(3,{ mode=-rw-r--r-- ,inode=10219904,size=29,blksize=32768 }) = 0 (0x0)
mmap(0x0,36864,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34370805760 (0x800a8e000)
read(3,"-server KNOWN\n-client IGNORE\n",32768)  = 29 (0x1d)
mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34370842624 (0x800a97000)
read(3,0x800a8eac0,32768)                        = 0 (0x0)
close(3)                                         = 0 (0x0)
compat11.stat("(null)",0x0)                      ERR#78 'Function not implemented'
SIGNAL 12 (SIGSYS) code=SI_KERNEL
process killed, signal = 12 (core dumped)
```

The same is with openjdk7/8. 
Any suggestions are kindly appreciated! Thanks.


----------



## SirDice (Mar 22, 2019)

Use packages;  `pkg install openjdk11`


----------



## MarcoB (Mar 22, 2019)

How are you building? From ports?


----------



## SirDice (Mar 22, 2019)

MarcoB said:


> How are you building? From ports?





Minotaur said:


> I'm unable to *build* any of openjdk *ports* on my 12.0-RELEASE/amd64 box.


----------



## Minotaur (Mar 22, 2019)

SirDice said:


> Use packages;  pkg install openjdk11


Thanks, it's good workaround. But I'd like to find the root cause of problem.


----------



## SirDice (Mar 22, 2019)

Judging by the `compat11.stat` that's throwing an error it seems misc/compat11x is missing as a dependency.


----------



## Minotaur (Mar 22, 2019)

SirDice said:


> Judging by the `compat11.stat` that's throwing an error it seems misc/compat11x is missing as a dependency.


Then "options         COMPAT_FREEBSD11" should be added to kernel configuration as well?


----------



## SirDice (Mar 22, 2019)

Minotaur said:


> Then "options COMPAT_FREEBSD11" should be added to kernel configuration as well?


For a custom kernel, yes. GENERIC already has it.


----------



## Minotaur (Mar 27, 2019)

Thank everyone for help! Now everything looks good.


----------

