Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766102 - dev-java/swt-4.10-r2 : libjawt.so not found in the JDK being used for compilation!
Summary: dev-java/swt-4.10-r2 : libjawt.so not found in the JDK being used for compil...
Status: RESOLVED FIXED
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:
: 859253 (view as bug list)
Depends on: 796320
Blocks:
  Show dependency tree
 
Reported: 2021-01-19 09:36 UTC by Toralf Förster
Modified: 2023-08-04 15:01 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.78 KB, text/plain)
2021-01-19 09:36 UTC, Toralf Förster
Details
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
Details
emerge-history.txt (emerge-history.txt,465.09 KB, text/plain)
2021-01-19 09:36 UTC, Toralf Förster
Details
environment (environment,181.30 KB, text/plain)
2021-01-19 09:36 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,33.36 KB, application/x-bzip)
2021-01-19 09:36 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,2.11 KB, application/x-bzip)
2021-01-19 09:36 UTC, Toralf Förster
Details
emerge --info dev-java/openjdk:8 (emerge-info.txt,10.16 KB, text/plain)
2021-07-22 10:03 UTC, nE0sIghT
Details

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
/usr/lib/llvm/11
11.0.1
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]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-01-19 09:36:25 UTC
Created attachment 683671 [details]
dev-java:swt-4.10:20210119-003405.log
Comment 3 Toralf Förster gentoo-dev 2021-01-19 09:36:27 UTC
Created attachment 683674 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-01-19 09:36:29 UTC
Created attachment 683677 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-01-19 09:36:30 UTC
Created attachment 683680 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-01-19 09:36:31 UTC
Created attachment 683683 [details]
logs.tar.bz2
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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a9c068b8c01c4806f2592527ec3465b403431ac

commit 5a9c068b8c01c4806f2592527ec3465b403431ac
Author:     Wolfgang E. Sanyer <ezzieyguywuf@gmail.com>
AuthorDate: 2021-05-03 19:34:20 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
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 <ezzieyguywuf@gmail.com>
    Bug: https://bugs.gentoo.org/766102
    Closes: https://github.com/gentoo/gentoo/pull/20608/commits/a3aa8f14d78b836333dbf2fc6ea8a983d296afcb
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 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 libawt.so 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 libawt.so 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
Comment 16 Volkmar W. Pogatzki 2023-03-19 08:58:25 UTC
Updating title (In reply to Volkmar W. Pogatzki from comment #15)
> Same error reported for dev-java/swt-4.10-r2. Bug #859253

Updating title.
Comment 17 Volkmar W. Pogatzki 2023-03-19 09:09:31 UTC
Closing this bug with reference to commit 49a1f153a7683d370c393f8faf8f5202c40fbdac Bug #859253
Comment 18 Toralf Förster gentoo-dev 2023-08-04 15:01:59 UTC
(In reply to Volkmar W. Pogatzki from comment #17)
> Closing this bug with reference to commit
> 49a1f153a7683d370c393f8faf8f5202c40fbdac Bug #859253

pls see bug 903107