Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK21 build problem with gmake: Makefile contains '-source 1.7' and '-target 1.7' #532

Open
blacklion opened this issue Oct 25, 2023 · 3 comments

Comments

@blacklion
Copy link

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
Copy link
Author

I've checked, and build with -source 8 -target 8 works, though with warnings about future removal of these options too.

@xerial
Copy link
Owner

xerial commented Nov 23, 2023

Good cath. Targeting JDK8 should be no problem. Whenever you have time, I'd appreciate a PR for the fix.

@VVD
Copy link

VVD commented Jul 16, 2024

With this patch build for me too on OpenJDK 21.0.3+9.1, FreeBSD 14.1 amd64.

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Jul 26, 2024
In Java 21 compiler removed support for source and target 1.7 (7).

PR:		280316
Approved by:	Angelo Polo <language.devel@gmail.com>
Obtained from:	xerial/snappy-java#532
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants