You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My game's Godot executable and .pck file are in separate folders. By using --main-pack the .pck will be loaded just fine but not the GDExtension library present in the same folder as the .pck file. If there's an override.cfg in this separate folder, the override.cfg will load, though.
I've tried to set LD_LIBRARY_PATH and LD_PRELOAD to the folder where the .pck is. The GDExtension library file can't be loaded this way but the library file provided by the Steamworks SDK can.
Steps to reproduce
export LD_LIBRARY_PATH=/home/user/Desktop/pckandgde/
/home/user/Desktop/gameexec/game.x86_64 --main-pack /home/user/Desktop/pckandgde/pack.pck
ERROR: Can't open dynamic library: addons/godotsteam/linux64/libgodotsteam.x86_64.so. Error: /home/user/Desktop/gameexec/../lib/libgodotsteam.x86_64.so: cannot open shared object file: No such file or directory.
at: open_dynamic_library (drivers/unix/os_unix.cpp:660)
ERROR: GDExtension dynamic library not found: addons/godotsteam/linux64/libgodotsteam.x86_64.so
at: open_library (core/extension/gdextension.cpp:719)
ERROR: Failed loading resource: res://addons/godotsteam/godotsteam.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:274)
ERROR: Error loading extension: res://addons/godotsteam/godotsteam.gdextension
at: load_extensions (core/extension/gdextension_manager.cpp:234)
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
GDExtension libraries are loaded only from a specific set of locations.
Try using /home/user/Desktop/gameexec/game.x86_64 --path /home/user/Desktop/pckandgde/ --main-pack pack.pck instead (it works on macOS, I have not tested on Linux).
According to Godot docs the --path must contain a project.godot file, however this is an exported project.
--path does work if I create that addons/etc/etc file structure, and add the GDExtension files there, but I would prefer if I didn't need any subfolders as that would make more sense for an exported project.
Also, the "../lib/" part is kind of weird in this scenario. I actually tried to move my GDExtension files to to a folder named "lib" on my desktop, and the files were able to load from there.
path as specified in the .gdextension file, it's res://addons/something so it's looking for the addons/something in the project path (which is set by --path).
executable location (only filename for the original path).
executable location + ../lib (only filename for the original path).
While we can add PCK location to the lookup list (and it will work on Linux and Windows), some systems (like macOS) are quite restrictive about dynamic library location, loading something for non-standard location will cause issues. So I'm not sure if we should change it.
Tested versions
4.2.1
System information
Linux
Issue description
My game's Godot executable and .pck file are in separate folders. By using --main-pack the .pck will be loaded just fine but not the GDExtension library present in the same folder as the .pck file. If there's an override.cfg in this separate folder, the override.cfg will load, though.
I've tried to set LD_LIBRARY_PATH and LD_PRELOAD to the folder where the .pck is. The GDExtension library file can't be loaded this way but the library file provided by the Steamworks SDK can.
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: