How to compile SDL2 and extensions for 32-bit?


#1

I’m trying to compile SDL2 with -m32 by cloning the current repo. It compiles normally but basically everything throws assertation errors.

Ignore the “couldn’t find texture” message, that’s my own thing and that error is supposed to happen.
I compiled SDL2, SDL2_image, SDL2_ttf and SDL2_mixer using the same commands.

./autogen.sh
./configure --build=i686-linux-gnu --prefix=/usr --libdir=/usr/lib/i386-linux-gnu/ --sysconfdir=/etc --localstatedir=/var "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32 -L/usr/lib/i386-linux-gnu"
sudo make install

#2

I ended doing it the stupid way and downloading libsdl2-dev:i386 as there is a bug on Ubuntu that is to do with that package specifically for almost 2 years now.

I still want to know what I did wrong, in the future if I might need to edit the source.