Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903107 - dev-java/java-config: depend-java-query ignores USE flag like '>=virtual/jdk-11:*[-headless-awt]'
Summary: dev-java/java-config: depend-java-query ignores USE flag like '>=virtual/jdk-...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 857816 908841 911323 (view as bug list)
Depends on:
Blocks: 801277 803650 859253 908841 911323
  Show dependency tree
 
Reported: 2023-03-26 08:48 UTC by Toralf Förster
Modified: 2024-02-24 08:30 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.26 KB, text/plain)
2023-03-26 08:48 UTC, Toralf Förster
Details
dev-java:swt-4.27:20230325-222807.log (dev-java:swt-4.27:20230325-222807.log,7.78 KB, text/plain)
2023-03-26 08:48 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,86.98 KB, text/plain)
2023-03-26 08:48 UTC, Toralf Förster
Details
environment (environment,144.55 KB, text/plain)
2023-03-26 08:48 UTC, Toralf Förster
Details
etc.clang.tar.bz2 (etc.clang.tar.bz2,911 bytes, application/x-bzip)
2023-03-26 08:48 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,16.90 KB, application/x-bzip)
2023-03-26 08:48 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,2.26 KB, application/x-bzip)
2023-03-26 08:48 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-03-26 08:48:00 UTC
'src/org/eclipse/swt/internal/SWTMessages_ar.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ar.properties'
'src/org/eclipse/swt/internal/SWTMessages.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages.properties'
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-java/swt-4.27/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-java/swt-4.27/work ...
 * libjawt.so not found in the JDK being used for compilation!
 * ERROR: dev-java/swt-4.27::gentoo failed (compile phase):
 *   cannot build AWT library

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-j4-20230324-230120

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 16.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/16/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/16
16.0.0
Python 3.10.10
Available Ruby profiles:
  [1]   ruby27 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.68.1
  [2]   rust-1.68.1 *
GENTOO_VM=openjdk-bin-17  CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-17.0.6_p10"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""
The following VMs are available for generation-2:
1)	OpenJDK 17.0.6_p10 [openjdk-17]
2)	OpenJDK 8.362_p09 [openjdk-8]
*)	Eclipse Temurin JDK 17.0.6_p10 [openjdk-bin-17]
4)	Eclipse Temurin JDK 8.362_p09 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-8 
  [2]   openjdk-17 
  [3]   openjdk-bin-8 
  [4]   openjdk-bin-17  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):

  HEAD of ::gentoo
commit e3efe858e37a0ab95b6c88ea4c25991157f26b94
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Mar 25 21:02:04 2023 +0000

    2023-03-25 21:02:04 UTC

emerge -qpvO dev-java/swt
[ebuild  N    ] dev-java/swt-4.27  USE="cairo opengl -doc -source -webkit"
Comment 1 Toralf Förster gentoo-dev 2023-03-26 08:48:02 UTC
Created attachment 859005 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-03-26 08:48:03 UTC
Created attachment 859007 [details]
dev-java:swt-4.27:20230325-222807.log
Comment 3 Toralf Förster gentoo-dev 2023-03-26 08:48:04 UTC
Created attachment 859009 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2023-03-26 08:48:06 UTC
Created attachment 859011 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-03-26 08:48:07 UTC
Created attachment 859013 [details]
etc.clang.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2023-03-26 08:48:08 UTC
Created attachment 859015 [details]
etc.portage.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2023-03-26 08:48:09 UTC
Created attachment 859017 [details]
logs.tar.bz2
Comment 8 Volkmar W. Pogatzki 2023-03-26 10:33:25 UTC
Updating title
Comment 9 Volkmar W. Pogatzki 2023-03-26 10:59:19 UTC
The only way to reproduce this error seems to be running:
USE=headless-awt emerge -1av openjdk-bin:17 swt
Comment 10 Volkmar W. Pogatzki 2023-04-24 06:59:11 UTC
Please add the steps needed to reproduce this error.
Comment 11 Toralf Förster gentoo-dev 2023-04-25 18:14:06 UTC
(In reply to Volkmar W. Pogatzki from comment #10)
> Please add the steps needed to reproduce this error.

The attached  etc.portage.tar.bz2 shows the used USE flags and the attached emerge history in which order the packages were emerged. Given the info in #comment0 - what is yet missing?
Comment 12 Volkmar W. Pogatzki 2023-04-25 19:03:21 UTC
(In reply to Toralf Förster from comment #11)
> (In reply to Volkmar W. Pogatzki from comment #10)
> > Please add the steps needed to reproduce this error.
> 
> The attached  etc.portage.tar.bz2 shows the used USE flags and the attached
> emerge history in which order the packages were emerged. Given the info in
> #comment0 - what is yet missing?

Missing is the emerge command leading to that error.
Using "emerge -avt openjdk-bin:17 swt" I cannot reproduce it. 
Prepending a USE= as mentioned in #9 is invalid.
Comment 13 Toralf Förster gentoo-dev 2023-04-25 22:04:49 UTC
(In reply to Volkmar W. Pogatzki from comment #12)
> (In reply to Toralf Förster from comment #11)
> > (In reply to Volkmar W. Pogatzki from comment #10)
> > > Please add the steps needed to reproduce this error.
> > 
> > The attached  etc.portage.tar.bz2 shows the used USE flags and the attached
> > emerge history in which order the packages were emerged. Given the info in
> > #comment0 - what is yet missing?
> 
> Missing is the emerge command leading to that error.
> Using "emerge -avt openjdk-bin:17 swt" I cannot reproduce it. 
> Prepending a USE= as mentioned in #9 is invalid.

Oh, it is simply "emerge --update dev-java/swt" (see https://github.com/toralf/tinderbox/blob/main/bin/job.sh#L900) - so the emerge default options of make.conf are the one :

EMERGE_DEFAULT_OPTS="--deep --verbose --verbose-conflicts --nospinner --quiet-build --tree --color=n --ask=n"
Comment 14 Volkmar W. Pogatzki 2023-04-25 23:28:24 UTC
Thanks for the information. 
It then is a question of why [-headless-awt] in the ebuild was not respected.
What is the output of "emerge -pvq virtual/jdk" after getting that error?

Is something wrong with this line? 
>=virtual/jdk-11:*[-headless-awt]

And, why didn't any of 3 stabilizations get that error?
Comment 15 Toralf Förster gentoo-dev 2023-04-26 18:09:56 UTC
(In reply to Volkmar W. Pogatzki from comment #14)
> What is the output of "emerge -pvq virtual/jdk" after getting that error?

$> emerge -pvq virtual/jdk
[ebuild   R   ] virtual/jdk-17  USE="-headless-awt"
Comment 16 Volkmar W. Pogatzki 2023-06-19 16:58:44 UTC
*** Bug 908841 has been marked as a duplicate of this bug. ***
Comment 17 Volkmar W. Pogatzki 2023-07-13 08:03:07 UTC
(In reply to Toralf Förster from comment #15)
> (In reply to Volkmar W. Pogatzki from comment #14)
> > What is the output of "emerge -pvq virtual/jdk" after getting that error?
> 
> $> emerge -pvq virtual/jdk
> [ebuild   R   ] virtual/jdk-17  USE="-headless-awt"

Found in etc/portage/package.use/24thrown_package_use_flags from attachment 859015 [details]:
dev-java/openjdk-bin                 headless-awt source

Looks to me like your test environment did not respect the [-headless-awt] requirement from the ebuild:

DEPEND="${COMMON_DEP}
	>=virtual/jdk-11:*[-headless-awt]
	x11-base/xorg-proto
	x11-libs/libX11
	x11-libs/libXrender
	x11-libs/libXt
	x11-libs/libXtst"
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-28 07:45:31 UTC
There's multiple JDKs installed. Are you sure the eclass actually chooses the right one?
Comment 19 Toralf Förster gentoo-dev 2023-07-28 08:07:54 UTC
(In reply to Sam James from comment #18)
> There's multiple JDKs installed. Are you sure the eclass actually chooses
> the right one?

ick, not really, currently I do have:

/var/tmp/tb $> eselect java-vm list
Available Java Virtual Machines:
  [1]   openjdk-8 
  [2]   openjdk-17 
  [3]   openjdk-bin-8 
  [4]   openjdk-bin-17  system-vm

(~/img/17.1_desktop_plasma-20230725-225004)
/var/tmp/tb $> grep awt /etc/portage/package.use/*
/etc/portage/package.use/24thrown_package_use_flags:dev-java/icedtea                     -cacao cups headless-awt jamvm jbootstrap -kerberos pch sctp -shenandoah -smartcard system-lcms -zero
/etc/portage/package.use/24thrown_package_use_flags:dev-java/openjdk-bin                 headless-awt source
/etc/portage/package.use/24thrown_package_use_flags:dev-java/openjdk-jre-bin             -headless-awt
(~/img/17.1_desktop_plasma-20230725-225004)
/var/tmp/tb $> eselect java-vm show
Current system-vm
  openjdk-bin-17
Current user-vm
  (unset)
(~/img/17.1_desktop_plasma-20230725-225004)
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-28 08:11:59 UTC
(In reply to Toralf Förster from comment #19)
> (In reply to Sam James from comment #18)
> > There's multiple JDKs installed. Are you sure the eclass actually chooses
> > the right one?
> 
> ick, not really, currently I do have:
> 

When you filed the bug, above, you had:


The following VMs are available for generation-2:
1)	OpenJDK 17.0.6_p10 [openjdk-17]
2)	OpenJDK 8.362_p09 [openjdk-8]
*)	Eclipse Temurin JDK 17.0.6_p10 [openjdk-bin-17]
4)	Eclipse Temurin JDK 8.362_p09 [openjdk-bin-8]

(this is not your fault)

There's two OpenJDK 17s. It's possible one of them has headless and one doesn't, and the eclass might choose the wrong one.
Comment 21 Toralf Förster gentoo-dev 2023-07-28 08:19:09 UTC
indeed
Comment 22 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-28 08:21:16 UTC
The bug is OK, the eclass/ebuild is broken with its detection.
Comment 23 Volkmar W. Pogatzki 2023-08-04 15:44:04 UTC
(In reply to Sam James from comment #22)
> The bug is OK, the eclass/ebuild is broken with its detection.

Cannot reproduce, whatever I try. May we pls have the build log with ECLASS_DEBUG_OUTPUT=on
Comment 24 Toralf Förster gentoo-dev 2023-08-05 16:48:41 UTC
(In reply to Volkmar W. Pogatzki from comment #23)
> (In reply to Sam James from comment #22)
> > The bug is OK, the eclass/ebuild is broken with its detection.
> 
> Cannot reproduce, whatever I try. May we pls have the build log with
> ECLASS_DEBUG_OUTPUT=on

~ $> eselect java-vm list
Available Java Virtual Machines:
  [1]   openjdk-8 
  [2]   openjdk-17 
  [3]   openjdk-bin-8 
  [4]   openjdk-bin-17  system-vm


(~/img/17.1_desktop_plasma-20230725-225004)
~ $> emerge --update dev-java/swt -p

These are the packages that would be merged, in reverse order:

Calculating dependencies  ..... done!
Dependency resolution took 19.72 s.

[ebuild  N     ] dev-java/swt-4.10-r2:4.10::gentoo  USE="cairo opengl (-webkit)" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB
(~/img/17.1_desktop_plasma-20230725-225004)
~ $> grep swt /etc/portage/package.*/*
/etc/portage/package.mask/self:=dev-java/swt-4.28-r1
/etc/portage/package.mask/self:=dev-java/swt-4.27
(~/img/17.1_desktop_plasma-20230725-225004)
~ $> sed -i -e 's/swt-4.2/d' /etc/portage/package.mask/self
sed: -e expression #1, char 11: unterminated `s' command
(~/img/17.1_desktop_plasma-20230725-225004)
~ $> sed -i -e '/swt-4.2/d' /etc/portage/package.mask/self
(~/img/17.1_desktop_plasma-20230725-225004)
~ $> emerge --update dev-java/swt -a

These are the packages that would be merged, in reverse order:

Calculating dependencies  ... done!
Dependency resolution took 14.77 s.

[ebuild  N     ] dev-java/swt-4.28-r1:4.27::gentoo  USE="cairo opengl source -doc -webkit" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] 
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-java/swt-4.28-r1::gentoo
>>> Failed to emerge dev-java/swt-4.28-r1, Log file:
>>>  '/var/log/portage/dev-java:swt-4.28-r1:20230805-164800.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 23.3, 22.3, 23.1
 * Package:    dev-java/swt-4.28-r1:4.27
 * Repository: gentoo
 * Maintainer: java@gentoo.org
 * Upstream:   https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform%38component=SWT
 * USE:        abi_x86_64 amd64 cairo elibc_glibc kernel_linux opengl source
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
debug:   eclass exists: /var/db/repos/gentoo/eclass/flag-o-matic.eclass
debug: inherit: flag-o-matic -> /var/db/repos/gentoo/eclass/flag-o-matic.eclass
debug: *** Multiple Inheritance (Level: 2)
debug:   eclass exists: /var/db/repos/gentoo/eclass/toolchain-funcs.eclass
debug: inherit: toolchain-funcs -> /var/db/repos/gentoo/eclass/toolchain-funcs.eclass
debug: *** Multiple Inheritance (Level: 3)
debug:   eclass exists: /var/db/repos/gentoo/eclass/multilib.eclass
debug: inherit: multilib -> /var/db/repos/gentoo/eclass/multilib.eclass
debug: *** Multiple Inheritance (Level: 4)
debug:   eclass exists: /var/db/repos/gentoo/eclass/toolchain-funcs.eclass
debug: inherit: toolchain-funcs -> /var/db/repos/gentoo/eclass/toolchain-funcs.eclass
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-pkg-2.eclass
debug: inherit: java-pkg-2 -> /var/db/repos/gentoo/eclass/java-pkg-2.eclass
debug: *** Multiple Inheritance (Level: 2)
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: inherit: java-utils-2 -> /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: EXPORT_FUNCTIONS: pkg_setup -> java-pkg-2_pkg_setup
debug: EXPORT_FUNCTIONS: src_prepare -> java-pkg-2_src_prepare
debug: EXPORT_FUNCTIONS: src_compile -> java-pkg-2_src_compile
debug: EXPORT_FUNCTIONS: pkg_preinst -> java-pkg-2_pkg_preinst
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-pkg-simple.eclass
debug: inherit: java-pkg-simple -> /var/db/repos/gentoo/eclass/java-pkg-simple.eclass
debug: *** Multiple Inheritance (Level: 2)
debug:   eclass exists: /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: inherit: java-utils-2 -> /var/db/repos/gentoo/eclass/java-utils-2.eclass
debug: EXPORT_FUNCTIONS: src_compile -> java-pkg-simple_src_compile
debug: EXPORT_FUNCTIONS: src_install -> java-pkg-simple_src_install
debug: EXPORT_FUNCTIONS: src_test -> java-pkg-simple_src_test
debug:   eclass exists: /var/db/repos/gentoo/eclass/toolchain-funcs.eclass
debug: inherit: toolchain-funcs -> /var/db/repos/gentoo/eclass/toolchain-funcs.eclass
debug: java-pkg_init: entering function, parameters: 
debug: java-pkg_switch-vm: entering function, parameters: 
debug: java-pkg_needs-vm: entering function, parameters: 
debug: depend-java-query:  NV_DEPEND:
        app-accessibility/at-spi2-core:2
        dev-libs/glib
        x11-libs/gtk+:3
        x11-libs/libXtst
        cairo? ( x11-libs/cairo )
        opengl? (
                virtual/glu
                virtual/opengl
        )
        webkit? (
                net-libs/webkit-gtk:4.1
        )
        >=virtual/jdk-11:*[-headless-awt]
        x11-base/xorg-proto
        x11-libs/libX11
        x11-libs/libXrender
        x11-libs/libXt
        x11-libs/libXtst >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
debug: Using: openjdk-bin-17
debug: java-pkg_setup-vm: entering function, parameters: 
debug: java-pkg_get-vm-vendor: entering function, parameters: 
debug: java-pkg_javac-args: entering function, parameters: 
debug: want source: 1.8
debug: want target: 1.8
debug: java-pkg_append_: entering function, parameters: LD_LIBRARY_PATH /opt/openjdk-bin-17.0.7_p7/lib/:/opt/openjdk-bin-17.0.7_p7/lib/server/
 * Using: openjdk-bin-17
>>> Unpacking source...
>>> Unpacking swt-4.28-gtk-linux-x86_64.zip to /var/tmp/portage/dev-java/swt-4.28-r1/work
>>> Unpacking ./src.zip to /var/tmp/portage/dev-java/swt-4.28-r1/work
>>> Source unpacked in /var/tmp/portage/dev-java/swt-4.28-r1/work
>>> Preparing source in /var/tmp/portage/dev-java/swt-4.28-r1/work ...
 * Applying swt-4.27-as-needed-and-flag-fixes.patch ...
patching file make_linux.mak
Hunk #1 succeeded at 99 with fuzz 2 (offset 1 line).
 [ ok ]
Archive:  swt.jar
  inflating: resources/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css  
  inflating: resources/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css  
  inflating: resources/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css  
./swt.jar
src -> resources/src
src/org -> resources/src/org
src/org/eclipse -> resources/src/org/eclipse
src/org/eclipse/swt -> resources/src/org/eclipse/swt
src/org/eclipse/swt/internal -> resources/src/org/eclipse/swt/internal
'src/org/eclipse/swt/internal/SWTMessages_zh_TW.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_zh_TW.properties'
'src/org/eclipse/swt/internal/SWTMessages_zh.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_zh.properties'
'src/org/eclipse/swt/internal/SWTMessages_uk.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_uk.properties'
'src/org/eclipse/swt/internal/SWTMessages_tr.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_tr.properties'
'src/org/eclipse/swt/internal/SWTMessages_th.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_th.properties'
'src/org/eclipse/swt/internal/SWTMessages_sv.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_sv.properties'
'src/org/eclipse/swt/internal/SWTMessages_sr.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_sr.properties'
'src/org/eclipse/swt/internal/SWTMessages_sl.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_sl.properties'
'src/org/eclipse/swt/internal/SWTMessages_sk.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_sk.properties'
'src/org/eclipse/swt/internal/SWTMessages_ru.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ru.properties'
'src/org/eclipse/swt/internal/SWTMessages_ro.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ro.properties'
'src/org/eclipse/swt/internal/SWTMessages_pt_BR.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_pt_BR.properties'
'src/org/eclipse/swt/internal/SWTMessages_pt.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_pt.properties'
'src/org/eclipse/swt/internal/SWTMessages_pl.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_pl.properties'
'src/org/eclipse/swt/internal/SWTMessages_no.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_no.properties'
'src/org/eclipse/swt/internal/SWTMessages_nl.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_nl.properties'
'src/org/eclipse/swt/internal/SWTMessages_mn.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_mn.properties'
'src/org/eclipse/swt/internal/SWTMessages_ml.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ml.properties'
'src/org/eclipse/swt/internal/SWTMessages_lv.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_lv.properties'
'src/org/eclipse/swt/internal/SWTMessages_lt.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_lt.properties'
'src/org/eclipse/swt/internal/SWTMessages_ku.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ku.properties'
'src/org/eclipse/swt/internal/SWTMessages_ko.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ko.properties'
'src/org/eclipse/swt/internal/SWTMessages_ja.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ja.properties'
'src/org/eclipse/swt/internal/SWTMessages_iw.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_iw.properties'
'src/org/eclipse/swt/internal/SWTMessages_it.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_it.properties'
'src/org/eclipse/swt/internal/SWTMessages_id.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_id.properties'
'src/org/eclipse/swt/internal/SWTMessages_hu.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_hu.properties'
'src/org/eclipse/swt/internal/SWTMessages_hi.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_hi.properties'
'src/org/eclipse/swt/internal/SWTMessages_fr.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_fr.properties'
'src/org/eclipse/swt/internal/SWTMessages_fi.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_fi.properties'
'src/org/eclipse/swt/internal/SWTMessages_fa.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_fa.properties'
'src/org/eclipse/swt/internal/SWTMessages_eu.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_eu.properties'
'src/org/eclipse/swt/internal/SWTMessages_et.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_et.properties'
'src/org/eclipse/swt/internal/SWTMessages_es.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_es.properties'
'src/org/eclipse/swt/internal/SWTMessages_en_CA.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_en_CA.properties'
'src/org/eclipse/swt/internal/SWTMessages_el.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_el.properties'
'src/org/eclipse/swt/internal/SWTMessages_de.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_de.properties'
'src/org/eclipse/swt/internal/SWTMessages_da.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_da.properties'
'src/org/eclipse/swt/internal/SWTMessages_cs.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_cs.properties'
'src/org/eclipse/swt/internal/SWTMessages_bg.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_bg.properties'
'src/org/eclipse/swt/internal/SWTMessages_ar.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages_ar.properties'
'src/org/eclipse/swt/internal/SWTMessages.properties' -> 'resources/src/org/eclipse/swt/internal/SWTMessages.properties'
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-java/swt-4.28-r1/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-java/swt-4.28-r1/work ...
 * libjawt.so not found in the JDK being used for compilation!
 * ERROR: dev-java/swt-4.28-r1::gentoo failed (compile phase):
 *   cannot build AWT library
 * 
 * Call stack:
 *     ebuild.sh, line 136:  Called src_compile
 *   environment, line 3537:  Called die
 * The specific snippet of code:
 *           die "cannot build AWT library";
 * 
 * If you need support, post the output of `emerge --info '=dev-java/swt-4.28-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/swt-4.28-r1::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=openjdk-bin-17  CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-17.0.7_p7"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""
and of course, the output of emerge --info =swt-4.28
 * The complete build log is located at '/var/log/portage/dev-java:swt-4.28-r1:20230805-164800.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-java/swt-4.28-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/swt-4.28-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-java/swt-4.28-r1/work'
 * S: '/var/tmp/portage/dev-java/swt-4.28-r1/work'

(~/img/17.1_desktop_plasma-20230725-225004)
Comment 25 Volkmar W. Pogatzki 2023-09-15 20:01:50 UTC
(In reply to Sam James from comment #20)
(In reply to Toralf Förster from comment #24)

Thanks Sam for pointing us to the eclass and Toralf for adding the debug output.
It looks to me like something in java-utils-2.eclass function java-pkg_switch-vm is wrong.
Sorry for causing confusion with my previous comments.
Comment 26 Nuno Silva 2023-09-16 08:30:33 UTC
I think this is happening in depend-java-query, which is called by the eclass to process the jdk dependency.

Running "depend-java-query  -P '>=virtual/jdk-11:*[-headless-awt]'" results in

    >=virtual/jdk-11

Which suggests the USE flag part is being ignored. For confirmation, perhaps the following in an affected system will confirm (or reject) this:

    depend-java-query  --get-vm '>=virtual/jdk-11:*[-headless-awt]'
Comment 27 Nuno Silva 2023-09-16 08:34:27 UTC
Ah yes, as I mentioned on IRC yesterday: this probably also affects media-libs/libjpeg-turbo (when USE=java) and sci-libs/gdal (also when USE=java).
Comment 28 Volkmar W. Pogatzki 2023-09-29 12:25:23 UTC
*** Bug 911323 has been marked as a duplicate of this bug. ***
Comment 29 Volkmar W. Pogatzki 2024-02-16 08:05:17 UTC
*** Bug 857816 has been marked as a duplicate of this bug. ***