TeamWizardry / LibrarianLib

A library for the TeamWizardry mods
GNU Lesser General Public License v3.0
26 stars 21 forks source link

CI-built jar only includes linux yoga natives #150

Closed Bluexin closed 3 years ago

Bluexin commented 4 years ago

https://github.com/TeamWizardry/LibrarianLib/blob/05dec695cc04c3810a9a8454ded4b5deeb304b66/modules/facade/build.gradle#L2-L12 along with https://github.com/TeamWizardry/LibrarianLib/blob/05dec695cc04c3810a9a8454ded4b5deeb304b66/modules/facade/build.gradle#L24-L26 mean only natives for the OS used for the build will get included. In dev liblib workspaces this is okay, but for the published jars it's not great.

Bluexin commented 4 years ago

And even once natives are present, native method lookup fails because of the shading (see crash)

java.lang.UnsatisfiedLinkError: ll.org.lwjgl.util.yoga.Yoga.YGConfigNew()J
    at ll.org.lwjgl.util.yoga.Yoga.YGConfigNew(Native Method) ~[librarianlib-facade-1.15-SNAPSHOT.jar:5.0.0a2] {re:classloading}
    at com.teamwizardry.librarianlib.facade.layer.GuiLayer.<clinit>(GuiLayer.kt:1740) ~[librarianlib-facade-1.15-SNAPSHOT.jar:5.0.0a2] {re:classloading}
    at com.teamwizardry.librarianlib.facade.FacadeWidget.<init>(FacadeWidget.kt:23) ~[librarianlib-facade-1.15-SNAPSHOT.jar:5.0.0a2] {re:classloading}
    at com.teamwizardry.librarianlib.facade.FacadeScreen.<init>(FacadeScreen.kt:26) ~[librarianlib-facade-1.15-SNAPSHOT.jar:5.0.0a2] {re:classloading}
thecodewarrior commented 3 years ago

This has been fixed, I'll open up a new issue for the classloading problem