Thu 24 Mar 2011 06:00:12 AM UTC, comment #2:
Thanks, configure runs okay with these options: --disable-sdltest --with-boost-includedir=/usr/local/include
But backing up a little, only the base SDL package supplies a pkg-config file: /usr/local/lib/pkgconfig/sdl.pc (the sdl-mixer , sdl-sound, etc. packages don't contain any such files).
However, pkg-config and sdl-config just return the same stuff:
$ pkg-config --libs sdl
-L/usr/local/lib -pthread -L/usr/X11R6/lib -R/usr/X11R6/lib -lSDL
$ sdl-config --libs
-L/usr/local/lib -lSDL -pthread -L/usr/X11R6/lib -R/usr/X11R6/lib
Well, almost anyway. The pkg-config CFLAGS don't include /usr/local/include:
$ pkg-config --cflags sdl
-I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -DXTHREADS
$ sdl-config --cflags
-I/usr/local/include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -DXTHREADS
Maybe /usr/local/include should also be in sdl.pc, or cpp might not find the headers given in the form of "<SDL/foo.h>" rather than just "<foo.h>". Or maybe cpp is intelligent enough to figure it out? (I don't know...)
But, I think the real problem here is with the configure script itself, because it's not directly using either the output from pkg-config or sdl-config. I changed the first line in configure to "#!/bin/sh -x" to see how it tries to compile the test program:
+ CFLAGS=-g -O2 -I/usr/local/include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -DXTHREADS
+ LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lSDL_mixer
The LDFLAGS ends up with -lSDL_mixer instead of -lSDL, which is okay (but strange that it didn't just use the output from pkg-config or sdl-config), and is also missing the -pthread option which is probably the real issue (manually trying to compile the test program, like I did in the original post, will fail without this option).
Now I've bored everyone to death, let me go on to the next bug. :-) After configure finishes, gmake runs for several hours (the build machine is an old laptop...) and stops here:
player.cpp: In member function `void Player::initTurn()':
player.cpp:301: warning: int format, size_t arg (arg 2)
player.cpp: In member function `bool
Player::setPathOfStackToPreviousDestination(Stack*)':
player.cpp:4401: error: no match for 'operator!=' in 'it != std::list<_Tp,
_Alloc>::rend() [with _Tp = Action, _Alloc = std::allocator<Action>]()'
rectangle.h:55: error: candidates are: bool operator!=(const Rectangle&, const
Rectangle&)
I hope that error message makes sense to you...
BTW, the build generates some really big files, but maybe that's normal:
$ du -sh /home/build/lordsawar-0.2.0/
681M /home/build/lordsawar-0.2.0/
|