I’ve modified NativeInterop.cs
and defined DEBUG_LIBRARY_LOAD. The result is:
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/artem/Downloads/Godot_v4.2.2-stable_mono_linux_x86_64/Godot_v4.2.2-stable_mono_linux.x86_64...
(No debugging symbols found in /home/artem/Downloads/Godot_v4.2.2-stable_mono_linux_x86_64/Godot_v4.2.2-stable_mono_linux.x86_64)
(gdb) r
Starting program: /home/artem/Downloads/Godot_v4.2.2-stable_mono_linux_x86_64/Godot_v4.2.2-stable_mono_linux.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after vfork from child process 47851]
[New Thread 0x7ffff73ff640 (LWP 47853)]
[New Thread 0x7ffff6bfe640 (LWP 47854)]
[New Thread 0x7ffff63fd640 (LWP 47855)]
[New Thread 0x7ffff5bfc640 (LWP 47856)]
[New Thread 0x7ffff53fb640 (LWP 47857)]
Godot Engine v4.2.2.stable.mono.official.15073afe3 - https://godotengine.org
[New Thread 0x7fffe83ff640 (LWP 47858)]
Vulkan API 1.3.238 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics (JSL)
[New Thread 0x7fffe7bfe640 (LWP 47859)]
[New Thread 0x7fffe73fd640 (LWP 47860)]
[Thread 0x7fffe73fd640 (LWP 47860) exited]
[New Thread 0x7fffe73fd640 (LWP 47861)]
[New Thread 0x7fffe67fa640 (LWP 47862)]
[New Thread 0x7fffe5ff9640 (LWP 47863)]
[New Thread 0x7fffe57f8640 (LWP 47864)]
[Thread 0x7fffe73fd640 (LWP 47861) exited]
[New Thread 0x7fffe73fd640 (LWP 47865)]
[New Thread 0x7fffe4ff7640 (LWP 47866)]
[New Thread 0x7fffcffff640 (LWP 47867)]
[New Thread 0x7fffcd7fe640 (LWP 47868)]
[Thread 0x7fffcd7fe640 (LWP 47868) exited]
[New Thread 0x7fffccffd640 (LWP 47869)]
[New Thread 0x7fffc3fff640 (LWP 47870)]
[New Thread 0x7fffb37fe640 (LWP 47871)]
[New Thread 0x7fffb2ffd640 (LWP 47872)]
[New Thread 0x7fffb1fff640 (LWP 47873)]
[New Thread 0x7fffb17fe640 (LWP 47874)]
[New Thread 0x7fffb0ffd640 (LWP 47875)]
[New Thread 0x7fff9bfff640 (LWP 47876)]
[New Thread 0x7fff9b7fe640 (LWP 47877)]
[New Thread 0x7fff9affd640 (LWP 47878)]
[New Thread 0x7fff3300f640 (LWP 47879)]
[New Thread 0x7fff31bff640 (LWP 47880)]
[New Thread 0x7fff30dff640 (LWP 47881)]
This is Thrive version: 0.6.6.0-alpha+381c8d8c6f5aa10a5e87ce0124583e5ef968e2eb (see below for more build info)
TODO: reimplement unhandled exception logger
Startup C# locale is: en-US Godot locale is: en_US
user:// directory is: /home/artem/.local/share/Thrive
Game logs are written to: /home/artem/.local/share/Thrive/logs latest log is 'log.txt'
Cannot use full-speed Thrive native library due to: CPU is missing AVX 1 extension instruction support
CPU is missing AVX 2 extension instruction support
Using slower Thrive native library that doesn't rely on as new CPU instructions
Checked that required CPU features are present
Library not found yet at expected paths, trying a distributable version
Couldn't find library at any expected path, falling back to default load behaviour, which is unlikely to find anything
Thrive native library load failed due to: Unable to load shared library 'thrive_native' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/thrive_native.so: cannot open shared object file: No such file or directory
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/libthrive_native.so: cannot open shared object file: No such file or directory
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/thrive_native: cannot open shared object file: No such file or directory
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/libthrive_native: cannot open shared object file: No such file or directory
Native library is missing (or unloadable). If you downloaded a compiled Thrive version, this version (may be) broken. If you are trying to compile Thrive you need to compile the native modules as well
Please do not report to us the next unhandled exception error about this, unless this is an official Thrive release that has this issue
On Linux please verify you have new enough GLIBC version as otherwise the library is unloadable. Updating your distro to the latest version should resolve the issue as long as you are using a supported distro.
System.DllNotFoundException: Unable to load shared library 'thrive_native' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/thrive_native.so: cannot open shared object file: No such file or directory
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/libthrive_native.so: cannot open shared object file: No such file or directory
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/thrive_native: cannot open shared object file: No such file or directory
/usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.3/libthrive_native: cannot open shared object file: No such file or directory
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError)
at NativeInterop.DllImportResolver(String libraryName, Assembly assembly, Nullable`1 searchPath) in /home/artem/Desktop/Thrive/src/native/interop/NativeInterop.cs:line 440
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
at NativeMethods.CheckAPIVersion()
at NativeInterop.Load() in /home/artem/Desktop/Thrive/src/native/interop/NativeInterop.cs:line 96
at StartupActions..ctor() in /home/artem/Desktop/Thrive/src/engine/StartupActions.cs:line 98
TODO: re-add harmony init
WARNING: res://src/gui_common/fonts/Body-Regular-Smaller.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-AlmostSmaller.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-Small.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-Small-Shadow.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Bold-AlmostSmall.tres:3 - ext_resource, invalid UID: uid://b62thy1er4r08 - using text path instead: res://assets/fonts/Lato-Bold.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Bold-Small-Red.tres:3 - ext_resource, invalid UID: uid://b62thy1er4r08 - using text path instead: res://assets/fonts/Lato-Bold.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-AlmostTiny.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Bold-Smaller.tres:3 - ext_resource, invalid UID: uid://b62thy1er4r08 - using text path instead: res://assets/fonts/Lato-Bold.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-Tiny.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Thrive-Small.tres:3 - ext_resource, invalid UID: uid://vuty5mlul1kf - using text path instead: res://assets/fonts/thrive.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Bold-Normal.tres:3 - ext_resource, invalid UID: uid://b62thy1er4r08 - using text path instead: res://assets/fonts/Lato-Bold.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-AlmostSmall.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-Small-Black.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Bold-Small.tres:3 - ext_resource, invalid UID: uid://b62thy1er4r08 - using text path instead: res://assets/fonts/Lato-Bold.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/general/NewGameSettings.tscn:7 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
WARNING: res://src/gui_common/fonts/Body-Regular-AlmostTiny-Red.tres:3 - ext_resource, invalid UID: uid://s8m5c8resd50 - using text path instead: res://assets/fonts/Lato-Regular.ttf
at: load (scene/resources/resource_format_text.cpp:448)
Skipping settings apply as the game should close soon
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
Preventing startup due to StartupActions failing
Closing Thrive "normally" due to a detected problem
No SteamClient class found, not initializing Steam
SimulationParameters are good
WARNING: res://src/gui_common/ChemicalEquation.tscn:7 - ext_resource, invalid UID: uid://b62thy1er4r08 - using text path instead: res://assets/fonts/Lato-Bold.ttf
at: load (scene/resources/resource_format_text.cpp:448)
No build info file exists, no more build info exists
Beginning Thrive news feed fetch
[New Thread 0x7fbe75fff640 (LWP 47882)]
[New Thread 0x7fbe757fe640 (LWP 47883)]
TaskExecutor started with parallel job count: 2
[New Thread 0x7fbe749ff640 (LWP 47884)]
[New Thread 0x7fbe5bffd640 (LWP 47885)]
[New Thread 0x7fff312fe640 (LWP 47886)]
[New Thread 0x7fbe5b7fc640 (LWP 47887)]
[New Thread 0x7fbe5affb640 (LWP 47888)]
[New Thread 0x7fbe5a7fa640 (LWP 47889)]
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
WARNING: Nodes with non-equal opposite anchors will have their size overridden after _ready().
If you want to set size, change the anchors or consider using set_deferred().
at: _set_size (scene/gui/control.cpp:1442)
Skipping main menu initialization due to quitting
[Thread 0x7fffe73fd640 (LWP 47865) exited]
[New Thread 0x7fffe73fd640 (LWP 47890)]
Loading mod Nodes into the scene tree
Skip native side debug draw unregister as the native library is not loaded
Shutting down native library
Skipping native library shutdown as it was not fully loaded
Shutdown actions complete
[New Thread 0x7fbe59ff9640 (LWP 47891)]
[Thread 0x7fffb2ffd640 (LWP 47872) exited]
[Thread 0x7fffb37fe640 (LWP 47871) exited]
[Thread 0x7fffc3fff640 (LWP 47870) exited]
[Thread 0x7fffccffd640 (LWP 47869) exited]
ERROR: 2 RID allocations of type 'N10RendererRD14TextureStorage7TextureE' were leaked at exit.
[Thread 0x7fffe4ff7640 (LWP 47866) exited]
[Thread 0x7fffe73fd640 (LWP 47890) exited]
WARNING: 4 RIDs of type "Texture" were leaked.
at: finalize (drivers/vulkan/rendering_device_vulkan.cpp:9655)
[Thread 0x7fffe7bfe640 (LWP 47859) exited]
[Thread 0x7fffe57f8640 (LWP 47864) exited]
[Thread 0x7fffe5ff9640 (LWP 47863) exited]
[Thread 0x7fffe67fa640 (LWP 47862) exited]
[Thread 0x7fffe83ff640 (LWP 47858) exited]
ERROR: Parameter "RenderingServer::get_singleton()" is null.
at: ~CompressedTexture2D (scene/resources/compressed_texture.cpp:464)
ERROR: Parameter "RenderingServer::get_singleton()" is null.
at: ~CompressedTexture2D (scene/resources/compressed_texture.cpp:464)
[Thread 0x7fffcffff640 (LWP 47867) exited]
ERROR: FATAL: Condition "!rc_owner" is true.
at: _instance_binding_reference_callback (modules/mono/csharp_script.cpp:1379)
Thread 1 "Godot_v4.2.2-st" received signal SIGILL, Illegal instruction.
0x0000000000a70a4c in ?? ()
(gdb) bt
#0 0x0000000000a70a4c in ?? ()
#1 0x0000000003b909d2 in ?? ()
#2 0x00000000013867ce in ?? ()
#3 0x00000000039ab321 in ?? ()
#4 0x00000000004d96a9 in ?? ()
#5 0x00000000004aaff7 in ?? ()
#6 0x000000000041e814 in ?? ()
#7 0x00007ffff7c29d90 in __libc_start_call_main (main=main@entry=0x41e760, argc=argc@entry=1, argv=argv@entry=0x7fffffffdec8) at ../sysdeps/nptl/libc_start_call_main.h:58
#8 0x00007ffff7c29e40 in __libc_start_main_impl (main=0x41e760, argc=1, argv=0x7fffffffdec8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdeb8)
at ../csu/libc-start.c:392
#9 0x000000000042b25a in ?? ()
(gdb) quit
A debugging session is active.
Inferior 1 [process 47848] will be killed.
Quit anyway? (y or n) y
I don’t see any of if statements for DEBUG_LIBRARY_LOAD have been entered.
Just to remind:
- After using
dotnet run --project Scripts -- native Build -d --disable-avx
I have the following:
Using debug versions of libraries (these are not always available for download)
Performing operation Build
Building ThriveNative for local use (Linux) with CMake (hopefully all native dependencies are installed)
-- Building without AVX support
-- Configured native library version 14
-- LTO is on for Thrive
-- Configuring done
-- Generating done
-- Build files have been written to: /home/artem/Desktop/Thrive/build-debug
Succeeded in configuring cmake project
Compiling...
Consolidate compiler generated dependencies of target Jolt
[ 90%] Built target Jolt
Consolidate compiler generated dependencies of target thrive_native
[100%] Built target thrive_native
Install the project...
-- Install configuration: "Debug"
-- Up-to-date: /home/artem/Desktop/Thrive/native_libs/linux/14/debug/lib/libthrive_native_without_avx.so
Successfully compiled library ThriveNative
Successfully performed operation on library: ThriveNative
So it was built and installed.
- I cut the
distributable
folder so I only have this Thrive/native_libs/linux/14/debug/lib/libthrive_native_without_avx.so
What might it be why the library is not loaded?