Qgc android build failing

QGroundControl Android build failing at linking stage with undefined C++ standard library symbols (__cxa_guard_acquire, operator new/delete, vtable symbols, etc.) using NDK 27.2.12479018 and Qt 6.10.0 for arm64-v8a. The linker can’t find libc++ symbols despite using -stdlib=libc++ flag. Looking for solutions to properly link the C++ standard library.

[1829/1831 4.2/sec] Linking CXX shared module Debug\libQGroundControl_arm64-v8a.so
FAILED: Debug/libQGroundControl_arm64-v8a.so
C:\WINDOWS\system32\cmd.exe /C “cd . && C:\Users\SAURAB~1\AppData\Local\Android\Sdk\ndk\272~1.124\TOOLCH~1\llvm\prebuilt\WINDOW~1\bin\CLANG_~1.EXE --target=aarch64-none-linux-android23 --sysroot=“C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot” -fPIC -DQT_QML_DEBUG -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ -g -fno-limit-debug-info -Wl,–build-id=sha1 -Wl,–no-rosegment -Wl,–no-undefined-version -Wl,–fatal-warnings -Wl,–gc-sections -Qunused-arguments -Wl,–no-undefined -Wl,-z,max-page-size=16384 -Wl,-Bsymbolic -shared -o Debug\libQGroundControl_arm64-v8a.so @CMakeFiles\QGroundControl.rsp && cd .”
ld.lld: error: undefined symbol: __cxa_guard_acquire

referenced by LogEntry.cc:16 (D:/dags/qgroundcontrol/src/AnalyzeView/LogEntry.cc:16)
CMakeFiles/QGroundControl.dir/src/AnalyzeView/LogEntry.cc.o:(LogEntryLog())
referenced by ADSBVehicle.cc:16 (D:/dags/qgroundcontrol/src/ADSB/ADSBVehicle.cc:16)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicle.cc.o:(ADSBVehicleLog())
referenced by ExifParser.cc:17 (D:/dags/qgroundcontrol/src/AnalyzeView/ExifParser.cc:17)
CMakeFiles/QGroundControl.dir/src/AnalyzeView/ExifParser.cc.o:(ExifParserLog())
referenced 451 more times

ld.lld: error: undefined symbol: __cxa_guard_release

referenced by ADSBVehicle.cc:16 (D:/dags/qgroundcontrol/src/ADSB/ADSBVehicle.cc:16)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicle.cc.o:(ADSBVehicleLog())
referenced by MAVLinkChartController.cc:21 (D:/dags/qgroundcontrol/src/AnalyzeView/MAVLinkChartController.cc:21)
CMakeFiles/QGroundControl.dir/src/AnalyzeView/MAVLinkChartController.cc.o:(MAVLinkChartControllerLog())
referenced by MAVLinkConsoleController.cc:20 (D:/dags/qgroundcontrol/src/AnalyzeView/MAVLinkConsoleController.cc:20)
CMakeFiles/QGroundControl.dir/src/AnalyzeView/MAVLinkConsoleController.cc.o:(MAVLinkConsoleControllerLog())
referenced 451 more times

ld.lld: error: undefined symbol: __cxa_guard_abort

referenced by ADSBVehicle.cc:16 (D:/dags/qgroundcontrol/src/ADSB/ADSBVehicle.cc:16)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicle.cc.o:(ADSBVehicleLog())
referenced by VehicleComponent.cc:18 (D:/dags/qgroundcontrol/src/AutoPilotPlugins/VehicleComponent.cc:18)
CMakeFiles/QGroundControl.dir/src/AutoPilotPlugins/VehicleComponent.cc.o:(VehicleComponentLog())
referenced by ADSBVehicleManager.cc:23 (D:/dags/qgroundcontrol/src/ADSB/ADSBVehicleManager.cc:23)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicleManager.cc.o:(ADSBVehicleManagerLog())
referenced 401 more times

ld.lld: error: undefined symbol: operator new(unsigned long)

referenced by ADSBVehicleManager.cc:30 (D:/dags/qgroundcontrol/src/ADSB/ADSBVehicleManager.cc:30)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicleManager.cc.o:(ADSBVehicleManager::ADSBVehicleManager(ADSBVehicleManagerSettings*, QObject*))
referenced by ADSBVehicleManager.cc:31 (D:/dags/qgroundcontrol/src/ADSB/ADSBVehicleManager.cc:31)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicleManager.cc.o:(ADSBVehicleManager::ADSBVehicleManager(ADSBVehicleManagerSettings*, QObject*))
referenced by ADSBTCPLink.cc:23 (D:/dags/qgroundcontrol/src/ADSB/ADSBTCPLink.cc:23)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBTCPLink.cc.o:(ADSBTCPLink::ADSBTCPLink(QHostAddress const&, unsigned short, QObject*))
referenced 1854 more times

ld.lld: error: undefined symbol: operator delete(void*)

referenced by ADSBTCPLink.cc:23 (D:/dags/qgroundcontrol/src/ADSB/ADSBTCPLink.cc:23)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBTCPLink.cc.o:(ADSBTCPLink::ADSBTCPLink(QHostAddress const&, unsigned short, QObject*))
referenced by ADSBTCPLink.cc:24 (D:/dags/qgroundcontrol/src/ADSB/ADSBTCPLink.cc:24)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBTCPLink.cc.o:(ADSBTCPLink::ADSBTCPLink(QHostAddress const&, unsigned short, QObject*))
referenced by ADSBVehicle.cc:28 (D:/dags/qgroundcontrol/src/ADSB/ADSBVehicle.cc:28)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicle.cc.o:(ADSBVehicle::~ADSBVehicle())
referenced 3075 more times

ld.lld: error: undefined symbol: __dynamic_cast

referenced by qobjectdefs_impl.h:100 (D:/Qt/6.10.0/android_arm64_v8a/include/QtCore/qobjectdefs_impl.h:100)
CMakeFiles/QGroundControl.dir/src/AutoPilotPlugins/VehicleComponent.cc.o:(void QtPrivate::assertObjectType(QObject*)::‘lambda1’(QObject*)::operator()(QObject*) const)
referenced by qobjectdefs_impl.h:100 (D:/Qt/6.10.0/android_arm64_v8a/include/QtCore/qobjectdefs_impl.h:100)
CMakeFiles/QGroundControl.dir/src/AnalyzeView/MAVLinkChartController.cc.o:(void QtPrivate::assertObjectType(QObject*)::‘lambda1’(QObject*)::operator()(QObject*) const)
referenced by qobjectdefs_impl.h:100 (D:/Qt/6.10.0/android_arm64_v8a/include/QtCore/qobjectdefs_impl.h:100)
CMakeFiles/QGroundControl.dir/src/ADSB/ADSBVehicleManager.cc.o:(void QtPrivate::assertObjectType(QObject*)::‘lambda1’(QObject*)::operator()(QObject*) const)
referenced 168 more times

ld.lld: error: undefined symbol: std::__ndk1::__shared_weak_count::__release_weak()

referenced by shared_ptr.h:1396 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__memory/shared_ptr.h:1396)
CMakeFiles/QGroundControl.dir/src/AnalyzeView/LogDownloadController.cc.o:(std::__ndk1::weak_ptr::~weak_ptr())
referenced by shared_ptr.h:184 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/__memory/shared_ptr.h:184)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__ndk1::__shared_weak_count::__release_shared[abi:ne180000]())

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info

referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(typeinfo for QQmlPrivate::QQmlElement)
referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(typeinfo for QQmlPrivate::QQmlElement)
referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(typeinfo for QQmlPrivate::QQmlElement)
referenced 762 more times
the vtable symbol may be undefined because the class is missing its key function (see Missing Key Function — lld 22.0.0git documentation )

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__class_type_info

referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(typeinfo for std::__ndk1::__function::__base<QObject* (QQmlEngine*, QJSEngine*)>)
referenced by MapProvider.cpp MapProvider.cpp
MapProvider.cpp.o:(typeinfo for MapProvider) in archive Debug/lib/libQGCLocation_arm64-v8a.a
referenced by qt6glitem.cc qt6glitem.cc
qt6glitem.cc.o:(typeinfo for std::__ndk1::__unary_function_keep_layout_base<Qt6GLVideoItem*, void>) in archive Debug/lib/libgstqml6gl_arm64-v8a.a
referenced 116 more times
the vtable symbol may be undefined because the class is missing its key function (see Missing Key Function — lld 22.0.0git documentation )

ld.lld: error: undefined symbol: __cxa_pure_virtual

referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(vtable for std::__ndk1::__function::__base<QObject* (QQmlEngine*, QJSEngine*)>)
referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(vtable for std::__ndk1::__function::__base<QObject* (QQmlEngine*, QJSEngine*)>)
referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(vtable for std::__ndk1::__function::__base<QObject* (QQmlEngine*, QJSEngine*)>)
referenced 370 more times

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__function_type_info

referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(typeinfo for QObject* (QQmlEngine*, QJSEngine*))
referenced by CameraSectionTest.cc CameraSectionTest.cc
CMakeFiles/QGroundControl.dir/test/MissionManager/CameraSectionTest.cc.o:(typeinfo for void (double))
the vtable symbol may be undefined because the class is missing its key function (see Missing Key Function — lld 22.0.0git documentation )

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__pointer_type_info

referenced by qgroundcontrol_qmltyperegistrations.cpp qgroundcontrol_qmltyperegistrations.cpp
CMakeFiles/QGroundControl.dir/qgroundcontrol_qmltyperegistrations.cpp.o:(typeinfo for QObject* (*)(QQmlEngine*, QJSEngine*))
the vtable symbol may be undefined because the class is missing its key function (see Missing Key Function — lld 22.0.0git documentation )

ld.lld: error: undefined symbol: __cxa_begin_catch

referenced by mocs_compilation.cpp
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(__clang_call_terminate)
referenced by reader.cpp:161 (cpm_modules/ulog_cpp/7a69708ff89747582667f268eeaee7cd22ba9f41/ulog_cpp/reader.cpp:161)
reader.cpp.o:(ulog_cpp::Reader::readChunk(unsigned char const*, int)) in archive Debug/lib/libulog_cpp.a
referenced by parser.cpp:458 (cpm_modules/libevents/1ea2d34e1cc3658140fb45034b187e87d60c899b/libs/cpp/parse/parser.cpp:458)
parser.cpp.o:(events::parser::Parser::loadDefinitionsFile(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&)) in archive Debug/lib/liblibevents_parser.a
referenced 12 more times

ld.lld: error: undefined symbol: std::terminate()

referenced by mocs_compilation.cpp
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(__clang_call_terminate)

ld.lld: error: undefined symbol: __cxa_allocate_exception

referenced by new:174 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
referenced by Utility.cpp:81 (cpm_modules/geographiclib/83681d52f35db2eb03cf5911ce460dae59062505/src/Utility.cpp:81)
Utility.cpp.o:(GeographicLib::Utility::day(int, int, int, bool)) in archive Debug/lib/libGeographicLib.a
referenced by Utility.cpp:125 (cpm_modules/geographiclib/83681d52f35db2eb03cf5911ce460dae59062505/src/Utility.cpp:125)
Utility.cpp.o:(GeographicLib::Utility::date(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, int&, int&, int&)) in archive Debug/lib/libGeographicLib.a
referenced 234 more times

ld.lld: error: undefined symbol: std::bad_array_new_length::bad_array_new_length()

referenced by new:174 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())

ld.lld: error: undefined symbol: typeinfo for std::bad_array_new_length

referenced by new:174 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
referenced by new:174 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())

ld.lld: error: undefined symbol: std::bad_array_new_length::~bad_array_new_length()

referenced by new:174 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
referenced by new:174 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())

ld.lld: error: undefined symbol: __cxa_throw

referenced by new:174 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:174)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(std::__throw_bad_array_new_length[abi:ne180000]())
referenced by Utility.cpp:81 (cpm_modules/geographiclib/83681d52f35db2eb03cf5911ce460dae59062505/src/Utility.cpp:81)
Utility.cpp.o:(GeographicLib::Utility::day(int, int, int, bool)) in archive Debug/lib/libGeographicLib.a
referenced by Utility.cpp:125 (cpm_modules/geographiclib/83681d52f35db2eb03cf5911ce460dae59062505/src/Utility.cpp:125)
Utility.cpp.o:(GeographicLib::Utility::date(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, int&, int&, int&)) in archive Debug/lib/libGeographicLib.a
referenced 234 more times

ld.lld: error: undefined symbol: operator new(unsigned long, std::align_val_t)

referenced by new:271 (C:/Users/Saurabh jha/AppData/Local/Android/Sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/new:271)
CMakeFiles/QGroundControl.dir/QGroundControl_autogen/mocs_compilation.cpp.o:(void* std::__ndk1::__libcpp_operator_new[abi:ne180000]<unsigned long, std::align_val_t>(unsigned long, std::align_val_t))

ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
CLANG_~1: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
21:19:43: The command “D:\Qt\Tools\CMake_64\bin\cmake.exe --build D:/dags/qgroundcontrol/build/Android_Qt_6_10_0_Clang_arm64_v8a-Debug --target all” terminated with exit code 1.
21:19:43: Error while building/deploying project QGroundControl (kit: Android Qt 6.10.0 Clang arm64-v8a)
21:19:43: When executing step “Build”
21:19:43: Elapsed time: 07:11.

Is Developer Mode currently enabled or disabled?