Servers by jDrones

Rebuilding Rover but encountering errors

I have just installed:
Eclipse Version: 2019-12 (4.14.0)
Build id: 20191212-1212

PX4 Toolchain v 0.8

Python 3.8 (used to have Python 2.7)

Rover 4.0.0 software

Now I get the following error when trying to build a “clean” target as my first target.
15:09:55 **** Build of configuration Default for project ardupilot ****
“c:\cygwin64\bin\python3.8” waf clean
The project was not configured: run “waf configure” first!
“c:/cygwin64/bin/python3.8 waf clean” terminated with exit code 1. Build might be incomplete.

15:10:02 Build Finished. 0 errors, 0 warnings. (took 6s.207ms)
I have no idea how to run “waf configure” first!
Please help.

I am concerned that there may be issues with a “path” variable or environmental variable in my PC due to the new Python 3.8. Is there any documentation which describes all of the places a path variable would require attention for Python 3.8?
Thanks

you need to configure for your board, for example ./waf configure --board CubeBlack
then ./waf rover

edit: this is the cheat sheet

1 Like

Hi @jwcalvert,

So I guess you’re following the instructions from here on the wiki? I’m just wondering why the px4 toolchain was being installed because this shouldn’t be necessary anymore now that we’re on ChibiOS. It shouldn’t hurt but if it’s written somewhere on the wiki I’d like to fix that.

Right at the bottom of this wiki page it links to this other wiki page which describes how the “waf configure” should be run but in short you’ll need to open a Cygwin terminal (if using the cygwin method) or a command prompt (if the WSL method was used) and then cd to the ardupilot directory and run “./waf configure --board CubeBlack” (or whichever board you want to compile for).

By the way, we also have a developer chat here.

Peter,

Thank you for your reply.

I have carefully gotten to this step and have run into a problem.

What is ./waf ?

Where is it located?

I tried running from the DOS prompt in the ardupilot folder and it did not recognize it as a valid command.

Did I miss a crucial step involving waf ?

Thanks

Jim Calvert

image001.jpg

“waf” is the equivalent of “make”. It depends if you’ve got the cygwin route or the WSL route. If you’re using cygwin then you’ll need to open a cygwin prompt instead of a DOS prompt.

Hello Randy,
I did run it from the Cygwin prompt and got good results to a point.
And then this happened:

JimCalvert@Quad9550 /cygdrive/g/development/thumperdev/ardupilot
$ ./waf configure --board Pixhawk1
Setting top to : G:\development\thumperdev\ardupilot
Setting out to : G:\Development\ThumperDev\ardupilot\build

Autoconfiguration : enabled
Setting board to : Pixhawk1
Using toolchain : arm-none-eabi
Checking for ‘g++’ (C++ compiler) : C:\Program Files (x86)\GNU Tools ARM Embed
ded\6 2017-q2-update\bin\arm-none-eabi-g++.exe
Checking for ‘gcc’ (C compiler) : C:\Program Files (x86)\GNU Tools ARM Embed
ded\6 2017-q2-update\bin\arm-none-eabi-gcc.exe
Checking for c flags ‘-MMD’ : yes
Checking for cxx flags ‘-MMD’ : yes
Checking for program ‘make’ : C:\cygwin64\bin\make.exe
Checking for program ‘arm-none-eabi-objcopy’ : C:\Program Files (x86)\GNU Tools ARM E
mbedded\6 2017-q2-update\bin\arm-none-eabi-objcopy.exe
‘C:\Users\Jim’ is not recognized as an internal or external command,
operable program or batch file.
Failed to process hwdef.dat ret=1
(complete log in G:\Development\ThumperDev\ardupilot\build\config.log)

It appears that it is misreading a part of my path as shown here: ‘C:\Users\Jim’ is not recognized as an internal or external command,

The last part of the config.log is:

find program=[‘ar’] paths=[‘C:\cygwin64\usr\local\bin’, ‘C:\cygwin64\bin’, ‘C:\Program Files (x86)\Common Files\Oracle\Java\javapath’, ‘C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common’, ‘C:\WINDOWS\system32’, ‘C:\WINDOWS’, ‘C:\WINDOWS\System32\Wbem’, ‘C:\WINDOWS\System32\WindowsPowerShell\v1.0’, ‘C:\Program Files (x86)\Common Files\Acronis\SnapAPI’, ‘C:\Program Files (x86)\Acronis\TrueImageHome’, ‘C:\Program Files (x86)\MHV AVR Tools\bin’, ‘C:\HashiCorp\Vagrant\bin’, ‘C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn’, ‘C:\Program Files (x86)\QuickTime\QTSystem’, ‘C:\Program Files\IDM Computer Solutions\UltraEdit’, ‘C:\Program Files (x86)\Common Files\Acronis\VirtualFile’, ‘C:\Program Files (x86)\Common Files\Acronis\VirtualFile64’, ‘C:\WINDOWS\System32\OpenSSH’, ‘C:\Program Files (x86)\MAVProxy’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38\Scripts’, ‘C:\Program Files\Git\cmd’, ‘C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38\Scripts’, ‘C:\Users\Jim Calvert\AppData\Local\Microsoft\WindowsApps’, ‘C:\Users\Jim Calvert\AppData\Local\GitHubDesktop\bin’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python37-32\Scripts’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python37-32’] var=‘AR’ -> [‘C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-ar.exe’]
C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-gcc.exe

Checking for c flags ‘-MMD’
==>
int main() { return 0; }
<==
[1/1] Compiling e[32m…\Development\ThumperDev\ardupilot\build\conf_check_f83722477ce152ad8eada138917a7311\test.ce[0m

[‘C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-gcc.exe’, ‘-MMD’, ‘-DWAF_BUILD=1’, ‘…\…\test.c’, ‘-c’, ‘-otest.c.1.o’]
yes

Checking for cxx flags ‘-MMD’
==>
int main() { return 0; }
<==
[1/1] Compiling e[32m…\Development\ThumperDev\ardupilot\build\conf_check_9e9ab452db01b20457f78884b8991960\test.cppe[0m

[‘C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-g++.exe’, ‘-MMD’, ‘-DWAF_BUILD=1’, ‘…\…\test.cpp’, ‘-c’, ‘-otest.cpp.1.o’]
yes

Checking for program ‘make’
C:\cygwin64\bin\make.exe
find program=[‘make’] paths=[‘C:\cygwin64\usr\local\bin’, ‘C:\cygwin64\bin’, ‘C:\Program Files (x86)\Common Files\Oracle\Java\javapath’, ‘C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common’, ‘C:\WINDOWS\system32’, ‘C:\WINDOWS’, ‘C:\WINDOWS\System32\Wbem’, ‘C:\WINDOWS\System32\WindowsPowerShell\v1.0’, ‘C:\Program Files (x86)\Common Files\Acronis\SnapAPI’, ‘C:\Program Files (x86)\Acronis\TrueImageHome’, ‘C:\Program Files (x86)\MHV AVR Tools\bin’, ‘C:\HashiCorp\Vagrant\bin’, ‘C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn’, ‘C:\Program Files (x86)\QuickTime\QTSystem’, ‘C:\Program Files\IDM Computer Solutions\UltraEdit’, ‘C:\Program Files (x86)\Common Files\Acronis\VirtualFile’, ‘C:\Program Files (x86)\Common Files\Acronis\VirtualFile64’, ‘C:\WINDOWS\System32\OpenSSH’, ‘C:\Program Files (x86)\MAVProxy’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38\Scripts’, ‘C:\Program Files\Git\cmd’, ‘C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38\Scripts’, ‘C:\Users\Jim Calvert\AppData\Local\Microsoft\WindowsApps’, ‘C:\Users\Jim Calvert\AppData\Local\GitHubDesktop\bin’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python37-32\Scripts’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python37-32’] var=‘MAKE’ -> [‘C:\cygwin64\bin\make.exe’]

Checking for program ‘arm-none-eabi-objcopy’
C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-objcopy.exe
find program=[‘arm-none-eabi-objcopy’] paths=[‘C:\cygwin64\usr\local\bin’, ‘C:\cygwin64\bin’, ‘C:\Program Files (x86)\Common Files\Oracle\Java\javapath’, ‘C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common’, ‘C:\WINDOWS\system32’, ‘C:\WINDOWS’, ‘C:\WINDOWS\System32\Wbem’, ‘C:\WINDOWS\System32\WindowsPowerShell\v1.0’, ‘C:\Program Files (x86)\Common Files\Acronis\SnapAPI’, ‘C:\Program Files (x86)\Acronis\TrueImageHome’, ‘C:\Program Files (x86)\MHV AVR Tools\bin’, ‘C:\HashiCorp\Vagrant\bin’, ‘C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn’, ‘C:\Program Files (x86)\QuickTime\QTSystem’, ‘C:\Program Files\IDM Computer Solutions\UltraEdit’, ‘C:\Program Files (x86)\Common Files\Acronis\VirtualFile’, ‘C:\Program Files (x86)\Common Files\Acronis\VirtualFile64’, ‘C:\WINDOWS\System32\OpenSSH’, ‘C:\Program Files (x86)\MAVProxy’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38\Scripts’, ‘C:\Program Files\Git\cmd’, ‘C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python38\Scripts’, ‘C:\Users\Jim Calvert\AppData\Local\Microsoft\WindowsApps’, ‘C:\Users\Jim Calvert\AppData\Local\GitHubDesktop\bin’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python37-32\Scripts’, ‘C:\Users\Jim Calvert\AppData\Local\Programs\Python\Python37-32’] var=‘OBJCOPY’ -> [‘C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-objcopy.exe’]
from G:\development\thumperdev\ardupilot: Failed to process hwdef.dat ret=1

I have looked all through my path variables etc. with no luck.
As evident, I am new to using waf.
Any clues would be appreciated.
Thanks

I’m not sure but I suspect there’s a space after C:\Users\Jim… that is causing the script problems. I would maybe try moving the cygwin installation and the ardupilot source code higher up in the file tree and avoid directories with spaces in them if possible.

Servers by jDrones