JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.15k stars 1.17k forks source link

Getting java.lang.UnsatisfiedLinkError -> undefined symbol: XResourceManagerString on Ubuntu Destkop #1621

Closed james-darko closed 1 month ago

james-darko commented 2 years ago

I'm trying to test out Compose for Desktop and can't get a hello world working. The error occurs with the IDEA templates and the Widget Gallery example. I get the below stack trace when the init application function is called when running ./gradlew run or ./gradlew :desktop:run.

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/james/.skiko/0abc71ef089e7f171afebee6b0336c127de941e85dbe17ea2220eaed64f34153/libskiko-linux-x64.so: /home/james/.skiko/0abc71ef089e7f171afebee6b0336c127de941e85dbe17ea2220eaed64f34153/libskiko-linux-x64.so: undefined symbol: XResourceManagerString at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:384) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:228) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:170) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389) at java.base/java.lang.Runtime.load0(Runtime.java:755) at java.base/java.lang.System.load(System.java:1953) at org.jetbrains.skiko.Library.loadLibraryOrCopy(Library.kt:20) at org.jetbrains.skiko.Library.findAndLoad(Library.kt:108) at org.jetbrains.skiko.Library.load(Library.kt:59) at org.jetbrains.skia.impl.Library$Companion.staticLoad(Library.jvm.kt:12) at androidx.compose.ui.ConfigureSwingGlobalsForCompose_desktopKt.configureSwingGlobalsForCompose(ConfigureSwingGlobalsForCompose.desktop.kt:49) at androidx.compose.ui.ConfigureSwingGlobalsForCompose_desktopKt.configureSwingGlobalsForCompose$default(ConfigureSwingGlobalsForCompose.desktop.kt:38) at androidx.compose.ui.window.Application_desktopKt.application(Application.desktop.kt:111) at androidx.compose.ui.window.Application_desktopKt.application$default(Application.desktop.kt:105) at MainKt.main(Main.kt:28) at MainKt.main(Main.kt)

I'm running Ubuntu 20.04 and tried various v11 and v17 JDKs.

Let me know if there's any further info that might be of help.

Since 'X' is in the error, I figure that could be something X11 related.

Running ps -e | grep tty gives the below output.

6184 tty2 00:00:00 gdm-x-session
6186 tty2 00:00:43 Xorg1
6199 tty2 00:00:00 gnome-session-b

akurasov commented 2 years ago

Could you try it with the build 1.1.0-alpha1-dev550 ? We did some changes regarding X11 there.

james-darko commented 2 years ago

Hi,

Thanks for looking into it. I tried the version you mentioned and am still getting the same crash on Ubuntu. I switched to Windows 11 on this project for the time being. Having no issues there.

james-darko commented 2 years ago

I upgraded to Ubuntu 21.10, and it's now working with no major issues. I never worked out the problem but I thought I'd let you know. Perhaps it was something broken with my os install.

akurasov commented 2 years ago

Thank you! Does it work with 1.0.1 now?

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.