I’m currently trying to setup building enviroment on Win10 using WSL. I follow steps described in “Setting up the Build Environment (Linux/Ubuntu)”, also tried some youtube video. Unfortunately, ./waf doesn’t work for me whatever I do.
Here’s example:
./waf list_boards
/usr/bin/python3: can’t open file ‘<…>’: [Errno 2] No such file or directory
Missing waf submodule. Trying to get it
error: could not lock config file .git/config: Permission denied
error: could not lock config file .git/config: Permission denied
fatal: Failed to register url for submodule path ‘modules/waf’
Could not update submodule
that is bad .. you shouldn’t need root for anything related to software development …
I would advice you to start again the installation as a normal user, and to clone the repo into wsl and not windows filesystem ! (that is far faster and prevent permission mess)
Thank you. Actually I’m very new to ardupilot software development. I followed this guide (https://youtu.be/PLGezPQYMrs?feature=shared). As shown there, person has even cloned ardupilot to root folder. I’m not sure if it is right or wrong, but anyway I cloned it to home directory.
That video is outdated and also very incorrect if anything other than installing some system wide packages was done as root. If ever the command su root is used, you should pretty much ignore whatever else that person has to say.
Start over with a fresh environment.
Follow the actual documentation provided by ArduPilot and not a 7 year old video by an enthusiast with good intentions and bad habits.
Thank you! I will. Sorry for my incompetence, but how do I delete everything I downloaded and reset all settings to start from beginning? Can I use sudo rm -rf for that? I use WSL
Once you’ve reinstalled WSL (to avoid any conflicts created by following that old video), clone the repository to your user’s home folder. You DO NOT need to execute any routine build tasks as root. Use sudo sparingly, and mostly for installing system wide packages with apt.