On Fri, 26 Mar 2021 14:59:14 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:

>> The list of libraries doesn't seem to include xawt. Although I'd be 
>> astonished if it defined one since it links with awt.
>> 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 ?
>
>> 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:
> https://gcc.gnu.org/gcc-10/porting_to.html
> 
> 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

Probably it will be easy to remove this "jvm" variable in the jpeg library? 
Looks like it is used to call JNU_GetEnv, but the JNIEnv could be accessed from 
the first parameter of the jni method.

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

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

Reply via email to