Servers by jDrones

Compiling in ubuntu 18.10


(Joshua Wojnas) #1

I am unable to run waf ./waf
I am trying to run
./waf configure --board px4-v3
in the tutorial


i get
/Downloads/ardupilot-master$ ./waf configure --board px4-v3
/usr/bin/python: can’t open file ‘/home/josheeg/Downloads/ardupilot-master/modules/waf/waf-light’: [Errno 2] No such file or directory
Missing waf submodule. Trying to get it
fatal: not a git repository (or any of the parent directories): .git
Could not update submodule


(James Pattison) #2

I’d suggest starting here: http://ardupilot.org/dev/docs/where-to-get-the-code.html
and working through the guide.
It looks as though you either don’t have git installed, or downloaded the zip file rather than clone the repository.
Have a go using the procedure I linked, and it should work.


(Joshua Wojnas) #3

you are correct I didn’t use git to download and work with the ardupilot folder that is new and different.
I am much further with a bug in the make part of sitl


(Joshua Wojnas) #4

I have tried building the different ardupilot builds as shown in this step
./waf configure --board px4-v3

I get
Setting top to : /home/josheeg/ardupilot-master
Setting out to : /home/josheeg/ardupilot-master/build
Autoconfiguration : enabled
Setting board to : px4-v3
Using toolchain : arm-none-eabi
Checking for ‘g++’ (C++ compiler) : /usr/bin/arm-none-eabi-g++
Checking for ‘gcc’ (C compiler) : /usr/bin/arm-none-eabi-gcc
Checking for c flags ‘-MMD’ : yes
Checking for cxx flags ‘-MMD’ : yes
Traceback (most recent call last):
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Scripting.py”, line 159, in waf_entry_point
run_commands()
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Scripting.py”, line 252, in run_commands
ctx = run_command(cmd_name)
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Scripting.py”, line 236, in run_command
ctx.execute()
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Configure.py”, line 159, in execute
super(ConfigurationContext, self).execute()
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Context.py”, line 204, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Context.py”, line 286, in recurse
user_function(self)
File “/home/josheeg/ardupilot-master/wscript”, line 233, in configure
cfg.get_board().configure(cfg)
File “Tools/ardupilotwaf/boards.py”, line 751, in configure
super(px4, self).configure(cfg)
File “Tools/ardupilotwaf/boards.py”, line 44, in configure
self.configure_env(cfg, env)
File “Tools/ardupilotwaf/boards.py”, line 755, in configure_env
super(px4, self).configure_env(cfg, env)
File “Tools/ardupilotwaf/boards.py”, line 219, in configure_env
cfg.srcnode.find_dir(‘modules/uavcan/libuavcan/include’).abspath()
AttributeError: ‘NoneType’ object has no attribute ‘abspath’

Now I figured try the other options see if I get the same result?
Setting top to : /home/josheeg/ardupilot-master
Setting out to : /home/josheeg/ardupilot-master/build
Autoconfiguration : enabled
Setting board to : px4-v3
Using toolchain : arm-none-eabi
Checking for ‘g++’ (C++ compiler) : /usr/bin/arm-none-eabi-g++
Checking for ‘gcc’ (C compiler) : /usr/bin/arm-none-eabi-gcc
Checking for c flags ‘-MMD’ : yes
Checking for cxx flags ‘-MMD’ : yes
Traceback (most recent call last):
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Scripting.py”, line 159, in waf_entry_point
run_commands()
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Scripting.py”, line 252, in run_commands
ctx = run_command(cmd_name)
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Scripting.py”, line 236, in run_command
ctx.execute()
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Configure.py”, line 159, in execute
super(ConfigurationContext, self).execute()
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Context.py”, line 204, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File “/home/josheeg/ardupilot-master/modules/waf/waflib/Context.py”, line 286, in recurse
user_function(self)
File “/home/josheeg/ardupilot-master/wscript”, line 233, in configure
cfg.get_board().configure(cfg)
File “Tools/ardupilotwaf/boards.py”, line 751, in configure
super(px4, self).configure(cfg)
File “Tools/ardupilotwaf/boards.py”, line 44, in configure
self.configure_env(cfg, env)
File “Tools/ardupilotwaf/boards.py”, line 755, in configure_env
super(px4, self).configure_env(cfg, env)
File “Tools/ardupilotwaf/boards.py”, line 219, in configure_env
cfg.srcnode.find_dir(‘modules/uavcan/libuavcan/include’).abspath()
AttributeError: ‘NoneType’ object has no attribute ‘abspath’

That one seemed to work so I figured why not try sitl at least
well I get this error
osheeg@josheeg-Vostro-220-Series:~/ardupilot-master$ ./waf copter
Waf: Entering directory `/home/josheeg/ardupilot-master/build/sitl’
Command [’/usr/bin/git’, ‘rev-parse’, ‘–short=8’, ‘HEAD’] returned 128

What an I doing wrong?


(Khancyr) #6

hello,

In ardupilot directory, type :

git submodule update --init --recursive


(Joshua Wojnas) #7

I think git is not the git website release but the ubuntu level release and I went to the git page and it is installing from their instructions.


(Joshua Wojnas) #8

I didn’t see a responce from it but I tried this and got a download sudo apt install git-all


(Joshua Wojnas) #9

still the same error I also tried installing mavproxy incase something it had allowed the person to compile.
If someone has done this. a virtual ubuntu 18 system could compile sitl and show eatch step by screencast or just coppied and paste into a quickstart.


(Joshua Wojnas) #10

https://ardupilot.github.io/MAVProxy/html/getting_started/download_and_installation.html
still doesnt compile
how do I update waf? How should I install it?


(Joshua Wojnas) #11

how do I update waf? How should I install it?


(Moobsen) #12

Try doing a

git submodule update

that solves 95% of the build problems I experienced.

If you are not already, I recommend only working with git. Do not waste too much time on tar or zip source code releases.

If you want to work efficiently with source code, you will need to have a basic git understanding in any case.

To answer your question, waf is build tool, which “comes” with the ardupilot source code, as a submodule. To update it, see above. You can of course also go to https://gitlab.com/ita1024/waf/ and try to get the newest version there, but I don’t recommend that, as the tested/working waf version will be the submodule version.


(Joshua Wojnas) #13

I installed git from git website not Ubuntu I got a newer version ran all scripts copter built.


(Moobsen) #14

So you are saying it is working for you?

If you use Ubuntu I’d recommend installing via apt. Downloading via websites works. but is time consuming.


(Joshua Wojnas) #15

I think you mean like apt like how git is installed on gits site


(Spencer Manning) #16

I had the same problem where it was telling me it couldn’t find the submodules. Everyone here in this thread that answered with updating your git repository is totally right, because you are missing the files in the modules/waf folder. BUT for me, updating the git repo wasn’t loading in those files because they are posted online on a different commit number than what I was updating to (if that makes any sense) See image.

Anyways, if you’re really stuck, just try manually downloading all the files from here (https://github.com/ArduPilot/waf/tree/337b0a96beeac517ecde081fb76dedd039089734) and pasting them into your waf subfolder. This is JUST to see if not having the files is the problem. You can go back later and put in a good reference to the updated versions of the files.