The port does not build with JDK 11: compile-java:core: [mkdir] Created dir: /wrkdirs/usr/ports/sysutils/javaservicewrapper/work/wrapper_3.5.41_src/build/classes [mkdir] Created dir: /wrkdirs/usr/ports/sysutils/javaservicewrapper/work/wrapper_3.5.41_src/build/testclasses [mkdir] Created dir: /wrkdirs/usr/ports/sysutils/javaservicewrapper/work/wrapper_3.5.41_src/lib [javac] Compiling 108 source files to /wrkdirs/usr/ports/sysutils/javaservicewrapper/work/wrapper_3.5.41_src/build/classes [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.4 [javac] error: Source option 1.4 is no longer supported. Use 6 or later. [javac] error: Target option 1.4 is no longer supported. Use 1.6 or later. ------------------------------------------------------- When patching the default.properties as below per Makefile's "USE_JAVA= 1.8+" --- default.properties.ori 2020-03-12 20:53:43.795864000 +0000 +++ default.properties 2020-03-12 20:54:02.283785000 +0000 @@ -28,7 +28,7 @@ junit.failonerror = true # Minimum version of Java required to build the Wrapper -javac.target.version=1.4 +javac.target.version=1.8 # Location of java to build the pre-release javac.dir=E:\\j2sdk1.4.2_19 This error is thrown: BUILD FAILED /wrkdirs/usr/ports/sysutils/javaservicewrapper/work/wrapper_3.5.41_src/build.xml:552: javah does not exist under Java 10 and higher, use the javac task with nativeHeaderDir instead I've also tried with the latest 3.5.43 with same result.
That's a good catch. Java version can be raised to 1.7 since we have openjdk7 too. As for the header files, yes. That is a pity with other projects too. I will take a look at this tomorrow and report also upstream. Stay tuned.
Alright. The port is targeted for Java 1.8+ because Ant requires it. This means that we can ignore Java 7 (unfortunately). "javac -h" is already present in 8 so we don't need an if/else contruct. I will work on a decent patch tomorrow.
I have now a patch locally. Going through > poudriere testport -j 121-release-i386 -p dev -o sysutils/javaservicewrapper > poudriere testport -j 121-release-amd64 -p dev -o sysutils/javaservicewrapper > poudriere testport -j 113-release-i386 -p dev -o sysutils/javaservicewrapper > poudriere testport -j 113-release-amd64 -p dev -o sysutils/javaservicewrapper with Java 8, 11, 13.
I have concluded my tests. Java 8 and 11 run fine now. Java 13 jail causes some pkg-plist failures, but the pure compilation is not affected. This could be some Ant issue. I will update the patches shortly.
Created attachment 212424 [details] Patch against /usr/ports Here is a patch. Please try. Works for me in poudriere testport -j 121-release-i386 -p dev -o sysutils/javaservicewrapper -z java8 poudriere testport -j 113-release-i386 -p dev -o sysutils/javaservicewrapper -z java8 poudriere testport -j 121-release-amd64 -p dev -o sysutils/javaservicewrapper -z java8 poudriere testport -j 113-release-amd64 -p dev -o sysutils/javaservicewrapper -z java8 poudriere testport -j 121-release-i386 -p dev -o sysutils/javaservicewrapper -z java11 poudriere testport -j 113-release-i386 -p dev -o sysutils/javaservicewrapper -z java11 poudriere testport -j 121-release-amd64 -p dev -o sysutils/javaservicewrapper -z java11 poudriere testport -j 113-release-amd64 -p dev -o sysutils/javaservicewrapper -z java11 Note that setting JAVA_VERSION in make.conf has only effect if and only if JAVA_VERSION is removed from port's Makefile.
I have also found the issue why it fails with Java 12+. It is caused by 244634 from Java 12+.
(In reply to Michael Osipov from comment #5) Hi Michael, It works great! Thanks for fixing it and updating to current. Best regards, Tommy
Port commiters, please apply this patch and bump port revision. I will work on the Java version issue in a separate ticket.
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/146946211
Thanks for working on this Michael. I'll aim to get this committed this week.
A commit references this bug: Author: glewis Date: Sun Jun 14 01:21:50 UTC 2020 New revision: 538710 URL: https://svnweb.freebsd.org/changeset/ports/538710 Log: Fix the build with newer versions of Java PR: 244776 Submitted by: Michael Osipov <michael.osipov@siemens.com> Changes: head/sysutils/javaservicewrapper/Makefile head/sysutils/javaservicewrapper/files/ head/sysutils/javaservicewrapper/files/patch-build.xml