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

BSD: Build Fixes + Assimp 5.3.1 to 5.4.1 Upgrade #771

Closed bedwardly-down closed 1 day ago

bedwardly-down commented 2 days ago

World Editor Running

WorldEditor

Builder Running

Builder

There's bugs (posting them here: https://github.com/thunder-engine/thunder/issues/770), but we are getting somewhere. :smiley_cat:

EDIT: Now, the Qt5 code changes will break the SDK in terms of libraries and programs being shipped with the executables with this commit, but right now, I'm not trying to build Qt5 from source yet. Last time I tried, I remember it being not as straightforward as I would have liked. Building an older release that's fully compatible would be ideal, especially when this is shipped as portable as possible.

eprikazchikov commented 2 days ago

Do you have to build Qt from the source code? Usually they have prebuilt binaries.

bedwardly-down commented 2 days ago

I need to get ready for work but I’ll grab your commits and work on further tweaking this based on feedback.

bedwardly-down commented 2 days ago

Do you have to build Qt from the source code? Usually they have prebuilt binaries.

Just saw this. For at least FreeBSD, the only precompiled binaries are in the repo but some of the upstream default compile flags used can cause issues for certain programs. Not a required thing but an option. Building the official port from source with Poudriere (their main build system now) is a bit of a pain but doable.

eprikazchikov commented 1 day ago

Regarding assimp. Do you have compilation error in g_maxBytesPerBlock ?

bedwardly-down commented 1 day ago

Regarding assimp. Do you have compilation error in g_maxBytesPerBlock ?

Retesting with GCC13 during my lunch break. Looks like Clang17 gives the best results and throws linkage errors that the Clang15 and Clang16 were missing (both of which kept missing this one).

UPDATE: Both Clang17 and GCC13 are throwing this error:

[100%] Linking CXX executable WorldEditor
/usr/local/bin/ld: ../engine/libengine-editor.so: undefined reference to `Assimp::StackAllocator::g_maxBytesPerBlock'
collect2: error: ld returned 1 exit status
gmake[2]: *** [worldeditor/CMakeFiles/WorldEditor.dir/build.make:1136: worldeditor/WorldEditor] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2355: worldeditor/CMakeFiles/WorldEditor.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
bedwardly-down commented 1 day ago

Just pushed a bandage fix for Assimp. There's a possible better way to handle it, but to make it work for all platforms, I'll need to enforce c++17 in the QBS build files for just this one library.

This is the platform agnostic version of the fix: https://github.com/assimp/assimp/pull/5649/files , but with your testing system, it has already failed without building as c++17.

bedwardly-down commented 1 day ago

Yeah, the upgrade requires minizip to build. Didn't see that one coming.

bedwardly-down commented 1 day ago

Almost finished. Have one more kink to iron out: there's a false error due to the minizip dependency on my system caused by one of the default compiler options being enabled; it doesn't apply here at all and is safe to disable.

bedwardly-down commented 1 day ago

Future Assimp upgrades will probably require some slight modifications to a few of the header files to compile correctly. A small handful used headers from the contrib folder for libraries that were already being used, so I just updated those instances.

eprikazchikov commented 1 day ago

Is it ready for merge?

bedwardly-down commented 1 day ago

Is it ready for merge?

Yes it is.

eprikazchikov commented 1 day ago

Thank you!