mavlink / qgroundcontrol

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

Building master branch on Windows 10 is failing #11747

Closed fraviofii closed 3 months ago

fraviofii commented 3 months ago

Expected Behavior

Build qgroundcontrol correctly on Windows 10.

Current Behavior

After cloning qgroundcontrol on my Windows 10 machine, opening the CMakeLists.txt file, launching cmake is failling, providing the following output:


Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Users/flavi/draganfly/qgc/qgroundcontrol -B C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug in C:\Users\flavi\draganfly\qgc\build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug.
-- QGC_GIT_BRANCH="master"
-- QGC_GIT_HASH="2517cc297"
-- QGC_APP_VERSION_STR="v4.3.0-712-g2517cc297"
-- QGC_APP_VERSION="v4.3.0"
-- QGC_APP_DATE="2023-11-20T18:46:48-08:00"
-- QGC_APP_VERSION_VALID="0"
-- QGC_APP_VERSION="4.3.0" ; QGC_APP_VERSION_MAJOR="4" ; QGC_APP_VERSION_MINOR="3" ; QGC_APP_VERSION_PATCH="0"
-- CMAKE_VERSION="3.24.2" ; CMAKE_PREFIX_PATH="C:/Qt/6.6.3/msvc2019_64" ; CMAKE_HOST_SYSTEM_NAME="Windows" ; CMAKE_HOST_SYSTEM_VERSION="10.0.19045" ; CMAKE_SYSTEM_NAME="Windows" ; CMAKE_SYSTEM_VERSION="10.0.19045" ; CMAKE_CURRENT_SOURCE_DIR="C:/Users/flavi/draganfly/qgc/qgroundcontrol" ; CMAKE_BUILD_TYPE="Debug" ; CMAKE_TOOLCHAIN_FILE=""
-- QT_VERSION="6.6.3" ; QT_MKSPEC="msvc2019_64" ; QT_LIBRARY_HINTS="/6.6.3/msvc2019_64;C:/Qt/6.6.3/msvc2019_64/lib/cmake/Qt6;C:/Qt/6.6.3/msvc2019_64"
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
-- 
-- SDL2 was configured with the following options:
-- 
-- Platform: Windows-10.0.19045
-- 64-bit:   TRUE
-- Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe
-- Revision: SDL-release-2.30.2-0-gf461d91c
-- 
-- Subsystems:
--   Atomic:    ON
--   Audio: OFF
--   Video: OFF
--   Render:    OFF
--   Events:    ON
--   Joystick:  ON
--   Haptic:    OFF
--   Hidapi:    ON
--   Power: OFF
--   Threads:   ON
--   Timers:    OFF
--   File:  OFF
--   Loadso:    ON
--   CPUinfo:   ON
--   Filesystem:    OFF
--   Sensor:    OFF
--   Locale:    ON
--   Misc:  OFF
-- 
-- Options:
--   SDL2_DISABLE_INSTALL        (Wanted: TRUE): OFF
--   SDL2_DISABLE_SDL2MAIN       (Wanted: TRUE): OFF
--   SDL2_DISABLE_UNINSTALL      (Wanted: TRUE): OFF
--   SDL_3DNOW                   (Wanted: FALSE): OFF
--   SDL_ALSA                    (Wanted: OFF): OFF
--   SDL_ALSA_SHARED             (Wanted: OFF): OFF
--   SDL_ALTIVEC                 (Wanted: ON): OFF
--   SDL_ARMNEON                 (Wanted: OFF): OFF
--   SDL_ARMSIMD                 (Wanted: OFF): OFF
--   SDL_ARTS                    (Wanted: OFF): OFF
--   SDL_ARTS_SHARED             (Wanted: OFF): OFF
--   SDL_ASAN                    (Wanted: OFF): OFF
--   SDL_ASSEMBLY                (Wanted: ON): OFF
--   SDL_ASSERTIONS              (Wanted: auto): auto
--   SDL_BACKGROUNDING_SIGNAL    (Wanted: OFF): OFF
--   SDL_CCACHE                  (Wanted: ON): OFF
--   SDL_CLOCK_GETTIME           (Wanted: OFF): OFF
--   SDL_COCOA                   (Wanted: OFF): OFF
--   SDL_DBUS                    (Wanted: OFF): OFF
--   SDL_DIRECTFB                (Wanted: OFF): OFF
--   SDL_DIRECTFB_SHARED         (Wanted: OFF): OFF
--   SDL_DIRECTX                 (Wanted: ON): ON
--   SDL_DISKAUDIO               (Wanted: ON): OFF
--   SDL_DUMMYAUDIO              (Wanted: ON): OFF
--   SDL_DUMMYVIDEO              (Wanted: ON): OFF
--   SDL_ESD                     (Wanted: OFF): OFF
--   SDL_ESD_SHARED              (Wanted: OFF): OFF
--   SDL_FOREGROUNDING_SIGNAL    (Wanted: OFF): OFF
--   SDL_FUSIONSOUND             (Wanted: OFF): OFF
--   SDL_FUSIONSOUND_SHARED      (Wanted: OFF): OFF
--   SDL_GCC_ATOMICS             (Wanted: OFF): OFF
--   SDL_HIDAPI                  (Wanted: TRUE): ON
--   SDL_HIDAPI_JOYSTICK         (Wanted: ON): ON
--   SDL_HIDAPI_LIBUSB           (Wanted: OFF): OFF
--   SDL_IBUS                    (Wanted: OFF): OFF
--   SDL_INSTALL_TESTS           (Wanted: OFF): OFF
--   SDL_JACK                    (Wanted: OFF): OFF
--   SDL_JACK_SHARED             (Wanted: OFF): OFF
--   SDL_KMSDRM                  (Wanted: OFF): OFF
--   SDL_KMSDRM_SHARED           (Wanted: OFF): OFF
--   SDL_LASX                    (Wanted: OFF): OFF
--   SDL_LIBC                    (Wanted: OFF): OFF
--   SDL_LIBICONV                (Wanted: OFF): OFF
--   SDL_LIBSAMPLERATE           (Wanted: OFF): OFF
--   SDL_LIBSAMPLERATE_SHARED    (Wanted: OFF): OFF
--   SDL_LIBUDEV                 (Wanted: ON): OFF
--   SDL_LSX                     (Wanted: OFF): OFF
--   SDL_METAL                   (Wanted: OFF): OFF
--   SDL_MMX                     (Wanted: FALSE): OFF
--   SDL_NAS                     (Wanted: OFF): OFF
--   SDL_NAS_SHARED              (Wanted: OFF): OFF
--   SDL_OFFSCREEN               (Wanted: ON): OFF
--   SDL_OPENGL                  (Wanted: ON): OFF
--   SDL_OPENGLES                (Wanted: ON): OFF
--   SDL_OSS                     (Wanted: OFF): OFF
--   SDL_PIPEWIRE                (Wanted: OFF): OFF
--   SDL_PIPEWIRE_SHARED         (Wanted: OFF): OFF
--   SDL_PTHREADS                (Wanted: OFF): OFF
--   SDL_PTHREADS_SEM            (Wanted: OFF): OFF
--   SDL_PULSEAUDIO              (Wanted: OFF): OFF
--   SDL_PULSEAUDIO_SHARED       (Wanted: OFF): OFF
--   SDL_RENDER_D3D              (Wanted: ON): OFF
--   SDL_RENDER_METAL            (Wanted: OFF): OFF
--   SDL_RPATH                   (Wanted: OFF): OFF
--   SDL_RPI                     (Wanted: OFF): OFF
--   SDL_SNDIO                   (Wanted: OFF): OFF
--   SDL_SNDIO_SHARED            (Wanted: OFF): OFF
--   SDL_SSE                     (Wanted: ON): ON
--   SDL_SSE2                    (Wanted: ON): ON
--   SDL_SSE3                    (Wanted: ON): ON
--   SDL_SSEMATH                 (Wanted: ON): OFF
--   SDL_STATIC_PIC              (Wanted: OFF): OFF
--   SDL_SYSTEM_ICONV            (Wanted: OFF): OFF
--   SDL_TESTS                   (Wanted: OFF): OFF
--   SDL_VENDOR_INFO             (Wanted: ): OFF
--   SDL_VIRTUAL_JOYSTICK        (Wanted: FALSE): OFF
--   SDL_VIVANTE                 (Wanted: OFF): OFF
--   SDL_VULKAN                  (Wanted: ON): OFF
--   SDL_WASAPI                  (Wanted: ON): OFF
--   SDL_WAYLAND                 (Wanted: OFF): OFF
--   SDL_WAYLAND_LIBDECOR        (Wanted: OFF): OFF
--   SDL_WAYLAND_LIBDECOR_SHARED (Wanted: OFF): OFF
--   SDL_WAYLAND_QT_TOUCH        (Wanted: OFF): OFF
--   SDL_WAYLAND_SHARED          (Wanted: OFF): OFF
--   SDL_X11                     (Wanted: OFF): OFF
--   SDL_X11_SHARED              (Wanted: OFF): OFF
--   SDL_X11_XCURSOR             (Wanted: OFF): OFF
--   SDL_X11_XDBE                (Wanted: OFF): OFF
--   SDL_X11_XFIXES              (Wanted: OFF): OFF
--   SDL_X11_XINPUT              (Wanted: OFF): OFF
--   SDL_X11_XRANDR              (Wanted: OFF): OFF
--   SDL_X11_XSCRNSAVER          (Wanted: OFF): OFF
--   SDL_X11_XSHAPE              (Wanted: OFF): OFF
--   SDL_XINPUT                  (Wanted: ON): ON
-- 
--  CMAKE_C_FLAGS_DEBUG:   /Zi /Ob0 /Od 
--  CMAKE_CXX_FLAGS_DEBUG: /Zi /Ob0 /Od /RTC1
-- 
--  CFLAGS:        /DWIN32 /D_WINDOWS
--  EXTRA_CFLAGS:  
--  EXTRA_LDFLAGS:  
--  EXTRA_LIBS:    kernel32;user32;gdi32;winmm;imm32;ole32;oleaut32;version;uuid;advapi32;setupapi;shell32;dinput8
-- 
--  Build Shared Library: FALSE
--  Build Static Library: TRUE
--  Build Static Library with Position Independent Code: OFF
-- 
-- Building JoystickSDL
[0/8] Performing download step (git clone) for 'libevents-populate'
Cloning into 'libevents-src'...
Your branch is up to date with 'origin/main'.
Already on 'main'
Submodule 'libs/cpp/parse/nlohmann_json' (https://github.com/nlohmann/json.git) registered for path 'libs/cpp/parse/nlohmann_json'
Cloning into 'C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug/_deps/libevents-src/libs/cpp/parse/nlohmann_json'...
error: unable to create file tests/reports/2016-09-09-nativejson_benchmark/performance_Corei7-4980HQ@2.80GHz_mac64_clang7.0_7._Code_size_FileSize_(byte).png: Filename too long
fatal: Unable to checkout 'bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d' in submodule path 'libs/cpp/parse/nlohmann_json'
CMake Error at libevents-subbuild/libevents-populate-prefix/tmp/libevents-populate-gitclone.cmake:62 (message):
  Failed to update submodules in:
  'C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug/_deps/libevents-src'

FAILED: libevents-populate-prefix/src/libevents-populate-stamp/libevents-populate-download C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug/_deps/libevents-subbuild/libevents-populate-prefix/src/libevents-populate-stamp/libevents-populate-download 
cmd.exe /C "cd /D C:\Users\flavi\draganfly\qgc\build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug\_deps && C:\Qt\Tools\CMake_64\bin\cmake.exe -P C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug/_deps/libevents-subbuild/libevents-populate-prefix/tmp/libevents-populate-gitclone.cmake && C:\Qt\Tools\CMake_64\bin\cmake.exe -E touch C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug/_deps/libevents-subbuild/libevents-populate-prefix/src/libevents-populate-stamp/libevents-populate-download"
ninja: build stopped: subcommand failed.

CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/FetchContent.cmake:1604 (message):
  Build step for libevents failed: 1
Call Stack (most recent call first):
  C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/FetchContent.cmake:1744:EVAL:2 (__FetchContent_directPopulate)
  C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/FetchContent.cmake:1744 (cmake_language)
  C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/FetchContent.cmake:1958 (FetchContent_Populate)
  src/MAVLink/LibEvents/CMakeLists.txt:10 (FetchContent_MakeAvailable)

-- Configuring incomplete, errors occurred!
See also "C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/flavi/draganfly/qgc/build-qgroundcontrol-Desktop_Qt_6_6_3_MSVC2019_64bit-Debug/CMakeFiles/CMakeError.log".
CMake process exited with exit code 1.

Elapsed time: 01:46.

Steps to Reproduce:

  1. Clone the repository
  2. Open QtCreator 11.0.2 (Community)
  3. Open the file CMakeLists.txt located at project root directory
  4. Run the option Run Cmake when pressing the pop-up options for the project

System Information

More detailed information is available on cmake output presented above

HTRamsey commented 3 months ago

https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows

fraviofii commented 3 months ago

Thank you @HTRamsey ,

I executed git config --global core.longpaths true on my Windows command prompt than launched again on Qt Creator and it worked.

DronecodeBot commented 2 months ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/i-am-getting-this-error-while-building-the-qgc-for-windows/40241/2