[OpenJDK 2D-Dev] RFR: 8264047: Duplicate global variable 'jvm' in libjavajpeg and libawt

Severin Gehwolf sgehwolf at openjdk.java.net
Fri Mar 26 15:02:25 UTC 2021

On Fri, 26 Mar 2021 14:49:02 GMT, Phil Race <prr at openjdk.org> wrote:

> The list of libraries doesn't seem to include xawt.

Yes. This is in context of Graal VM's native images. AFAIK there is no full xawt support yet. This is about the conflict of libawt and libjavajpeg. There are probably more.

> But it also suggests you are only looking at one platform and perhaps that is because the problem is very specific
> to your toolchain ? Actually why are you seeing it now and it has not been a problem before ?

Yes. This is on Linux x86_64 and with an OpenJDK built with GCC 10+. With gcc 10+ `-fno-common` is default:

So the `libjavajpeg.a`, and `libawt.a` got compiled with `-fno-common`. Then when being linked into an executable together, the linker screams with this:

collect2: error: ld returned 1 exit status


PR: https://git.openjdk.java.net/jdk/pull/3155

More information about the 2d-dev mailing list