From: Andrey Cherepanov <cas@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] Пакеты с java-21 и i586
Date: Mon, 1 Dec 2025 10:40:04 +0300
Message-ID: <b2acf45c-828e-4071-a8dc-19382618a8be@altlinux.org> (raw)
In-Reply-To: <a9365cdf-7d96-4e52-87d2-23c63b13b88a@altlinux.org>
30.11.2025 00:09, Ivan Khanas пишет:
> Всем привет! Возникла проблема с пакетами требующими java 21.
>
> Примером такого пакета является google-error-prone:
>
> https://packages.altlinux.org/en/sisyphus/srpms/google-error-prone
>
> Дело в том, что модули core и check_api требуют java 21 для
> компиляции, но в таком случае для них придется исключить i586.
> Если поступить таким образом, то, в таком случае во всех зависящих от
> них пакетов придется делать то же самое, и эта цепочка может быть в
> конечном итоге очень и очень длинной.
>
> Если пропатчив, понизить версию до java 17, то приходится использовать
> аргумент компилятора --enable-preview, тоесть добавлять в pom.xml для
> maven-compiler-plugin следующую конфигурацию:
>
> <compilerArgs>
> <arg>--enable-preview</arg>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
>
> <arg>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
>
> </compilerArgs>
>
> Но в таком случае, все зависящие пакеты придется патчить добавляя
> <arg>--enable-preview</arg> и пытаясь их откомпилировать под java 17.
>
> Причем порой это не помогает, примером может послужить проект
> google-java-format в котором в pom.xml используется:
>
> <compilerArgs>
> <arg>-Xplugin:ErrorProne</arg>
> <compilerArgs>
>
> и
>
> <annotationProcessorPaths>
> <path>
> <groupId>com.google.errorprone</groupId>
> <artifactId>error_prone_core</artifactId>
> <version>${errorprone.version}</version>
> </path>
> </annotationProcessorPaths>
>
> В таком случае, даже если добавить --enable-preview, и поставить
> jpackage-17-compat, то получим ошибку:
>
> [INFO] Compiling 47 source files with javac [debug target 17] to
> target/classes
> An exception has occurred in the compiler (17.0.17). Please file a bug
> against the Java compiler via the Java bug reporting page
> (https://bugreport.java.com) after checking the Bug Database
> (https://bugs.java.com) for duplicates. Include your program, the
> following diagnostic, and the parameters passed to the Java compiler
> in your report. Thank you.
> java.lang.UnsupportedClassVersionError: Preview features are not
> enabled for
> com/google/errorprone/bugpatterns/AbstractMustBeClosedChecker (class
> file version 61.65535). Try running with '--enable-preview'
>
> несмотря на:
>
> <source>17</source>
> <target>17</target>
>
> Исходя из этого, предлагаю пакеты, требующие java 21, собирать с java
> 21, а i586 исключать, создав макрос %java_arches, и в пакетах, в
> которых по той или иной причине потребуется исключить i586, прописывать:
>
> ExclusiveArch: %java_arches
> BuildArch: noarch
>
> В таком случае i586 исключается, а бинарные пакеты остаются noarch.
>
> Если кто-нибудь знает другое решение, то прошу озвучить его в этом
> чате. Буду очень благодарен. Всем спасибо за внимание!
>
> _______________________________________________
> Devel mailing list
> Devel@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/devel
Подождать бутстрап java-25-openjdk
--
Andrey Cherepanov
cas@altlinux.org
prev parent reply other threads:[~2025-12-01 7:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 21:09 Ivan Khanas
2025-11-30 11:36 ` Anton Farygin
2025-12-01 6:13 ` Sergey V Turchin
2025-11-30 11:36 ` Artem Semenov
2025-12-01 7:40 ` Andrey Cherepanov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2acf45c-828e-4071-a8dc-19382618a8be@altlinux.org \
--to=cas@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git