Page 1 of 1

make the source code error,need help

Posted: Tue Jun 04, 2013 9:36 am
by xfce
Hi all
I want to make the quadcopter similer as the crazyflie, but when I compile the source code, use make command, gives the error as below,can someone tell me where is the bug,Thanks.

[root@localhost bitcraze-crazyflie-firmware-e6f9fbdc42b3]# make
CLEAN_VERSION
VTMPL version.c
abort: there is no Mercurial repository here (.hg not found)
Traceback (most recent call last):
File "scripts/versionTemplate.py", line 20, in <module>
identify = subprocess.check_output(["hg", "identify", "-nitb"])
File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['hg', 'identify', '-nitb']' returned non-zero exit status 255
make: *** [version.c] Error 1
[root@localhost bitcraze-crazyflie-firmware-e6f9fbdc42b3]#

Re: make the source code error,need help

Posted: Tue Jun 04, 2013 3:15 pm
by marcus
Hi,

The build environment uses mercurial (hg) to include information about the version of firmware that you are building. Either you have to remove this step from the build process or place you code in a mercurial repository.

Re: make the source code error,need help

Posted: Wed Jun 05, 2013 1:49 am
by xfce
OKļ¼ŒThanks
could you please tell me how to solve the problem step by step or is there some documents for this

Re: make the source code error,need help

Posted: Wed Jun 05, 2013 2:02 am
by rmirwin2
I'm afraid there are lots of steps, but basically you have to create a local copy of the repository before you try to build. Maybe someone can give you the steps from the command line.

I find it simpler to use the Bitcraze Virtual Machine, running under VMware or VirtualBox on Windows 7.

Once you set up this VM, you'll find that it includes all the tools that you need, including Tortousel HG, which has a GUI that can assist you in download, updating, and managing your local files.

A link to information about the tools is in the Wiki, http://wiki.bitcraze.se/misc:osstools:index, and from there you can find help files.

Hope this helps some!
Rich

Re: make the source code error,need help

Posted: Tue Apr 28, 2015 6:52 pm
by vivekrk44
To solve it all you need to do is install tortoise hg and initialize the project.

So to do this

1. sudo apt-get install tortoisehg
2. cd to the root of the project (Lets call it /home/blah/crazyflie-firmware)
3. hg init
4. make

That solved the problem for me

Re: make the source code error,need help

Posted: Tue Apr 28, 2015 9:56 pm
by chad
vivekrk44 wrote:To solve it all you need to do is install tortoise hg and initialize the project.
That solved the problem for me
Hi vivekrk44, welcome to the forum!

This issue is really quite old (almost two years now). The current repository does not have a dependency on mercurial anymore, afaik. That is, you should be able to build without it installed. Are you using the latest available on GitHub in either the master or crazyflie2 branches?