Building arducopter returns error

Hello,

I tried to compile arducopter and I got an error related to uavcan apparently.

[14/15] CMake Build px4 msg_gen
No such file or directory
CMake Error: Generator: execution of make failed. Make command was: “” “msg_gen”

Compiler failure
Traceback (most recent call last):
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 300, in enum_last_value
last = next(it)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 107, in run_generator
text = generate_one_type(template_expander, t)
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 239, in generate_one_type
text = template_expander(t=t) # t for Type
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 307, in expand
return template(**args)
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1030, in call
u = “”.join(self._render(self.parsetree, self.current_data))
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1130, in render
output.extend(self.render(elem[2], data))
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1104, in render
output.append(unicode(_eval(elem[1], data)))
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1079, in _eval
return self.evalfunc(expr, data)
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 884, in eval
x = eval(self.compile(expr), {“builtins”:self.eval_allowed_globals}, locals)
File “”, line 1, in
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1030, in call
u = “”.join(self._render(self.parsetree, self.current_data))
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1104, in render
output.append(unicode(_eval(elem[1], data)))
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1079, in _eval
return self.evalfunc(expr, data)
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 884, in eval
x = eval(self.compile(expr), {“builtins”:self.eval_allowed_globals}, locals)
File “”, line 1, in
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1030, in call
u = “”.join(self._render(self.parsetree, self.current_data))
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1138, in render
output.extend(self.render(elem[1], data))
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py”, line 1119, in render
for i in loop_iter:
RuntimeError: generator raised StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdlc”, line 61, in
dsdlc_run(args.source_dir, args.incdir, args.outdir)
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 62, in run
run_generator(types, output_dir)
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 111, in run_generator
die(ex)
File “/home/michiel/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 89, in die
raise DsdlCompilerException(str(text))
libuavcan_dsdl_compiler.DsdlCompilerException: generator raised StopIteration
generator raised StopIteration

uavcangen returned 1 error code

I am running arch linux, uavcan is installed in both pip2 and pip3. (The error occured before I installed those as well).

Anyone got any tips for me?

Thanks in advance,
Michiel

have you updated the subomdules? using

git subomdule update --init --recursive

This does not resolve the issue, unfortunately

One thing I forgot to mention, I am able to build it for SITL, what I am trying is px4-v3, which does not work

Which build system are you using?
Have you followed an instruction here which install prerequisites
http://ardupilot.org/dev/docs/building-setup-linux.html
If not type follow in ardupilot directory

Tools/scripts/install-prereqs-arch.sh -y
. ~/.profile

Have you tried waf build system any chance?
If not type follow in ardupilot directory

./waf configure --board=px4-v3
./waf copter

Yes I have followed the entire build page, to no avail.

I think px4-v3 builds the old nuttx it is fmuv3 for the new chibios, nuttx might not build on master anymore

So what do you suggest? Which branch is better to build?

nuttx is out of date now support is finishing, use ChibiOS

Okay, I set a different build target. Still same error.