How to compile Git Repo with Eclipse

How to compile Git Repo with Eclipse

Postby wanher » 18 May 2014, 02:29

Hello,

I am just getting starting and trying to compile my repository (git repo) using eclipse in ubuntu 12.04. It fails with the following error :

/usr/bin/cmake -E echo "#ifndef VERSION_H" > /home/ME/SperTuxworkspace/supertux-build/version.h.tmp
/usr/bin/cmake -E echo "#define VERSION_H" >> /home/ME/SperTuxworkspace/supertux-build/version.h.tmp
/usr/bin/cmake >> /home/ME/SperTuxworkspace/supertux-build/version.h.tmp -E echo_append "#define PACKAGE_VERSION \"0.3.4-GIT commit "
/usr/bin/git rev-parse --sq HEAD >> /home/ME/SperTuxworkspace/supertux-build/version.h.tmp
fatal: Not a git repository (or any of the parent directories): .git
make[2]: *** [CMakeFiles/gitversion] Error 128

Has anyone been able to successfully use eclipse to build a git repo or are the instructions on the wiki only specific to a SVN repo. i follow the instructions below and created a build folder as instructed on the wiki page:
[[[
run cmake inside that build directory using the eclipse generator:
cmake -G"Eclipse CDT4 - Unix Makefiles" /path/to/source
now open eclipse and select File -> import -> general -> existing project into workspace
Select your build directory as root directory and click finish.
]]]

Thanks
User avatar
wanher
 
Posts: 5
Joined: 23 Sep 2013, 02:23

Re: How to compile Git Repo with Eclipse

Postby Tobbi » 18 May 2014, 12:49

Seems it was my change that got you there. I will investigate the issue further.

Thanks for bringing this to my attention.

--Tobbi
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: How to compile Git Repo with Eclipse

Postby wanher » 18 May 2014, 17:18

Hi Tobbi,

What did you mean and which change are you referring to ? Are you saying that building the Git repo from eclipse is currently being done ? What exactly is the root cause of this error ?
User avatar
wanher
 
Posts: 5
Joined: 23 Sep 2013, 02:23

Re: How to compile Git Repo with Eclipse

Postby Tobbi » 19 May 2014, 01:50

Hi wanher,

I am not sure if other people ever attempted this, I certainly always built using the command line. I introduced Git version vs. SVN version in https://code.google.com/p/supertux/sour ... 0843d7ffc6 to show the GIT revision in SuperTux instead of just "Unversioned Directory". So, assuming that Eclipse stores the repository information somewhere else than if you had checked out using the command line, this would likely cause the build to fail.

--Tobbi
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Who is online

Users browsing this forum: No registered users and 1 guest