[SOLVED] having problems compiling....

Ask for help regarding any technical issue or report any bug or OS independent issues.
Locked
Dr Wahl
Warrior
Warrior
Posts: 317
Joined: 09 Apr 2006, 06:15
Location: Washington

[SOLVED] having problems compiling....

Post by Dr Wahl »

i am trying to compile tmw on my own on Ubuntu Edgy kernel 2.6.17-10. I tried the repository, but it didnt seem to work, so i started compiling it myself. I believe i have met all the dependancies (./configure completes without errors) but when i do "sudo make" i get this error:

make[2]: Entering directory `/home/drwahl/tmw-0.0.21.1/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -DTMW_DATADIR=\""/usr/local/share/tmw/"\" -Wall -Werror -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT `pkg-config --cflags libxml-2.0` -I/usr/local/include -g -O2 -MT tmw-char_server.o -MD -MP -MF ".deps/tmw-char_server.Tpo" -c -o tmw-char_server.o `test -f 'gui/char_server.cpp' || echo './'`gui/char_server.cpp; \
then mv -f ".deps/tmw-char_server.Tpo" ".deps/tmw-char_server.Po"; else rm -f ".deps/tmw-char_server.Tpo"; exit 1; fi
In file included from gui/char_server.cpp:34:
gui/../net/network.h:28:21: error: SDL_net.h: No such file or directory
gui/../net/network.h:77: error: ‘TCPsocket’ does not name a type
make[2]: *** [tmw-char_server.o] Error 1
make[2]: Leaving directory `/home/drwahl/tmw-0.0.21.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/drwahl/tmw-0.0.21.1'
make: *** [all] Error 2


any ideas?
Image
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

gui/../net/network.h:28:21: error: SDL_net.h: No such file or directory
You didn't install all the necessary development packages. In particular, you didn't install libsdl-net1.2-dev.
Dr Wahl
Warrior
Warrior
Posts: 317
Joined: 09 Apr 2006, 06:15
Location: Washington

Post by Dr Wahl »

ok... i misunderstood it then... i installed the lib_net but not the -dev package... lemme give that a try :) thanks
Image
Dr Wahl
Warrior
Warrior
Posts: 317
Joined: 09 Apr 2006, 06:15
Location: Washington

Post by Dr Wahl »

on a second attempt (this time with sdl_net-dev):

Making all in src
make[2]: Entering directory `/home/drwahl/tmw-0.0.21.1/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -DTMW_DATADIR=\""/usr/local/share/tmw/"\" -Wall -Werror -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT `pkg-config --cflags libxml-2.0` -I/usr/local/include -g -O2 -MT tmw-setup_audio.o -MD -MP -MF ".deps/tmw-setup_audio.Tpo" -c -o tmw-setup_audio.o `test -f 'gui/setup_audio.cpp' || echo './'`gui/setup_audio.cpp; \
then mv -f ".deps/tmw-setup_audio.Tpo" ".deps/tmw-setup_audio.Po"; else rm -f ".deps/tmw-setup_audio.Tpo"; exit 1; fi
In file included from gui/setup_audio.cpp:34:
gui/../sound.h:27:23: error: SDL_mixer.h: No such file or directory
gui/../sound.h:116: error: ISO C++ forbids declaration of ‘Mix_Music’ with no type
gui/../sound.h:116: error: expected ‘;’ before ‘*’ token
make[2]: *** [tmw-setup_audio.o] Error 1
make[2]: Leaving directory `/home/drwahl/tmw-0.0.21.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/drwahl/tmw-0.0.21.1'
make: *** [all] Error 2

i tried to pick out that "gui/../sound.h:27:23: error: SDL_mixer.h: No such file or directory" so i downloaded libsdl-mixer1.2_1.2.6-1_i386.deb and its dependancies. maybe i missed something?
Image
Dr Wahl
Warrior
Warrior
Posts: 317
Joined: 09 Apr 2006, 06:15
Location: Washington

Post by Dr Wahl »

ok i seem to have downloaded and installed all the dependancies and libraries (took a little longer than expected... ./configure went off without a hitch, as well as make and make install. but now i am getting an error when i try to run tmw:

tmw: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
Image
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

First, make sure the tmw executable that you're running is actually the one you just built. Without doing a "make install", the executable you compiled should also work fine by just running "src/tmw".

If the above doesn't give you the same error, then you've probably installed TMW to /usr/local/bin instead of /usr/bin, and another tmw executable in /usr/bin has a problem with libcurl.

If this problem does indeed occur with the tmw executable you just compiled, then it must have been linked to a different version of libcurl than your system uses at load time. This is very unlikely, but again you may have libcurl libraries in both /usr/local/lib as well as /usr/lib which are different versions or something.
Dr Wahl
Warrior
Warrior
Posts: 317
Joined: 09 Apr 2006, 06:15
Location: Washington

Post by Dr Wahl »

after spending some time on the irc with deesine (thanks again) we finally got it to work. I had originally thought it would be best to use the repo., but i was getting about 10-15 dep. errors. at that point, i decide to build from scratch, downloading every dep. along the way. after ./configure and make and make install went off without a hitch, i had errors trying to run the game. for no reason in particular, i thought i would try apt-get install tmw again, and guess what? it worked! apparently i had met the deps that were previously unmet. thanks for all the help everyone!
Image
Locked