Unable to download gps_helper.h, Qt creator fails build


I am trying to build QgroundControl using Qt Creator and am following the steps described in the online guide: https://dev.qgroundcontrol.com/en/getting_started/

I am using Ubuntu 16.04 on a virtual machine and trying to build QG from scratch without the video streaming feature so that I can use QGC on my Ubuntu 16.04 system with MAVROS. While downloading the necessary files, I run into an issue where items are not downloading from the github page resulting in a build error for Qt creator as files are missing.

When I run the following command on my command line:

git clone https://github.com/mavlink/qgroundcontrol.git --recursive

The files begin downloading but eventually the download returns the following error:

fatal: reference is not a tree: 2bfc6ffb3ba74b60deab5aef8e34c2cb909c4edc Unable to checkout ‘2bfc6ffb3ba74b60deab5aef8e34c2cb909c4edc’ in submodule path ‘src/GPS/Drivers’

Additionally, the command:

git submodule update


fatal: Not a git repository (or any of the parent directories): .git

and does not return the desired result. As a result, when I build the qgroundcontrol.pro using Qt Creator 5.12.6, I receive the following build error:

/home/rhb/Desktop/qgroundcontrol/src/GPS/GPSProvider.h:21:36: fatal error: Drivers/src/gps_helper.h: No such file or directory

because the download from the github page was incomplete.

My questions are:

  1. How to resolve the download failure issue?
  2. In Qt creator, how do I disable building the parts in QGC that use video streaming features?

I have looked through http://qgroundcontrol.com/#resources page but it does not mention this download error. I am unclear on how to proceed and would appreciate some friendly help!

Thank you!

@DonLakeFlyer any suggestion on how to resolve this issue?

Start over again and do this instead:

git clone https://github.com/mavlink/qgroundcontrol.git
cd qgroundcontrol
git submodule init
git submodule update

Thank you for that suggestion. I started over and followed the commands you recommended, however the same issue persists. I have attached a screenshot of what happens after I type in the “git submodule update” command, and the corresponding error message.

Can you try again from scratch. The gps drivers submodule was just updated to a new position.

I restarted from scratch and it appears your change allowed me to download the remaining files, thank you.

However, now when I instruct Qt Creator 5.12.6 to build the files I receive the following error:

Solution found: switch from Ubuntu 16.04 to Ubuntu 18.04 and everything works fine.