Clang 19 has a number of new warnings, and because java/openjdk17
compiles with -Werror by default, it results in errors similar to:
/wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.12-7-1/src/hotspot/os/posix/signals_posix.cpp:1681:20: error: cast from 'void (*)(int, siginfo_t *, ucontext_t *)' (aka 'void (*)(int, __siginfo *, __ucontext *)') to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
1681 | act.sa_handler = (void (*)(int)) SR_handler;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
I propose to disable warnings-as-errors for this port, similar to what
is already done for openjdk8 and openjdk11. It does not make sense to
have this on by default, unless you are an upstream maintainer.
PR: 280561
Approved by: glewis (maintainer)
MFH: 2024Q3
Clang 19 is now more strict about undefined integral expressions used as
constants in enum, which results in errors compiling java/openjdk11,
similar to:
/wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.24-8-1/src/jdk.pack/share/native/common-unpack/constants.h:206:33: error: expression is not an integral constant expression
206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
| ^~~~~~~~
/wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.24-8-1/src/jdk.pack/share/native/common-unpack/constants.h:206:37: note: left shift of negative value -1
206 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
| ^
Replace the negative value with ~0u to fix this error.
PR: 280560
Approved by: glewis (maintainer)
MFH: 2024Q3
Clang 19 is now more strict about undefined integral expressions used as
constants in enum, which results in errors compiling java/openjdk8,
similar to:
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/share/vm/oops/cpCache.hpp:195:34: error: expression is not an integral constant expression
195 | option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/share/vm/oops/cpCache.hpp:195:42: note: left shift of negative value -1
195 | option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask))
| ^
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/share/vm/code/dependencies.hpp:173:27: error: expression is not an integral constant expression
173 | all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/hotspot/src/share/vm/code/dependencies.hpp:173:59: note: left shift of negative value -1
173 | all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE),
| ^
In file included from /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/jdk/src/share/native/com/sun/java/util/jar/pack/bands.cpp:43:
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h:226:33: error: expression is not an integral constant expression
226 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
| ^~~~~~~~
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u422-b05.1/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h:226:37: note: left shift of negative value -1
226 | AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use.
| ^
In openjdk11 and later, the (-1) constants have been replaced by the
unsigned variant (~0u), which fixes these errors.
PR: 280559
Approved by: glewis (maintainer)
MFH: 2024Q3
Segfaults are no longer observed with current versions of LLVM 17 and 18
in base 13.3 and 14.1, so there is no need to pull such an old version
from ports to build.
For example build java/openjdk11 with LLVM from base and then build
java/eclipse and java/openjfx14 using java/openjdk11: build and run
without errors.
PR: 280056 260319
Approved by: java (maintainer, timeout 14 days)
Thanks again to jbeich for noticing various things I overlooked.
Reviewed by: acm, ashish, eduardo, ehaupt, eugen, jbeich, martymac, mat, nobukata, sunpoet, tagattie, yuri, arrowd, kde
Differential Revision: https://reviews.freebsd.org/D45141
Build error with OpenJDK 21:
[javac] /wrkdirs/usr/ports/java/apache-commons-collections/work/commons-collections-3.2.2-src/src/java/org/apache/commons/collections/CursorableLinkedList.java:188: error: addLast(Object) in CursorableLinkedList cannot implement addLast(E) in List
[javac] public boolean addLast(Object o) {
[javac] ^
[javac] return type boolean is not compatible with void
[javac] where E is a type-variable:
[javac] E extends Object declared in interface List
[javac] /wrkdirs/usr/ports/java/apache-commons-collections/work/commons-collections-3.2.2-src/src/java/org/apache/commons/collections/CursorableLinkedList.java:176: error: addFirst(Object) in CursorableLinkedList cannot implement addFirst(E) in List
[javac] public boolean addFirst(Object o) {
[javac] ^
[javac] return type boolean is not compatible with void
[javac] where E is a type-variable:
[javac] E extends Object declared in interface List
New JDK 21 methods in java.util.List addFirst and addLast has a void
return type. This clashes with the existing boolean return from the
same method in AbstractLinkedList.
Upstream fixed this in 4.5.0 only. But this old 3.x branch isn't fixed.
Upstream issue: https://issues.apache.org/jira/browse/COLLECTIONS-842
PR: 279425
Reported by: antoine (exp-run)
Error: failed /wrkdirs/usr/ports/java/openjdk22/work/jdk22-jdk-22-36-1/build/bsd-ppc64le-server-release/jdk/lib/server/libjvm.so, because /wrkdirs/usr/ports/java/openjdk22/work/jdk22-jdk-22-36-1/build/bsd-ppc64le-server-release/jdk/lib/server/libjvm.so: Undefined symbol "_ZN2os27current_stack_base_and_sizeEPPhPm"
2024-03-31 java/sablevm-classpath: Only user in tree is java/sablevm which is deprecated
2024-03-31 java/sablevm: Abandonware, last release in 2007 and is no longer being developed
devel/maven and devel/maven39 do not provide mvn(1) from LOCALBASE that
one comes from devel/maven-wrapper instead. Therefore, one should depend
on the package rather than a non-existing executable/script.
Approved by: jrm (mentor), otis (mentor), vvd
Differential Revision: https://reviews.freebsd.org/D44229
Apart from the share/man move, the plist fix was not correct:
pkg-static: Unable to access file /wrkdirs/usr/ports/java/intellij/work/stage/usr/local/share/intellij/lib/commons-lang3-3.11.jar:No such file or directory
The above listed file has nothing to do with Python. Additional
files added were also incorrect. Packaging fails as a result.
The share/man move will be restored in a later commit after getting
some sleep.
This reverts commit e71303202a.
When LTS version of Subversion is set in make.conf (WITH_SUBVERSION_VER)
depending ports will still depend on latest version (devel/subversion)
instead of LTS one (devel/subversion-lts). This will cause dependency
conflicts when packages are distributed with Poudriere, namely pkg(8)
will report them and fail to install.
Make all affected ports properly depend on the right port based on the
value set in WITH_SUBVERSION_VER.
Approved by: jrm (mentor), otis (mentor), lev (maintainer timeout)
Differential Revision: https://reviews.freebsd.org/D43864