mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.22k stars 3.56k forks source link

File path wrong can‘t be compiled #10138

Closed Kim-zhi-jiang closed 2 years ago

Kim-zhi-jiang commented 2 years ago

Environment: Ubuntu20.04 QT5.15.2
QGC4.2 and master

err

In file included from /home/kim/vtol/qgc/qgroundcontrol/src/Airmap/AirMapSharedState.h:17,
                 from /home/kim/vtol/qgc/qgroundcontrol/src/Airmap/AirMapManager.h:12,
                 from /home/kim/vtol/qgc/qgroundcontrol/src/QGCToolbox.cc:38:
/home/kim/vtol/qgc/qgroundcontrol/src/Airmap/services/client.h:4:10: fatal error: airmap/client.h: No such file or directory
    4 | #include <airmap/client.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:190532: QGCToolbox.o] Error 1
Kim-zhi-jiang commented 2 years ago

@mrpollo

mrpollo commented 2 years ago

@Kim-zhi-jiang what steps did you follow to get here? please paste all the commands you run, and the full output, try to paste the text please, and avoid a screenshot.

mrpollo commented 2 years ago

you can also use DEFINES=DISABLE_AIRMAP make build and that will skip any airmap configuration

FiddlingRich commented 2 years ago

@mrpollo

@Kim-zhi-jiang what steps did you follow to get here? please paste all the commands you run, and the full output, try to paste the text please, and avoid a screenshot.

Hi, i have encountered this issue too, i have followed the steps in https://dev.qgroundcontrol.com/master/en/getting_started/ and attempted to build with Qt Creator.

Kim-zhi-jiang commented 2 years ago

@mrpollo I always use Qt to make build QGC, previously used qt-opensource-linux-x64-5.12.6

rishi1906 commented 2 years ago

@Kim-zhi-jiang I am facing the same issue, did you get the solution?

hamishwillee commented 2 years ago

The docs are wrong "by definition" - because you should be able to build by following the instructions.

The problem here is that Airmap is built by default on Linux, but there are no instructions for adding the airmap SDK. So either we need to add those instructions, or add instructions on how to disable the airmap build.

I will do the later, because it is easy - you create a file in the root called user_config.pri with the content DEFINES += DISABLE_AIRMAP. This works at least on the native linux build. Not tested on Docker yet.

But we still need to know how to get airmap dependencies - see #10260

Kim-zhi-jiang commented 2 years ago

echo "CONFIG = WarningsAsErrors" >> /home/xxx/qgroundcontrol/user_config.pri echo "DEFINES = DISABLE_AIRMAP" >> /home/xxx/qgroundcontrol/user_config.pri

ohhai commented 1 year ago

Have same with QGC v4.2.4 on Fedora 37. Temporary fixed it for myself by adding airmap sdk include folder to INCLUDEPATH in qgroundcontrol.pro :

@@ -383,6 +383,7 @@ INCLUDEPATH += \
     include/ui \
     src \
     src/ADSB \
+    build/libs/airmap-platform-sdk/include \
     src/api \
     src/AnalyzeView \
     src/Camera \