Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689976 - dev-java/swt-* fails with dev-java/openjdk-11 due to libjawt.so search paths
Summary: dev-java/swt-* fails with dev-java/openjdk-11 due to libjawt.so search paths
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:
Depends on:
Blocks:
 
Reported: 2019-07-16 15:04 UTC by Mike Auty (RETIRED)
Modified: 2020-04-25 09:35 UTC (History)
2 users (show)

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


Attachments
add a new path (patch,527 bytes, patch)
2020-04-18 04:50 UTC, Anton Bolshakov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2019-07-16 15:04:23 UTC
I know that openjdk-11 is still masked for use as a gentoo-vm, but I've been testing it and haven't run into many problems at all, in fact, I think this is the first one.

In swt (all versions) there is the following check:

        if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then
                export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}"
        elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then
                export AWT_LIB_PATH="${JAVA_HOME}/jre/bin"
        elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then
                export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)"
        else
                eerror "${JAWTSO} not found in the JDK being used for compilation!"

Openjdk-11 doesn't seem to install a jre directory (I don't know if that's different to openjdk-bin-11, or something else, either way), so the first two are out.  The third option:

[[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]]

uses get_libdir, which on an amd64 system returns lib64, however, openjdk-11 installs directly under /usr/lib64/openjdk-11/lib/libjawt.so.

I have symlinked lib64 to lib under /usr/lib64/openjdk-11/ and that builds fine, what I'm not sure of it which package needs to change to accommodate the build (hence CCing both maintainers)?

Should openjdk actually store its files under lib64, or should the swt's get_libdir be changed?  Given that openjdk-bin-8 installs the following:

/usr/lib64/openjdk-8/jre/lib/amd64/libjawt.so
/usr/lib64/openjdk-8/lib/amd64/libjawt.so

it isn't clear that get_libdir would work any better there?

Either way, I thought I'd start the discussion/process of getting this resolved...  5:)
Comment 1 Georgy Yakovlev archtester gentoo-dev 2019-07-16 17:39:57 UTC
yeah, -11 changed installation paths a bit.

openjdk-11/lib is always lib, no matter of what arch/subarch etc.
also there is not x86 openjdk:11, but there is one for arm.

I guess we need another condition in swt, which will cover openjdk-bin:11 and openjdk:11.


basically [[ -f "${JAVA_HOME}/lib//${JAWTSO}" ]]
should do for all :11 slots.
Comment 2 Dennis Schridde 2019-09-29 13:54:23 UTC
(In reply to Georgy Yakovlev from comment #1)
> I guess we need another condition in swt, which will cover openjdk-bin:11
> and openjdk:11.
> 
> 
> basically [[ -f "${JAVA_HOME}/lib//${JAWTSO}" ]]
> should do for all :11 slots.

Are there plans to implement this?  Is something holding it back?
Comment 3 Willard Dawson 2020-01-28 02:41:40 UTC
dev-java/swt-4.10 still exhibits this behavior. Any plan to implement this?
Comment 4 Anton Bolshakov 2020-04-18 04:50:23 UTC
Created attachment 633438 [details, diff]
add a new path

as suggested. The patch is basic, can you check and push it please?
Comment 5 Larry the Git Cow gentoo-dev 2020-04-25 09:35:35 UTC
The bug has been closed via the following commit(s):

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

commit f239e95ecddb44dc379f9c12be10b0a36e2dd0c1
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-04-25 09:34:55 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-04-25 09:35:17 +0000

    dev-java/swt: add openjdk11 libjawt.so  path
    
    Closes: https://bugs.gentoo.org/689976
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-java/swt/swt-4.10.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)