Closed fatduckling closed 4 months ago
Here is the screenshot of the lscpu
command on the 32 bit machine
Architecture: i686
CPU op-mode(s): 32-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Vendor ID: GenuineIntel
Model name: 13th Gen Intel(R) Core(TM) i7-13700KF
CPU family: 6
Model: 183
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
Stepping: 1
BogoMIPS: 6835.19
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxs
r sse sse2 ht nx rdtscp constant_tsc xtopology nonstop_tsc cpuid tsc_known_freq pni pcl
mulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lah
f_lm abm 3dnowprefetch pti fsgsbase bmi1 avx2 bmi2 invpcid rdseed clflushopt md_clear f
lush_l1d arch_capabilities
Virtualization features:
Hypervisor vendor: KVM
Virtualization type: full
Caches (sum of all):
L1d: 96 KiB (2 instances)
L1i: 64 KiB (2 instances)
L2: 4 MiB (2 instances)
L3: 60 MiB (2 instances)
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: KVM: Mitigation: VMX unsupported
L1tf: Mitigation; PTE Inversion
Mds: Mitigation; Clear CPU buffers; SMT Host state unknown
Meltdown: Mitigation; PTI
Mmio stale data: Unknown: No mitigations
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Vulnerable
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Srbds: Not affected
Tsx async abort: Not affected
Output of my export command:
~/software/godot/godot --headless --path /tmp/Empty2/game --export-release Release64 hello
Godot Engine v4.1.1.stable.official.bd6af8e0e - https://godotengine.org
WARNING: Custom cursor shape not supported by this display server.
at: cursor_set_custom_image (servers/display_server.cpp:480)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
at: _editor_init (modules/gltf/register_types.cpp:73)
savepack: begin: Packing steps: 102
savepack: step 2: Storing File: res://game.gdextension
savepack: step 35: Storing File: res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex
savepack: step 35: Storing File: res://icon.svg.import
savepack: step 68: Storing File: res://.godot/exported/133200997/export-6581cd44ca730c421bddc3302d6ce6cc-root.scn
savepack: step 102: Storing File: res://root.tscn.remap
savepack: step 102: Storing File: res://.godot/global_script_class_cache.cfg
savepack: step 102: Storing File: res://icon.svg
savepack: step 102: Storing File: res://.godot/uid_cache.bin
savepack: step 102: Storing File: res://.godot/extension_list.cfg
savepack: step 102: Storing File: res://project.binary
savepack: end
Enter tree
Ready
Exit tree
Enter tree
Exit tree
Segmentation fault
saleem@saleem-Z790:/tmp/Empty2/game$ ~/software/godot/godot --headless --path /tmp/Empty2/game --export-release Release32 hello
Godot Engine v4.1.1.stable.official.bd6af8e0e - https://godotengine.org
WARNING: Custom cursor shape not supported by this display server.
at: cursor_set_custom_image (servers/display_server.cpp:480)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
at: _editor_init (modules/gltf/register_types.cpp:73)
savepack: begin: Packing steps: 102
savepack: step 2: Storing File: res://game.gdextension
savepack: step 35: Storing File: res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex
savepack: step 35: Storing File: res://icon.svg.import
savepack: step 68: Storing File: res://.godot/exported/133200997/export-6581cd44ca730c421bddc3302d6ce6cc-root.scn
savepack: step 102: Storing File: res://root.tscn.remap
savepack: step 102: Storing File: res://.godot/global_script_class_cache.cfg
savepack: step 102: Storing File: res://icon.svg
savepack: step 102: Storing File: res://.godot/uid_cache.bin
savepack: step 102: Storing File: res://.godot/extension_list.cfg
savepack: step 102: Storing File: res://project.binary
savepack: end
Enter tree
Ready
Exit tree
Enter tree
Exit tree
Segmentation fault
This is not specific to linux
Windows is also affected, note that this happens with both GDScript and C#
Starting program: E:\Godot\Color Tiles\build\win-x86\Color-Tiles-win-x86.exe
[New Thread 14272.0x8a4]
[New Thread 14272.0x47b4]
[New Thread 14272.0x54d4]
[New Thread 14272.0x1b84]
[New Thread 14272.0x2e6c]
[New Thread 14272.0x1ae4]
[New Thread 14272.0x44c4]
[New Thread 14272.0x3c6c]
[New Thread 14272.0x1ebc]
[New Thread 14272.0x5928]
[New Thread 14272.0xdac]
[New Thread 14272.0x109c]
[New Thread 14272.0x5a34]
[New Thread 14272.0x32e4]
[New Thread 14272.0x3a54]
[New Thread 14272.0x1c90]
[New Thread 14272.0x1be4]
[New Thread 14272.0x2c64]
[New Thread 14272.0x4558]
Godot Engine v4.1.1.stable.mono.official.bd6af8e0e - https://godotengine.org
[New Thread 14272.0xd64]
[New Thread 14272.0x439c]
[New Thread 14272.0x2ba8]
[Thread 14272.0xd64 exited with code 0]
[Thread 14272.0x439c exited with code 0]
[Thread 14272.0x2ba8 exited with code 0]
[New Thread 14272.0x3838]
[New Thread 14272.0x954]
[New Thread 14272.0x3354]
[New Thread 14272.0x1ea0]
OpenGL API 3.3.0 NVIDIA 536.67 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce GTX 1060 6GB
[New Thread 14272.0x5228]
[New Thread 14272.0x2390]
[New Thread 14272.0x54e0]
[New Thread 14272.0x25d0]
warning: Profiler was prevented from loading notification profiler due to app settings.
Process ID (decimal): 14272. Message ID: [0x2509].
[New Thread 14272.0x21dc]
[New Thread 14272.0x23ec]
[New Thread 14272.0x1d38]
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000008 in ?? ()
(gdb) c
Continuing.
Thread 1 received signal SIGSEGV, Segmentation fault.
0x5d9d5a2e in coreclr_shutdown_2 () from E:\Godot\Color Tiles\build\win-x86\data_Color Tiles_x86_32\coreclr.dll
(gdb) c
Continuing.
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000008 in ?? ()
(gdb) c
Continuing.
[Thread 14272.0x1b84 exited with code 3221225477]
[Thread 14272.0x47b4 exited with code 3221225477]
[Thread 14272.0x1ae4 exited with code 3221225477]
[Thread 14272.0x44c4 exited with code 3221225477]
[Thread 14272.0x54d4 exited with code 3221225477]
[Thread 14272.0x3c6c exited with code 3221225477]
[Thread 14272.0x1ebc exited with code 3221225477]
[Thread 14272.0xdac exited with code 3221225477]
[Thread 14272.0x109c exited with code 3221225477]
[Thread 14272.0x2e6c exited with code 3221225477]
[Thread 14272.0x5928 exited with code 3221225477]
[Thread 14272.0x3a54 exited with code 3221225477]
[Thread 14272.0x1c90 exited with code 3221225477]
[Thread 14272.0x1be4 exited with code 3221225477]
[Thread 14272.0x3838 exited with code 3221225477]
[Thread 14272.0x4558 exited with code 3221225477]
[Thread 14272.0x1ea0 exited with code 3221225477]
[Thread 14272.0x25d0 exited with code 3221225477]
[Thread 14272.0x2390 exited with code 3221225477]
[Thread 14272.0x1d38 exited with code 3221225477]
[Thread 14272.0x3354 exited with code 3221225477]
[Thread 14272.0x32e4 exited with code 3221225477]
[Thread 14272.0x954 exited with code 3221225477]
[Thread 14272.0x5228 exited with code 3221225477]
[Thread 14272.0x2c64 exited with code 3221225477]
[Thread 14272.0x54e0 exited with code 3221225477]
[Thread 14272.0x21dc exited with code 3221225477]
[Thread 14272.0x23ec exited with code 3221225477]
[Inferior 1 (process 14272) exited with code 030000000005]
Hi @Calinou After upgrading my project to 4.2 RC2, this seems to have been fixed. I'm able to compile on Debian 11 x64 using the -m32
flags and then run it on debian 11 x32
Edit: Also tried this using MinGW cross-compiler and I'm able to run both the x64 and x32 binaries on Windows. I think this can be closed now, thank you!
@Mrcubix Please confirm if the issue still persists for you on 4.2 RC2.
Can't confirm as i don't have access to a 32 bits machine anymore
Seems like we can close this one now! If there are still any issues, we can re-open
Godot version
v4.1.1 bd6af8e0ea69167dd0627f3bd54f9105bda0f8b5
System information
Build machine: Debian GNU/Linux 11 (bullseye) 64 bit Testing machine: Debian GNU/Linux 12 (bookworm) 32 bit
Issue description
Hi,
I built a simple game with Godot 4.1.1 on my host machine
Debian GNU/Linux 11 (bullseye) 64 bit
. The game uses GDExtension. When I export the game tox86_64
and copy the files to another Linux x64 computer, it works fine. However, when I export the game tox86_32
architecture (while also compiling the C++ game library inx86_32
arch), and copy the files to a Linux x32 computer, I can't run the game. I get the following error on the 32 bit machine:In my host machine (x64), I make sure to set the binary format architecture to x86_32 (see screenshot):
This is the contents of my
game.gdextension
I've attached a sample reproducible game (with a simple C++ library) so you can test it.
Steps to reproduce
Make sure you have godot-cpp set up for both Linux 32 and 64 bit libraries. https://github.com/godotengine/godot-cpp
Download the reproducible project in this ticket
Compile the simple game library
I provided the 32 and 64 bit game library inside the
game/
folder, but you can compile it yourself using the following commands:set(GODOT_ROOT /home/saleem/software/godot/godot-cpp)
in theCMakeLists.txt
file to point to your godot-cpp installation pathThis will produce a library
libGameLibrary.so
. Rename thatlibGameLibrary32.so
and put that inside thegame/
folder.Compile the 64 bit version. In the
CMakeLists.txt
, delete the lines associated with the-m32
and uncomment out the 64 bit lines so yourCMakeLists.txt
looks like this:set(GODOT_LIBRARY ${GODOT_ROOT}/bin/libgodot-cpp.linux.template_debug.x86_64.a) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
set(CMAKE_CXX_STANDARD 17) ...