-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
external_deps: revamp lib build, add cmake and configure wrapper, update lib feature disablement, update lib versions #1433
base: master
Are you sure you want to change the base?
Conversation
For
Everything else build. |
For
Everything else build. |
cc59996
to
bd1e318
Compare
|
When building newer Opus on Debian buster (the distro we use for our releases), I get this:
Debian Buster provides GCC 8, but GCC 11.3 or GCC 12 may be required: |
Telling Opus to not assume more than SSE2 fixed that. |
So, the MinGW GLEW and MSVC Vorbis errors are the only ones. |
So the Vorbis build error is actually a bug:
I added a workaround. |
I don't get why I get that GLEW build error with MinGW, the build function has not been modified, and the version has not been updated. |
Also the code is the same for both |
So, I don't know what happened, now I don't reproduce the MinGW GLEW error… Maybe I gorgot to prune the prefix folder and some stray files messed-up… |
Ah, I now see something: I reproduce the bug with MinGW from Ubuntu 24.04 Noble, not with MinGW from Debian 10 Buster. So, since we produce release builds with Debian Buster, it's not a big problem, but it should be fixed for the future… |
What's the purpose of migrating things to build with CMake? |
03961c7
to
c537fe9
Compare
So with this a static build for linux-amd64 completes and runs. |
Huh? It worked before, so I have a hard time believing that is suddenly necessary to change the build system of 8 packages. |
I never said this is a response to “What's the purpose of migrating things to build with CMake?”, I'm just reporting the status of me testing that branch. I said in first post:
So now I'm running those tests. |
What's the motivation behind this change? |
Purposes:
When using configure it is hard to compare the list of already used options with the new options, one has to read configure's whole output and compare with what's currently used. On the contrary with cmake, one just runs the existing command, then go to the build dir and run ccmake, and see what's enabled and should not, and report the difference to the build script. |
5860e20
to
c73312c
Compare
windows-amd64-mingw and windows-i686-mingw engine both build and run. |
For some reasons libpng now provides |
2773253
to
2dd223e
Compare
linux-i686-default and macos-amd64-default engine both build and run. |
26792b6
to
dbf2de7
Compare
dbf2de7
to
d170a86
Compare
I now squashed many commits and properly named them. I'm now entering the phase where it is ready to review. I'm gonna produce test archives so the CI can test them. |
d170a86
to
984e303
Compare
It can also be the opportunity to change some other things. For example we use some |
Also I noticed that SDL2 has some audio backends (like pulseaudio), and OpenAL has an SDL2 backend (among others like pulseaudio), so we may check we only build them once. Either we use OpenAL on native audio backend directly and we make sure SDL2 doesn't build any native audio backend, either we use OpenAL on SDL2 and make sure that's the only OpenAL backend to be built and that SDL2 has the required native audio backends being built. |
As a remind I prefer to use the cmake wrapper when CMake is provided for a library and that actually works, because it makes easier to manage the enablement/disablement of features that come when bumping the library versions. |
How do you figure it's easier? Traditional configure script workflow:
CMake workflow:
ISTM that CMake comes out worse there. Is there a better way to do it? |
Oh, I see it was posted further up:
I don't think that checking ON/OFF states is a reliable workflow though. Some new features may be off by default initially, but later changed to on by default. Or it may do the annoying thing where stuff is automatically turned on or of depending on what dependencies are installed. |
Rebased following #1629. Resulting |
I tried to test builds before/after to see if the changes broke anything. There was a lot of stuff broken but much of it was also broken without the changes. I opened #1642 with fixes for those issues which are present both before and after. That fixes the GLEW Windows error mentioned in the OP. I got some issues with the macos bash not liking certain constructs:
|
I guess the problem is that the old Bash sometimes doesn't distinguished between "undefined" and "empty" variables. Maybe for the To answer some very old posts from the thread above:
We aren't using SDL audio. Regarding static vs. dynamic libs, I guess static is better for releases since the linker has the opportunity to remove unused code, reducing the file size. Dynamic may be better for development since then you don't have to link anything so the build could be faster. MSVC libs have to be dynamic because we can't produce static libs in its format. Fortuitously, MSVC is the one platform which is never used for releases, only development. So my conclusion would be static libs are preferable for everything but MSVC. |
After applying some fixes for the old Bash compatibility and the fix for pkgconfig from #1642, I successfully built and tested the Mac amd64 deps and client with the latest toolchain and OS on my arm64 Mac machine. |
This is WIP, current external_deps build status:
I haven't tested if the engine builds and runs properly with those.WIPWhat this PR does:
CMakeLists.txt
file