Bug 2062407
Summary: | msgfmt --java2 option doesn't work with java-17-openjdk | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jerry James <loganjerry> | ||||||
Component: | gettext | Assignee: | Sundeep Anand <suanand> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | rawhide | CC: | dueno, i18n-bugs, jjanco, mail, mtasaka, nphilipp, petersen, praiskup, suanand | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | gettext-0.21-13.fc37.0.20220203 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 2182696 2182697 (view as bug list) | Environment: | |||||||
Last Closed: | 2022-04-05 06:32:39 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 2024265, 2182696, 2182697 | ||||||||
Attachments: |
|
Description
Jerry James
2022-03-09 17:27:55 UTC
Created attachment 1866962 [details]
ar.po extracted from jmol source
So the simple reproducer for this is:
$ mock --verbose -r fedora-rawhide-x86_64 --uniqueext gettext-test --init
$ mock --verbose -r fedora-rawhide-x86_64 --uniqueext gettext-test --install java-devel gettext
$ mock --verbose -r fedora-rawhide-x86_64 --uniqueext gettext-test --copyin ./ar.po /builddir/build/BUILD
$ mock --verbose -r fedora-rawhide-x86_64 --uniqueext gettext-test --chroot -- msgfmt --statistics --java2 -l ar -d /builddir/build/BUILD/TMP -r org.jmol.translation.Jmol.ar.Messages /builddir/build/BUILD/ar.po
Then:
msgfmt: Java compiler not found, try installing gcj or set $JAVAC
msgfmt: compilation of Java class failed, please try --verbose or set $JAVAC
65 translated messages, 3 fuzzy translations, 380 untranslated messages.
DEBUG: Child return code was: 1
Created attachment 1866963 [details]
temtative patch to support jdk17
So this is actually msgfmt calls javac with "-source 1.5 -target 1.6" explicitly:
see gettext-tools/src/write-java.c "compile_java_class" call in "msgdomain_write_java" and related functions in gettext-tools/gnulib-lib/javacomp.c .
The attached patch is a draft for fixing this issue. Note that get_goodcode_snippet() and get_failcode_snippet() may need more adjustment: I guess get_goodcode_snippet() needs the code which compiles with JDK17 but fails with JDK11, however I don't know such code in detail.
Are there any updates here? I think all needed information is provided. Thank you very much, Tasaka-san! Sorry, Sundeep has been away on holiday for two weeks. I have added your patch to the rawhide branch. We have one more problem: currently gettext-0.21 FTBFS on F36+. So we have a git snapshot currently in Rawhide, but maybe we can use that for F36 now to address this. Can you try testing gettext-0.21-13.fc37.0.20220203 to see if it works for you? Yes, gettext-0.21-13.fc37.0.20220203 looks working. Thank you. *** Bug 2368701 has been marked as a duplicate of this bug. *** |