Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766102 - dev-java/swt-4.10 : not found in the JDK being used for compilation!
Summary: dev-java/swt-4.10 : not found in the JDK being used for compilation!
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Java team
: 859253 (view as bug list)
Depends on: 796320
  Show dependency tree
Reported: 2021-01-19 09:36 UTC by Toralf Förster
Modified: 2022-07-19 10:17 UTC (History)
2 users (show)

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

emerge-info.txt (emerge-info.txt,18.78 KB, text/plain)
2021-01-19 09:36 UTC, Toralf Förster
dev-java:swt-4.10:20210119-003405.log (dev-java:swt-4.10:20210119-003405.log,1.94 KB, text/plain)
2021-01-19 09:36 UTC, Toralf Förster
emerge-history.txt (emerge-history.txt,465.09 KB, text/plain)
2021-01-19 09:36 UTC, Toralf Förster
environment (environment,181.30 KB, text/plain)
2021-01-19 09:36 UTC, Toralf Förster
etc.portage.tar.bz2 (etc.portage.tar.bz2,33.36 KB, application/x-bzip)
2021-01-19 09:36 UTC, Toralf Förster
logs.tar.bz2 (logs.tar.bz2,2.11 KB, application/x-bzip)
2021-01-19 09:36 UTC, Toralf Förster
emerge --info dev-java/openjdk:8 (emerge-info.txt,10.16 KB, text/plain)
2021-07-22 10:03 UTC, nE0sIghT

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-01-19 09:36:23 UTC
 * ERROR: dev-java/swt-4.10::gentoo failed (compile phase):
 *   cannot build AWT library


  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-20210104-123916


gcc-config -l:
 [1] x86_64-pc-linux-gnu-10.2.0 *
clang version 11.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.9 (fallback)
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)
  [5]   pypy3 (fallback)
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-1.48.0 *
The following VMs are available for generation-2:
1)	OpenJDK 8.272_p10 [openjdk-8]
*)	AdoptOpenJDK 8.272_p10 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-8 
  [2]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.8.4

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Mon Jan 18 11:03:52 PM UTC 2021

emerge -qpvO dev-java/swt
[ebuild  N    ] dev-java/swt-4.10  USE="cairo opengl -webkit"
Comment 1 Toralf Förster gentoo-dev 2021-01-19 09:36:24 UTC
Created attachment 683668 [details]
Comment 2 Toralf Förster gentoo-dev 2021-01-19 09:36:25 UTC
Created attachment 683671 [details]
Comment 3 Toralf Förster gentoo-dev 2021-01-19 09:36:27 UTC
Created attachment 683674 [details]
Comment 4 Toralf Förster gentoo-dev 2021-01-19 09:36:29 UTC
Created attachment 683677 [details]
Comment 5 Toralf Förster gentoo-dev 2021-01-19 09:36:30 UTC
Created attachment 683680 [details]
Comment 6 Toralf Förster gentoo-dev 2021-01-19 09:36:31 UTC
Created attachment 683683 [details]
Comment 7 wolfgang 2021-05-04 02:00:29 UTC
Unable to duplicate this crash using the latest stable openjdk-bin-8.292_p10.

Also unable to reproduce with openjdk-bin-11.0.11_p9-r1
Comment 8 Larry the Git Cow gentoo-dev 2021-05-16 19:30:45 UTC
The bug has been referenced in the following commit(s):

commit 5a9c068b8c01c4806f2592527ec3465b403431ac
Author:     Wolfgang E. Sanyer <>
AuthorDate: 2021-05-03 19:34:20 +0000
Commit:     Miroslav Šulc <>
CommitDate: 2021-05-16 19:28:49 +0000

    dev-java/swt: update java dependencies
    Bug 766102 seems to be fixed with the latest stable openjdk-bin-8,
    however I think the bug remains open until the older open-jdk is removed
    from the tree.
    Signed-off-by: Wolfgang E. Sanyer <>
    Signed-off-by: Miroslav Šulc <>

 dev-java/swt/{swt-4.10.ebuild => swt-4.10-r1.ebuild} | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Comment 9 Arve Barsnes 2021-07-19 08:19:29 UTC
Getting the same error with dev-java/openjdk-8.292_p10.

Noticed there was a USE named 'headless-awt' which I tried to enable, but dev-java/swt requires virtual/jdk[-headless-awt] so no luck trying if that could fix this error. If I only enabled the USE flag on dev-java/openjdk, the virtual naturally pulls in openjdk-bin without the flag enabled.
Comment 10 Miroslav Šulc gentoo-dev 2021-07-19 08:22:50 UTC
the use flag must be disabled on the jdk that is used for compilation. otherwise the library is missing.
Comment 11 nE0sIghT 2021-07-22 10:03:12 UTC
Created attachment 725782 [details]
emerge --info dev-java/openjdk:8

I can confirm this with dev-java/openjdk-8.292_p10:

dev-java/openjdk-8.292_p10::gentoo was built with the following:
USE="alsa javafx jbootstrap pch source -cups -debug -doc -examples -headless-awt (-selinux)" ABI_X86="(64)"
Comment 12 Fizzbuzz3000 2021-07-25 22:50:46 UTC
I am having this issue too, using openjdk-bin-8.292_p10. I did some very minor digging, and apparently how is detected in dev-java/swt-4.10-r2 in src_compile() is vastly changed from dev-java/swt-4.10-r1, and is most likely the reason why it fails to compile. 

For the record, I can successfully compile and install swt-4.10-r1, but swt-4.10-r2 always fails with the "missing in JDK" error for me.
Comment 13 Miroslav Šulc gentoo-dev 2021-07-26 04:57:24 UTC
it's an issue with openjdk-8 and openjdk-bin-8, they have wrong LDPATH in /usr/share/java-config-2/vm/openjdk-8 (/usr/share/java-config-2/vm/openjdk-bin-8 respectively). i added an workaround to the latest swt and when testing it, it worked for me.
Comment 14 Volkmar W. Pogatzki 2022-07-19 10:11:58 UTC
*** Bug 859253 has been marked as a duplicate of this bug. ***
Comment 15 Volkmar W. Pogatzki 2022-07-19 10:15:11 UTC
Same error reported for dev-java/swt-4.10-r2. Bug #859253