Error Compiling git on Jaunty Today!

Ask for help regarding any technical issue or report any bug or OS independent issues.
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Error Compiling git on Jaunty Today!

Post by black » 02 Sep 2009, 12:14

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!
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
User avatar
Ces
Novice
Novice
Posts: 231
Joined: 19 Mar 2008, 23:46
Location: The hemisphere

Re: Error Compiling git on Jaunty Today!

Post by Ces » 02 Sep 2009, 13:30

Have you also installed the dev package?

(The file /usr/include/SDL/SDL_ttf.h comes with the libsdl-ttf2.0-dev package.)
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Re: Error Compiling git on Jaunty Today!

Post by black » 02 Sep 2009, 13:35

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?
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Error Compiling git on Jaunty Today!

Post by Jaxad0127 » 02 Sep 2009, 13:55

It doesn't appear to be looking for the header, just the library, which you did have installed.
Image
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Re: Error Compiling git on Jaunty Today!

Post by black » 02 Sep 2009, 14:05

Okay but any clues how to fix this?
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Error Compiling git on Jaunty Today!

Post by Jaxad0127 » 02 Sep 2009, 20:23

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.
Image
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Re: Error Compiling git on Jaunty Today!

Post by black » 03 Sep 2009, 03:35

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...
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Error Compiling git on Jaunty Today!

Post by Jaxad0127 » 03 Sep 2009, 04:13

No. The install lines.

Could you redo the first two build steps (autogen and configure)?
Image
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Re: Error Compiling git on Jaunty Today!

Post by black » 03 Sep 2009, 04:20

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.
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Re: Error Compiling git on Jaunty Today!

Post by black » 03 Sep 2009, 04:48

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!
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
User avatar
Freeyorp101
Administrator
Administrator
Posts: 708
Joined: 04 Nov 2008, 10:17
Location: New Zealand

Re: Error Compiling git on Jaunty Today!

Post by Freeyorp101 » 03 Sep 2009, 05:23

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
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Error Compiling git on Jaunty Today!

Post by Jaxad0127 » 03 Sep 2009, 05:47

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.
Image
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Re: Error Compiling git on Jaunty Today!

Post by black » 03 Sep 2009, 07:12

Lol is it that big problem??? and there isn't a command that adds another directory to GCC include path?
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
User avatar
jcdvsrbld
Peon
Peon
Posts: 42
Joined: 20 Jul 2009, 19:50

Re: Error Compiling git on Jaunty Today!

Post by jcdvsrbld » 03 Sep 2009, 08:01

this worked really well on my jaunty, just substitute packages as needed 8)

http://www.ubuntu-inside.me/2009/05/how ... it-on.html
"quis custodiet ipsos custodes"
User avatar
black
Peon
Peon
Posts: 65
Joined: 02 Sep 2009, 12:02
Location: Lahore, Pakistan.

Re: Error Compiling git on Jaunty Today!

Post by black » 03 Sep 2009, 08:12

Not for me maybe because I updated from 8.04?? I think that's the reason...
"Don't know ourselves yet we blame others" - B|_aCk

LoOp.pk Pakistan's Photography and Photographers
Post Reply