You could execute ldconfig to see if that takes care of the problem not finding the SDL libraries. Also, SDL installs the file sdl-config. This is used by other applications when they are built against SDL to get information that is passed to gcc. For example, on my x86_64 box, I have both 32-bit and 64-bit SDL installed and checking the --libs (there are other switches to pass to sdl-config)
Code:
103 files(230M bytes) - /home/weibullguy
weibullguy@aragorn for 0h55m $ USE_ARCH=64 sdl-config --libs
-L/usr/lib64 -Wl,-rpath,/usr/lib64 -lSDL -lpthread
103 files(230M bytes) - /home/weibullguy
weibullguy@aragorn for 0h55m $ USE_ARCH=32 sdl-config --libs
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread
Whichever ABI is installed first will be over written by the second ABI you install unless there is some way to differentiate between the two. Don't know how Ubuntu/Debian does it, but keep this in mind if you build from source. SDL isn't the only package that has these config files instead of using metadata (*.pc) files.
BTW, you executed file on the 64-bit library, not the 32-bit library.
Code:
/usr/lib/libSDL_image-1.2.so.0.1.5
Of course, the 32-bit libraries are supposed to be in lib, not lib32 IAW the FHS.