Open kristofdho opened 1 year ago
good remark. Our static libs should not expose javaVM (or any other symbol that is not strictly needed by other code not in that library)
@johanvos do you have any idea for a potential timeline for a fix? I'm assuming this would then also be included in a future 17.x.x version? It's not that urgent for us yet, but this is currenty blocking our linux deployments.
@johanvos Any update on this?
[Sat Feb 03 00:29:55 UTC 2024][INFO] [SUB] /usr/bin/ld: /home/runner/.gluon/substrate/javafxStaticSdk/21-ea+11.1/linux-x86_64/sdk/lib/libglassgtk3.a(glass_general.obj):(.bss.javaVM+0x0): multiple definition of `javaVM'; /opt/hostedtoolcache/graalvm-ce-java17-linux/22.1.0/x64/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/liblcms.a(LCMS.o):(.bss.javaVM+0x0): first defined here
Still an issue with latest substrate (using JFX "21-ea+11.1"). I notice this when using linkerArg:
${env.GRAALVM_HOME}/lib/static/linux-amd64/glibc/libjaas.a
which, was a solution @jperedadnr recommended here (and somewhere else):
https://stackoverflow.com/questions/73606094/graalvm-library-is-not-linking-in-linux-mint
Firstly, this should be included by default (and working obviously), IMO.
It's listed here ("'jaas"):
... but that's completely ignored by the superclass, which uses its own list (curiously omitting jaas):
... can someone elaborate on why this isn't fixed or if it can be easily?
I noticed this error was only happening for me on Github runners, and I investigated why. I was using an official GraalVM 21.1.0, not Gluon's 21.1.0.1-Final (which is what I was using locally where the problem did not occur). I didn't even know you guys had a Github action to download your GraalVM builds -- some documentation/sampless refer to the official GraalVM builds when it comes to Github workflows, if I recall.
Anyway, the next question is...what's the difference...? I would have expected this problem to exist in both.
Problematic build, you can see "B" meaning global/static:
credmond@UM790:~/.jdks$ nm /home/credmond/.jdks/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/liblcms.a | grep javaVM
0000000000000000 B javaVM
Gluon's build:
credmond@UM790:~/.jdks$ nm /home/credmond/.jdks/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/lib/static/linux-amd64/glibc/liblcms.a | grep javaVM
0000000000000008 C javaVM
I don't really know where this came from exactly, or why that might be the case.
There seems to be a symbol conflict between
libglassgtk3.a
andliblcms.a
. Happens both with<javafxStaticSdkVersion>17.0.2</...>
and without specifying it, which defaults to20-ea+7
.Expected Behavior
linking succeeds
Current Behavior
linker error
multiple definition of 'javaVM'
:Steps to Reproduce
run
mvn package
in the project defined by these pom and java files:pom.xml
```xmlorg.example.Main
```java package org.example; import java.awt.*; import java.awt.color.ColorSpace; public class Main { public static void main(String[] args) { Color color = new Color( ColorSpace.getInstance(ColorSpace.CS_sRGB), new float[]{1.0f, 1.0f, 1.0f}, 1.0f ); System.out.println(color); } } ```Your Environment