You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Michel Lind <mi...@michel-slm.name> on 2024/11/09 00:51:27 UTC
Ivy 2.5.2 incompatibility with JDK 21 due to Pack200 removal
Dear Ivy developers,
(Apologies for not filing a JIRA issue yet - I just applied for an
account, and will file as soon as it's approved)
I'm a Fedora package maintainer, and as part of a long dependency chain
trying to get the Golang packages bootstrapped for the Extra Packages
for Enterprise Linux 10 repository, I need to get apache-ivy built
(This is the issue where the Golang and Java ecosystem meets -
golang-github-google-cel needs antlr4 to build:
https://bugzilla.redhat.com/show_bug.cgi?id=2324448)
Problem is, I discovered when I get to Apache Ivy that
- JDK 11 has just been retired in Rawhide (which will become Fedora 42
next spring) - https://src.fedoraproject.org/rpms/java-11-openjdk/c/eef5cae1618adf22b43adb9e243580e26aaab57c?branch=rawhide
- The only JDK in Fedora 42 and RHEL 10 is JDK 21
- Ivy does not compile with JDK 21 right now due to the removal of the
deprecated Pack200, per https://openjdk.org/jeps/336
```
[javac] /builddir/build/BUILD/apache-ivy-2.5.2-build/apache-ivy-2.5.2/src/java/org/apache/ivy/util/FileUtil.java:49: er
ror: cannot find symbol
[javac] import static java.util.jar.Pack200.newUnpacker;
[javac] ^
[javac] symbol: class Pack200
[javac] location: package java.util.jar
```
Is there a plan to replace Pack200 with something else?
Best regards,
--
_o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
Re: Ivy 2.5.2 incompatibility with JDK 21 due to Pack200 removal
Posted by Michel Lind <mi...@michel-slm.name>.
Hi Jaikiran,
On Sat, Nov 09, 2024 at 07:09:13AM +0530, Jaikiran Pai wrote:
> Hello Michel,
>
> I've approved your account creation. Please go ahead and create a JIRA
> issue. I suspect, as a minimum you would require a fix like the one below:
>
Thanks, I've filed https://issues.apache.org/jira/browse/IVY-1652
Trying your patch, I'll report back once I have tested it.
Best regards,
--
_o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
Re: Ivy 2.5.2 incompatibility with JDK 21 due to Pack200 removal
Posted by Jaikiran Pai <ja...@apache.org>.
Hello Michel,
I've approved your account creation. Please go ahead and create a JIRA
issue. I suspect, as a minimum you would require a fix like the one below:
diff --git a/build.properties b/build.properties
index 958dda11..f5c92fd9 100644
--- a/build.properties
+++ b/build.properties
@@ -44,7 +44,7 @@ checkstyle.report.dir=${reports.dir}/checkstyle
checkstyle.src.dir=${basedir}/src/etc/checkstyle
rat.report.dir=${reports.dir}/rat
-ivy.minimum.javaversion=1.8
+ivy.minimum.javaversion=8
debug.mode=on
ivy.api.reference=2.5.0
diff --git a/build.xml b/build.xml
index 25904c7e..c2cef291 100644
--- a/build.xml
+++ b/build.xml
@@ -185,8 +185,7 @@
<javac srcdir="${src.dir}"
destdir="${core.classes.build.dir}"
sourcepath=""
- source="${ivy.minimum.javaversion}"
- target="${ivy.minimum.javaversion}"
+ release="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="no">
<excludesfile name="ant.patterns"/>
@@ -221,8 +220,7 @@
destdir="${bootstrap.classes.build.dir}"
sourcepath=""
classpathref="build.bootstrap.classpath"
- source="${ivy.minimum.javaversion}"
- target="${ivy.minimum.javaversion}"
+ release="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="yes">
<includesfile name="ant.patterns"/>
@@ -241,8 +239,7 @@
destdir="${ant.classes.build.dir}"
sourcepath=""
classpathref="build.ant.classpath"
- source="${ivy.minimum.javaversion}"
- target="${ivy.minimum.javaversion}"
+ release="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="no">
<includesfile name="ant.patterns"/>
@@ -260,8 +257,7 @@
destdir="${optional.classes.build.dir}"
sourcepath=""
classpathref="build.optional.classpath"
- source="${ivy.minimum.javaversion}"
- target="${ivy.minimum.javaversion}"
+ release="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="no">
<includesfile name="optional.patterns"/>
@@ -371,8 +367,7 @@
<javac srcdir="${test.dir}"
destdir="${test.build.dir}"
classpathref="run.classpath"
- source="${ivy.minimum.javaversion}"
- target="${ivy.minimum.javaversion}"
+ release="${ivy.minimum.javaversion}"
debug="${debug.mode}"
encoding="UTF-8"
includeantruntime="no"/>
@@ -388,8 +383,7 @@
<javac srcdir="${basedir}/test/custom-classpath"
destdir="${build.dir}/custom-classpath"
classpathref="run.classpath"
- source="${ivy.minimum.javaversion}"
- target="${ivy.minimum.javaversion}"
+ release="${ivy.minimum.javaversion}"
debug="${debug.mode}"
includeantruntime="no"/>
<jar
destfile="${test.dir}/org/apache/ivy/core/settings/custom-resolver.jar"
I haven't tried any else than building the jar with this change.
-Jaikiran
On 09/11/24 6:21 am, Michel Lind wrote:
> Dear Ivy developers,
>
> (Apologies for not filing a JIRA issue yet - I just applied for an
> account, and will file as soon as it's approved)
>
> I'm a Fedora package maintainer, and as part of a long dependency chain
> trying to get the Golang packages bootstrapped for the Extra Packages
> for Enterprise Linux 10 repository, I need to get apache-ivy built
>
> (This is the issue where the Golang and Java ecosystem meets -
> golang-github-google-cel needs antlr4 to build:
> https://bugzilla.redhat.com/show_bug.cgi?id=2324448)
>
> Problem is, I discovered when I get to Apache Ivy that
>
> - JDK 11 has just been retired in Rawhide (which will become Fedora 42
> next spring) - https://src.fedoraproject.org/rpms/java-11-openjdk/c/eef5cae1618adf22b43adb9e243580e26aaab57c?branch=rawhide
> - The only JDK in Fedora 42 and RHEL 10 is JDK 21
> - Ivy does not compile with JDK 21 right now due to the removal of the
> deprecated Pack200, per https://openjdk.org/jeps/336
>
> ```
> [javac] /builddir/build/BUILD/apache-ivy-2.5.2-build/apache-ivy-2.5.2/src/java/org/apache/ivy/util/FileUtil.java:49: er
> ror: cannot find symbol
> [javac] import static java.util.jar.Pack200.newUnpacker;
> [javac] ^
> [javac] symbol: class Pack200
> [javac] location: package java.util.jar
> ```
>
> Is there a plan to replace Pack200 with something else?
>
> Best regards,
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org