Controllable (Forge)

Controllable (Forge)

4M Downloads

Error looking up function 'SDL_JoystickPathForIndex'

AleksandrKashirin opened this issue ยท 7 comments

commented

System: Ubuntu 20.04
Launcher: TLauncher
Modpack System: Forge
Full report: https://pastebin.com/1GrBHUjv

I was trying to figure what is wrong with the installed SDL libraries but couldn't, because they are installed in the system and exported in .bashrc.

If anyone figured this out, let here everyone to know.
-Aleksandr

commented

'Me too'

Pop!_OS 22.04 LTS
6.1.9-x64v1-xanmod1

Forge: 47.0.3
Minecraft 1.20.1
Framework: 0.6.5

Works with just Framework, enabled, but crashes with Controllable added.


[12:31:07] [Render thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: Error looking up function 'SDL_JoystickPathForIndex': /lib/x86_64-linux-gnu/libSDL2.so: undefined symbol: SDL_JoystickPathForIndex
	Index: 1
	Listeners:
		0: NORMAL
		1: ASM: com.mrcrayfish.framework.client.ClientForgeEvents@61bf405d onRenderTick(Lnet/minecraftforge/event/TickEvent$RenderTickEvent;)V
java.lang.UnsatisfiedLinkError: Error looking up function 'SDL_JoystickPathForIndex': /lib/x86_64-linux-gnu/libSDL2.so: undefined symbol: SDL_JoystickPathForIndex
	at MC-BOOTSTRAP/[email protected]/com.sun.jna.Function.<init>(Function.java:252)

https://paste.ee/p/qhoUQ

commented

Following up with new version, same error comes up

Forge mod, version 47.0.6 (tested 47.0.19 as well)

catalogue-forge-1.20.1-1.7.1.jar
controllable-forge-1.20.1-0.20.3.jar
framework-forge-1.20.1-0.6.5.jar

[09:51:16] [Render thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: Error looking up function 'SDL_JoystickPathForIndex': /lib/x86_64-linux-gnu/libSDL2.so: undefined symbol: SDL_JoystickPathForIndex

https://paste.ee/p/3GcN0

switching to MC 1.19.4 and controllable 0.18.0 works fine

commented

Followup, i started to build SDL from source to make sure i have a current version etc...

After doing sudo apt-get remove libsdl2-dev the Mod looks to be working ๐Ÿคท

commented

It's not as surprising as you think. Java actually looks for libraries on your computer before using the ones I have packaged with the mod. The ones on your computer were older than the ones I am targeting in the mod. It's possible in the future I can avoid this in the future by writing a custom loader, so it only loads the ones provided in the mod.

commented

What are the current work arounds? Building from source or what? Is my only option using 1.19.4 or older?
Windows 10

commented

What are the current work arounds? Building from source or what? Is my only option using 1.19.4 or older? Windows 10

After having no luck at all with exploding libsdl4j and pointing -Djava.library.path at the libSDL2.so (MC openjdk java still insisted on loading /usr/lib/libSDL2.so) I unzipped controller, unzipped sdl4j in META-INF/jarjar, ran vim -b (ghex or similar would work too) on SdlNativeLibraryLoader.class, edited the standalone string SDL2 to alter the default class name to XDL2 (keeping same length), then renamed all SDL2.so/dll in sdl4j to XDL2. Then I zipped that back up, put it back in place, and zipped up controller. I recognise this is an awful hack, but it did work.

commented

Same error

System: Xubuntu 22.04
Launcher: Official Linux MC Launcher
Modpack System: Fabric

Tried 1.20.1 and 1.19.4 MC Versions but could not find controllable 0.18.0. Any chance you have a copy laying around for fabric?