Page 2 of 2

Re: Supermodel failing to build

PostPosted: Thu Dec 31, 2020 2:26 pm
by TheOldDragon
Bart wrote:Wait a minute -- sdl2-config is pointing to /usr/local/include, which seems right, whereas you had it in /usr/include, which does not seem correct. What's going on? Did you change something or manually install SDL2? My guess is that you unintentionally b0rked your SDL2 installation. Could it also be that you have multiple SDL2 installations around, with the wrong sdl2-config being picked up when you run that command?


From my experience, I think "/usr/include/SDL2" "is correct... and it's a problem with his SDL2 installation / config files...

I have mulitple machines running Ubunu 20.04 and 20.10, where SDL2 was installed via the standard repo packages, and they all have the SDL2 files in /usr/lib/SDL2 and /usr/lib

I also installed Arch Linux from scratch on another computer this morning, and it also has the SDL2 files in /usr/include/SDL2, and I had no issues building r843 from SVN.

From that machine:
Code: Select all
$ uname -a
Linux 5.10.3-arch1-1 #1 SMP PREEMPT Sun, 27 Dec 2020 10:50:46 +0000 x86_64 GNU/Linux
$ sdl2-config --cflags
-I/usr/include/SDL2 -D_REENTRANT
$ sdl2-config --libs
-L/usr/lib -pthread -lSDL2

Re: Supermodel failing to build

PostPosted: Thu Dec 31, 2020 6:19 pm
by Shoegazer
Thanks both of you for your help. I figured this out, here's what happened in case you're curious:

Last year when I was using an older version of Mint, I needed a newer version of SDL2, so I compiled and installed from source. However, apparently that process installs the files to /usr/local/include, as I discovered from here.

Earlier this year I updated Mint to the newest version, and it installed the same version of SDL2 as I had manually done, but to /usr/include instead. I then installed other dev libraries such as sdl2_net, which also installed to /usr/include. However, Mint apparently did not update the path, which explains why sdl2-config reflected /usr/local/include, and therefore why supermodel couldn't find the library.

After doing a make uninstall from source, the older manally-installed files were removed and now sdl2-config reflects /usr/include as it should. Supermodel now compiles successfully without any source modifications as well.

On a final note, this doesn't explain why supermodel compiled fine up until this month, perhaps it didn't need sdl2_net.h? In any event, all's well that ends well!