Page 1 of 2

Error Compiling git on Jaunty Today!

Posted: 02 Sep 2009, 11:14
by black
Hello!
I am trying to compile on Jaunty Ubuntu 9.04 today with the latest snapshot from git. But I am having compile errors. Here are the errors:

Code: Select all

In file included from gui/widgets/textpreview.cpp:27:
./gui/truetypefont.h:35:21: error: SDL_ttf.h: No such file or directory
In file included from gui/widgets/textpreview.cpp:27:
./gui/truetypefont.h:74: error: ISO C++ forbids declaration of ‘TTF_Font’ with no type
./gui/truetypefont.h:74: error: expected ‘;’ before ‘*’ token
make[2]: *** [gui/widgets/tmw-textpreview.o] Error 1
make[2]: Leaving directory `/home/black/programmin/tmw/tmw/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/black/programmin/tmw/tmw'
make: *** [all] Error 2
Yes I have installed the libsdl-ttf relevant packages and I have also discussed this with devs on the irc channels, they say they are getting no errors, can any one help me please?

I used to code for http://www.planeshift.it a while ago and added some leet feautres, I want to help so please help me compile first. Thankyou very much!

B|_aCk!

Re: Error Compiling git on Jaunty Today!

Posted: 02 Sep 2009, 12:30
by Ces
Have you also installed the dev package?

(The file /usr/include/SDL/SDL_ttf.h comes with the libsdl-ttf2.0-dev package.)

Re: Error Compiling git on Jaunty Today!

Posted: 02 Sep 2009, 12:35
by black
Of course I have installed it and all other packages. Just a question, if I haven't installed some packages like this one then why is the "configure" successful?

Re: Error Compiling git on Jaunty Today!

Posted: 02 Sep 2009, 12:55
by Jaxad0127
It doesn't appear to be looking for the header, just the library, which you did have installed.

Re: Error Compiling git on Jaunty Today!

Posted: 02 Sep 2009, 13:05
by black
Okay but any clues how to fix this?

Re: Error Compiling git on Jaunty Today!

Posted: 02 Sep 2009, 19:23
by Jaxad0127
This lists the package names you need (in nice, command-line-ready commands): http://wiki.themanaworld.org/index.php/ ... ompilation. Note that following the rest of the guide will have you also compiling guichan and putting both under ~. That's needed for Hardy and lower, but not you. Just get those first dependency lines. Add libguichan and libguichan-dev to one of them.

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 02:35
by black
Thank you very much jaxad but when I run that apt-get install commands (both of em) it says 0 installed, 0 upgraded. So I have all those packages. And by those dependency lines you mean those export lines? I also ran those but still the same error as above...

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 03:13
by Jaxad0127
No. The install lines.

Could you redo the first two build steps (autogen and configure)?

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 03:20
by black
I did no success. Up till now I was hindering in changing the source but now I did and success :D

The problem is solved if in "gui/truetypefont.h" I change this "#include <SDL_ttf.h>" to this "#include "/usr/include/SDL/SDL_ttf.h" "

It appears that the GCC cant find the path for SDL libs, how can I configure the GCC to find them automatically coz If I change it this way my source will differ and my patches will mess your repository up.

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 03:48
by black
And I also deleted the file gui/truetypefont.h what is the git command to get it back from the main repo? I've reading tutorials and trying pull, fetch etc but cant get it back pull says the local repo is already updated. Please help!

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 04:23
by Freeyorp101

Code: Select all

git reset --hard origin
Will completely reset your repository to origin, removing all local changes.


If you have some changes that you want to keep:

Code: Select all

git add <file>
for each of the files you want to keep, then

Code: Select all

git commit
to locally commit the changes in the files you added, then

Code: Select all

git reset --hard HEAD
to remove all other changes by resetting to your local commit.


Hope this helps. :)


---Freeyorp

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 04:47
by Jaxad0127
You can easily restore a file with this:

Code: Select all

git checkout <path>
As for that weirdness with include paths, ask Ubuntu about it. You're the first to report it.

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 06:12
by black
Lol is it that big problem??? and there isn't a command that adds another directory to GCC include path?

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 07:01
by jcdvsrbld
this worked really well on my jaunty, just substitute packages as needed 8)

http://www.ubuntu-inside.me/2009/05/how ... it-on.html

Re: Error Compiling git on Jaunty Today!

Posted: 03 Sep 2009, 07:12
by black
Not for me maybe because I updated from 8.04?? I think that's the reason...