thunder-engine / thunder

Thunder Engine – Cross-platform 2D and 3D game engine with modular architecture
https://thunderengine.org/
Apache License 2.0
521 stars 34 forks source link

Platform: BSD Port: Plugins aren't building correctly and loading for the platform #775

Closed bedwardly-down closed 1 week ago

bedwardly-down commented 1 week ago

Description

What the title stated. This is currently broken but I'll be focusing completely on it for the time being. There's also a possibility the plugins directory and linkage aren't quite right.

Expected behavior:

WorldEditor loads without crashing.

Actual behavior:

PluginManager not loading plugins correctly, causing a crash after loading or creating project.

Thunder Engine plugins are installing under bin/plugins for BSD and Linux, which may not be the desired effect (according to this).

plugins

Plugin logs:

 The required settings was not specified: Company Name, Project Version, First Map Please specify them in the Project Settings.
 [PluginManager] Can't load plugin: /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/libshadertools.so
 [PluginManager] Can't load plugin: /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/libmotiontools.so
 [PluginManager] Can't load plugin: /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/libuikit-editor.so
 [PluginManager] Can't load plugin: /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/libpipelinetools.so
ld-elf.so.1: /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/libmedia-editor.so: Undefined symbol "alcGetString"

Reproducibility:

Always.

Prerequisites

Steps to Reproduce

Versions

These are all the same as here: (https://github.com/thunder-engine/thunder/issues/770)

bedwardly-down commented 1 week ago

I’ll be individually building each of these failed plugins and check the media linkage issue. The initial PluginManager loading issue hid these.

bedwardly-down commented 1 week ago

That media warning is a duplicate of this: https://github.com/thunder-engine/thunder/issues/371 , though.

bedwardly-down commented 1 week ago

Just downloaded the latest Linux artifact from my recent PR and used the Linux ldd to compare plugins/libshadertools.so with the BSD one. I found some interesting results that will help me here.

Linux

    linux-vdso.so.1 =>  (0x00007fffffffe000)
    libgraph-editor.so => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libgraph-editor.so (0x0000000801243000)
    libengine-editor.so => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libengine-editor.so (0x0000000801c00000)
    libQt5Xml.so.5 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libQt5Xml.so.5 (0x0000000802600000)
    libQt5Widgets.so.5 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libQt5Widgets.so.5 (0x0000000802a00000)
    libQt5Gui.so.5 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libQt5Gui.so.5 (0x0000000803400000)
    libQt5Core.so.5 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libQt5Core.so.5 (0x0000000803e00000)
    libnext-editor.so => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libnext-editor.so (0x00000008012da000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x0000000804600000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x0000000804a00000)
    libm.so.6 => /lib64/libm.so.6 (0x0000000804e00000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000000805200000)
    libc.so.6 => /lib64/libc.so.6 (0x0000000805600000)
    libuikit-editor.so => not found
    libQt5Svg.so.5 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/../lib/libQt5Svg.so.5 (0x0000000805a00000)
    libQt5Gamepad.so.5 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/../lib/libQt5Gamepad.so.5 (0x0000000805e00000)
    libphysfs-editor.so => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/../lib/libphysfs-editor.so (0x000000080139b000)
    libglfw-editor.so => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/../lib/libglfw-editor.so (0x0000000801a7c000)
    libfreetype-editor.so => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/../lib/libfreetype-editor.so (0x0000000801aed000)
    /lib64/ld-linux-x86-64.so.2 (0x0000000001021000)
    libGL.so.1 => not found
    libGL.so.1 => not found
    libz.so.1 => /lib64/libz.so.1 (0x0000000806200000)
    libicui18n.so.56 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libicui18n.so.56 (0x0000000806600000)
    libicuuc.so.56 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libicuuc.so.56 (0x0000000806c00000)
    libicudata.so.56 => /home/brad/Downloads/Thunder/release/install-root/sdk/2024.2/linux/x86_64/bin/plugins/../../lib/libicudata.so.56 (0x0000000807000000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000000808a00000)
    libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x0000000808e00000)
    libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x0000000809200000)
    libGL.so.1 => not found
    libGL.so.1 => not found
    libzlib-editor.so => not found
    libpcre.so.1 => /lib64/libpcre.so.1 (0x0000000809600000)

FreeBSD

plugins/libshadertools.so:
    libgraph-editor.so => /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/../../lib/libgraph-editor.so (0x20829b07d000)
    libengine-editor.so => /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/../../lib/libengine-editor.so (0x20829de00000)
    libnext-editor.so => /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/bin/plugins/../../lib/libnext-editor.so (0x20829c816000)
    libQt5Xml.so.5 => /usr/local/lib/qt5/libQt5Xml.so.5 (0x20829d5eb000)
    libQt5Widgets.so.5 => /usr/local/lib/qt5/libQt5Widgets.so.5 (0x2082a1600000)
    libQt5Gui.so.5 => /usr/local/lib/qt5/libQt5Gui.so.5 (0x20829fbe1000)
    libQt5Core.so.5 => /usr/local/lib/qt5/libQt5Core.so.5 (0x2082a3800000)
    libc++.so.1 => /lib/libc++.so.1 (0x2082a0c30000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x2082a2483000)
    libm.so.5 => /lib/libm.so.5 (0x2082a33fd000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2082a3eb5000)
    libc.so.7 => /lib/libc.so.7 (0x20829a0f9000)
    libuikit-editor.so => not found (0)
    libglfw-editor.so => /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/lib/../lib/libglfw-editor.so (0x2082a4996000)
    libphysfs-editor.so => /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/lib/../lib/libphysfs-editor.so (0x2082a54db000)
    libfreetype-editor.so => /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/lib/../lib/libfreetype-editor.so (0x2082a5f99000)
    libQt5Gamepad.so.5 => /usr/local/lib/qt5/libQt5Gamepad.so.5 (0x2082a6a18000)
    libQt5Svg.so.5 => /usr/local/lib/qt5/libQt5Svg.so.5 (0x2082a740f000)
    libzlib-editor.so => /home/brad/git/thunder-build/install-root/sdk/2024.2/freebsd/x86/lib/../lib/libzlib-editor.so (0x2082a82f7000)
    libthr.so.3 => /lib/libthr.so.3 (0x2082a87c1000)
    libGL.so.1 => /usr/local/lib/libGL.so.1 (0x2082a9a55000)
    libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x2082a8836000)
    libz.so.6 => /lib/libz.so.6 (0x2082a8b43000)
    libharfbuzz.so.0 => /usr/local/lib/libharfbuzz.so.0 (0x2082aa68c000)
    libkvm.so.7 => /lib/libkvm.so.7 (0x2082abe0c000)
    libprocstat.so.1 => /usr/lib/libprocstat.so.1 (0x2082ab5e8000)
    libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x2082acd8c000)
    libdouble-conversion.so.3 => /usr/local/lib/libdouble-conversion.so.3 (0x2082ad6b0000)
    libicui18n.so.74 => /usr/local/lib/libicui18n.so.74 (0x2082ae2ad000)
    libicuuc.so.74 => /usr/local/lib/libicuuc.so.74 (0x2082af144000)
    libpcre2-16.so.0 => /usr/local/lib/libpcre2-16.so.0 (0x2082af8dd000)
    libzstd.so.1 => /usr/local/lib/libzstd.so.1 (0x2082b0c46000)
    libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x2082b04c0000)
    libSM.so.6 => /usr/local/lib/libSM.so.6 (0x2082b0f96000)
    libICE.so.6 => /usr/local/lib/libICE.so.6 (0x2082b28bd000)
    libX11.so.6 => /usr/local/lib/libX11.so.6 (0x2082b1be1000)
    libXext.so.6 => /usr/local/lib/libXext.so.6 (0x2082b2abc000)
    libinotify.so.0 => /usr/local/lib/libinotify.so.0 (0x2082b3fb8000)
    libGLdispatch.so.0 => /usr/local/lib/libGLdispatch.so.0 (0x2082b2b5b000)
    libGLX.so.0 => /usr/local/lib/libGLX.so.0 (0x2082b3a8f000)
    libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x2082b424c000)
    libgraphite2.so.3 => /usr/local/lib/libgraphite2.so.3 (0x2082b5194000)
    libelf.so.2 => /lib/libelf.so.2 (0x208299c79000)
    libutil.so.9 => /lib/libutil.so.9 (0x2082b5e06000)
    libicudata.so.74 => /usr/local/lib/libicudata.so.74 (0x2082b759f000)
    libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x2082b698c000)
    libintl.so.8 => /usr/local/lib/libintl.so.8 (0x2082b8046000)
    libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x2082b8cb8000)
    libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x2082b910d000)
    libdl.so.1 => /usr/lib/libdl.so.1 (0x2082ba39a000)
    libbz2.so.4 => /usr/lib/libbz2.so.4 (0x2082b9599000)
    libbrotlidec.so.1 => /usr/local/lib/libbrotlidec.so.1 (0x2082bac59000)
    libXau.so.6 => /usr/local/lib/libXau.so.6 (0x2082bb9ed000)
    libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x2082bd167000)
    libbrotlicommon.so.1 => /usr/local/lib/libbrotlicommon.so.1 (0x2082bc8b5000)

They're both not finding libuikit-editor.so. That means both the qbs build and CMake systems for at least some of the modules need to be updated with $ORIGIN code. The Linux ones were built with qbs. Getting on that now.

bedwardly-down commented 1 week ago

PR was accepted and this particular issue is resolved. Now comes figuring out where the memory issues are. It's partially loading now.