-   Linux - Newbie (
-   -   Problems comiling Wesnoth for my Ubuntu (

Beekman 09-24-2010 09:54 AM

Problems comiling Wesnoth for my Ubuntu
Hi, I want to run the development version of the game Battle for Wesnoth, but I'm having some problems compiling it...

I downloaded the latest version (1.9.1) and followed the installation instructions;

cd /usr/src
sudo tar -xvjf wesnoth-1.9.1.tar.bz2
cd wesnoth-1.9.1
sudo ./configure --datadir=/usr/share/games/wesnoth/

I managed to get to this point, after some small problems, but 'configure' told me I needed SDL.
I installed SDL (libsdl1.2-dev) using the Software Center, but now it sais;

checking for SDL - version >= 1.2.7 and SDL_ttf - version >= 2.0.8... no
configure: error: *** Please upgrade your SDL and/or SDL_ttf version

The version that was installed seems to be 1.2.14
I also looked for sdl-ttf, and that was also already installed (version 2.0.9)

What would be the best thing to do for me, to get this working?

Simon Bridge 09-24-2010 11:04 AM

You installed the libs through the software center?

Open a terminal and enter:

sudo apt-get install libsdl-dev

that should collect anything you have missed, give you an error or tell you it is already the latest version.

(When coding, do as much as possible via commandline.)

Beekman 09-24-2010 11:30 AM

Thanks for the reply...

Still te same problem, because it didn't update anything (already at the latest version, 0 updated etc...)

knudfl 09-24-2010 11:49 AM

Is libsdl-ttf2.0-dev installed ? libsdl1.2-dev ?

And by the way ... sudo ./configure : is wrong.
Only 'make install' needs sudo , not ./configure , not make.


Beekman 09-24-2010 01:35 PM

Thanks, installing libsdl-ttf2.0-dev solved that problem indeed!
After that I had to install libsdl-image-dev, libdsl-mixer-dev and libdsl-net-dev.

After that I got the message;

checking for Boost headers version >= 1.35... no
configure: error: Could not find Boost headers version >= 1.35

I installed libboost-dev (first using software center, second using apt-get), but the problem persists...

Besides this last problem, I'm getting the feeling I'm doing something wrong...
Is everybody who has to compile this code installing all these lib's one-by-one?

O, I needed libboost-all-dev instead of the default libboost-dev.
Now I can continue searching for the other missing lib's...

Simon Bridge 09-24-2010 01:39 PM

I'll second the comment about sudo on ./configure - only ever install as root. If that turns out to be the problem I'll mumble mutter grumble... anyway:
there are neat discussions about all the different ways this error can appear on the wesnoth forums... seems I should have added the explicit install for libsdl-ttf-dev as well ... that would be:

sudo apt-get install libsdl-ttf2.0-dev

the most common cause of the error is missing dev libs for the main libs.

Beekman 09-24-2010 01:54 PM

I've forgotten why I sudoed configure... Maybe it was preventive :)
But the tar-command I had to sudo, because the installation instructions said to go to /usr/src/ and I didn't have the permissions to make directories there without sudo...

The first time I tried it, I created a directory as root and chmodded it. That's probably a better way to go then?

ANyway, the configure now finally succeeded.
But make gives me;

lapi.c:1086: fatal error: opening dependency file .deps/lapi.Tpo: Permission denied
My first try would be to sudo it, but I'll wait for your comments before I do something stupid again :p

knudfl 09-24-2010 02:05 PM

/usr/src/ is not meant for building anything.
Or anywhere else in " / " , except /home/...

Default is : /home/<name>/tmp/ ( Or another directory in /home/<name>/ )

.. And good luck with 'Battle for Wesnoth' + libboost1.40-all-dev !

CincinnatiKid 09-24-2010 02:59 PM

As far as I know, only kernel source should be in /usr/src. I always compile things in my /home/user directory, /usr/local/src might be a good alternative if you really don't want to use /home to compile things.

Simon Bridge 09-25-2010 03:02 AM

Probably a good idea if you show us where these instructions come from. Presumably they did not come with the tarball?

Beekman 09-25-2010 04:22 AM

cd /usr/src
tar -xvjf wesnoth-1.x.x.tar.bz2
cd wesnoth-1.x.x
./configure --datadir=/usr/share/games ...
sudo make install

knudfl 09-25-2010 07:38 AM

Post # 11

cd /usr/src
Yes, don't believe everything, you read on the internet.
/usr/src/ is definitely a misunderstanding.

All times are GMT -5. The time now is 10:38 PM.