Created attachment 225632 [details] configure.log of building openjdk1 My system is FreeBSD 13.0-RELEASE-p1, fresh install. Yesterday was update of LibereOffice and it stopped because problem with Openjdk11. checking for cacerts file... /usr/ports/java/openjdk11/files/cacerts checking if packaged modules are kept... yes (default) checking for version string... 11.0.11+9-1 configure: Found potential Boot JDK using configure arguments configure: Potential Boot JDK found at /usr/local/bootstrap-openjdk11 is incorrect JDK version (Error occurred during initialization of VM); ignoring configure: (Your Boot JDK version must be one of: 10 11) configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK configure exiting with result code 1 ===> Script "configure" failed unexpectedly. Please report the problem to java@FreeBSD.org [maintainer] and attach the "/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.11-9-1/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1 I tried to install openjdk8 and 12 but it was the same problem. Please, check the attached log.
^Triage: give more effective Summary; clear stray maintainer-feedback flag.
I try to install again and the problem exist. BTW: Is java mailing list active still, please?
^Triage: sorry, but the maintainer-feedback+ flag is only intended to be set by the maintainer.
(In reply to lumiwa from comment #0) <<......configure: Potential Boot JDK found at /usr/local/bootstrap-openjdk11 is incorrect JDK version (Error occurred during initialization of VM); ignoring configure: (Your Boot JDK version must be one of: 10 11).....>> your bug-report is not reproducible : ----check: ---- root@freebsd:~ # /usr/local/bootstrap-openjdk11/bin/java -version openjdk version "11.0.5" 2019-10-15 OpenJDK Runtime Environment (build 11.0.5+10-1) OpenJDK 64-Bit Server VM (build 11.0.5+10-1, mixed mode) --port-installation :--- .... checking for version string... 11.0.11+9-1 configure: Found potential Boot JDK using configure arguments checking for Boot JDK... /usr/local/bootstrap-openjdk11 checking Boot JDK version... openjdk version "11.0.5" 2019-10-15 OpenJDK Runtime Environment (build 11.0.5+10-1) OpenJDK 64-Bit Server VM (build 11.0.5+10-1, mixed mode) checking for java in Boot JDK... ok ... ----- wherever your bug comes from you could e.g. simply do : root@freebsd:~ # rm -rf /usr/local/bootstrap-openjdk11 root@freebsd:/usr/ports/java/bootstrap-openjdk11 # make clean root@freebsd:/usr/ports/java/bootstrap-openjdk11 # make deinstall reinstall clean ..... good luck
@ lumiwa@gmail.com : can you please mark this bugzilla as closed / fixed or describe what happens if you apply my hint above?
For whatever reaso it doesn't work for me. I di what you wrote and that try to install openjdk11 and I got: configure: Found potential Boot JDK using configure arguments configure: Potential Boot JDK found at /usr/local/bootstrap-openjdk11 is incorrect JDK version (Error occurred during initialization of VM); ignoring configure: (Your Boot JDK version must be one of: 10 11) configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK configure exiting with result code 1 ===> Script "configure" failed unexpectedly. Please report the problem to java@FreeBSD.org [maintainer] and attach the "/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.11-9-1/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1 Stop. make[1]: stopped in /usr/ports/java/openjdk11 *** Error code 1 Stop. make: stopped in /usr/ports/java/openjdk11 I am using gitup for ports.
(In reply to lumiwa from comment #6) can you please post the output of: /usr/local/bootstrap-openjdk11/bin/java -version ?
/usr/local/bootstrap-openjdk11/bin/java -version Error occurred during initialization of VM Could not reserve enough space in CodeHeap 'non-nmethods' (2496K)
Are you using the official binary package for the bootstrap?
(In reply to Mikael Urankar from comment #9) <<Are you using the official binary package for the bootstrap?>> .. @lumiwa : to be sure you have the correct bootstrap-version in your search path you can do the following : -1. root@freebsd:~ # wget https://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/bootstrap-openjdk11-11.0.5.10.1.txz .... - 'bootstrap-openjdk11-11.0.5.10.1.txz' saved [103071984/103071984] -2. root@freebsd:~ # xz -d bootstrap-openjdk11-11.0.5.10.1.txz -3. root@freebsd:~ # tar xvf bootstrap-openjdk11-11.0.5.10.1.tar -4. root@freebsd:~ # mv usr/local/bootstrap-openjdk11/ /usr/local/bootstrap-openjdk11/ -5. repeat command /usr/local/bootstrap-openjdk11/bin/java -version (and please post it here again) - it should print: root@freebsd:~ # /usr/local/bootstrap-openjdk11/bin/java -version openjdk version "11.0.5" 2019-10-15 OpenJDK Runtime Environment (build 11.0.5+10-1) OpenJDK 64-Bit Server VM (build 11.0.5+10-1, mixed mode) --
I am using ports and for update ports I am using gitup.
(In reply to lumiwa from comment #0) <<.....I tried to install openjdk8 and 12 but it was the same problem.....>> what was the exact same problem for openjdk8 ? ( openjdk8 doesn't use openjdk11`s-bootstrap) (In reply to lumiwa from comment #11) <<...I am using ports and for update ports I am using gitup...>> did you try: 'pkg install openjdk8' & 'pkg install openjdk11' ? ... so if every installed(or manually placed like in comment #10) jdk or jre on your system prints : <<Error occurred during initialization of VM Could not reserve enough space in CodeHeap 'non-nmethods' (2496K)>> (from your comment #8) then there's something goin`wrong with your system which is hard or impossible to remote-debug w/o more information about running pids(or dmesg etc.) and so on. assuming you have enough RAM , I'm out of "remote-guessing-idea". of course you could try something like : ' java -Xms256m -Xmx512m -version ' but your bug really shouldn't happen under a correct port-installation on a "healthy 13.0-RELEASE-system" . .. well, sidenote: libreoffice has another upgrade since your entry comment #0
I think and is it possible to my sysctl.conf settings: ... kern.elf32.aslr.enable=1 kern.elf32.aslr.honor_sbrk=0 kern.elf32.aslr.pie_enable=1 kern.elf32.allow_wx=0 kern.elf64.aslr.enable=1 kern.elf64.aslr.honor_sbrk=0 kern.elf64.aslr.pie_enable=1 kern.elf64.allow_wx=0 kern.ipc.shm_use_phys=1 ... Thank you.
(In reply to lumiwa from comment #13) yes, thanks for telling us the root cause of your bug : root@freebsd:~ # sysctl kern.elf64.allow_wx=0 kern.elf64.allow_wx: 1 -> 0 root@freebsd:~ # /usr/local/bootstrap-openjdk11/bin/java -version Error occurred during initialization of VM Could not reserve enough space in CodeHeap 'non-nmethods' (2496K) -- root@freebsd:~ # sysctl kern.elf64.allow_wx=1 kern.elf64.allow_wx: 0 -> 1 root@freebsd:~ # /usr/local/bootstrap-openjdk11/bin/java -version openjdk version "11.0.5" 2019-10-15 OpenJDK Runtime Environment (build 11.0.5+10-1) OpenJDK 64-Bit Server VM (build 11.0.5+10-1, mixed mode)
Thank you very much. The problem is solved.
Re-open - we really want to have the wxneeded flag set on the binary as part of the port build. This will have no effect for people with default allow_wx=1, but when allow_wx=0 it will indicate that the binary should opt-out.
Ed, thanks for re-opening Here is a whole directory of binaries ending up in /usr/local/openjdk11/bin, and most, maybe all of them do not like to run without wxneeded. Then, the port Makefile defines JDK_BUILDDIR= ${WRKSRC}/build/${JDK_OSARCH}- normal-${JDK_BUILD_JVM}-${JDK_BUILD_TYPE} After a few futile tries to make things work with that variable, I gave up and just did this: post-build: # USES=elfctl does not work here, because the .for loop there # gets expanded before the destination dir of the binaries is known ${ELFCTL} -i -e +wxneeded ${JDK_IMAGEDIR}/bin/*
If I understand correctly, to fix the build of java/openjdk11 we need to set wxneeded on ${LOCALBASE}/bootstrap-openjdk11/bin/java from java/bootstrap-openjdk11. However, there is a problem. # elfctl -e +wxneeded /usr/local/bootstrap-openjdk11/bin/java elfctl: NT_FREEBSD_FEATURE_CTL note not found
(In reply to Joseph Mingrone from comment #18) I can reproduce this: # tar xvf bootstrap-openjdk11-11.0.5.10.1.pkg # elfctl -e +wxneeded ./usr/local/bootstrap-openjdk11/bin/java elfctl: NT_FREEBSD_FEATURE_CTL note not found elfctl: NT_FREEBSD_FEATURE_CTL note not found # file ./usr/local/bootstrap-openjdk11/bin/java usr/local/bootstrap-openjdk11/bin/java: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.3, FreeBSD-style, not stripped $ file /usr/local/openjdk11/bin/java /usr/local/openjdk11/bin/java: ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.2, FreeBSD-style, not stripped
(In reply to Peter Much from comment #19) > # file ./usr/local/bootstrap-openjdk11/bin/java > ... for FreeBSD 11.3 ... The CSU bits in FreeBSD 11.3 did not have the template ELF note to record feature flags. We'll need a new bootstrap Java built on 12.2 or later, or 13.0 or later.
(In reply to Ed Maste from comment #20) I am also running into this issue. When can we expect to see a resolution here?
(In reply to Ed Maste from comment #20) I did https://github.com/freebsd/freebsd-ports/pull/300 locally and can build and run JDK in restricted environment. Note, this branch includes commit for editors/libreoffice but I run non-default options (JAVA=off) for libreoffice. OpenJDK and .jar files run fine with this branch.
https://reviews.freebsd.org/D47086