permafrost-engine
permafrost-engine copied to clipboard
SDL2 linker issue building
Following the build instructions for windows, and make pf PLAT=WINDOWS
fails when building on windows. I get this error:
Other sources say this normally comes in the python-dev
package, but that's not available for windows.
Did you do a make deps PLAT=WINDOWS
to build CPython before this step? This file is generated during the Python build process and has some config-specific and platform-specific stuff.
I did, but it looks like it errored building SDL2 without me noticing. Getting a lot of linking errors when running make deps
:
I'm on Linux now, by the way. I'm gonna rename this.
Okay, so there's no real "secret sauce" to the SDL build. The top-level Makefile essentially just calls make
in the SDL2 directory, which builds the unmodified source in a standard manner.
As a first experiment, try to clone the default SDL (ex. from here: https://github.com/libsdl-org/SDL) and do ./configure
followed by make
. If it doesn't work, then you have a problem on your side with your toolchain or something.
It the default SDL build works, then just double check you're not mixing make deps
and make deps PLAT=WINDOWS
(I noticed you mismatched them in your 2 comments). Also make sure you're either building from a Linux box (recommended) or from Windows using MSYS, and not from something like macOS. If those checks pass, try make clean_deps
and re-build. Let me know how it goes.
P.S. As a workaround you can also just copy SDL2.dll
to the ./lib
directory.
I mismatched them in my comments because I've tried on both Windows and Linux. I'm trying on Linux right now.
I built SDL and it looks like it linked properly. I ran make clean_deps
and make deps
again and got the same errors. Here's a screenshot with where they differ. Running make deps
on the left, running make
for SDL on the right.
Looks like SDL built. The warning at the bottom is from a test, so I don't think the build failed.
SDL2 bumped to 2.30.0