JDK21 build problem with gmake: Makefile contains '-source 1.7' and '-target 1.7'
blacklion opened this issue · 3 comments
blacklion commented
Makefile
still contains:
$(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class: $(SRC)/org/xerial/snappy/SnappyNative.java
@mkdir -p $(TARGET)/jni-classes
$(JAVAC) -source 1.7 -target 1.7 -h $(SRC)/org/xerial/snappy/ -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
$(SRC)/org/xerial/snappy/SnappyNative.h: $(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class
$(TARGET)/jni-classes/org/xerial/snappy/BitShuffleNative.class: $(SRC)/org/xerial/snappy/BitShuffleNative.java
@mkdir -p $(TARGET)/jni-classes
$(JAVAC) -source 1.7 -target 1.7 -h $(SRC)/org/xerial/snappy/ -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
It fails with JDK21, as 1.7
is deprecated.
blacklion commented
I've checked, and build with -source 8 -target 8
works, though with warnings about future removal of these options too.
xerial commented
Good cath. Targeting JDK8 should be no problem. Whenever you have time, I'd appreciate a PR for the fix.
VVD commented
With this patch build for me too on OpenJDK 21.0.3+9.1, FreeBSD 14.1 amd64.