From be4de03b37206dd654bf90342636838d3ed3abc1 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 25 Apr 2023 15:42:59 +0200 Subject: [PATCH] Add message if syncqt is crashed without any output If syncqt process crashed due to the incompatibility with the standard library CMake doesn't produce any useful output. This adds the message that will give short explanation and possible solutions to fix this behavior. Pick-to: 6.5 Task-number: QTBUG-112747 Change-Id: Ib51aec19e3fcacf07515a3d20d72f89753bcdc33 Reviewed-by: Amir Masoud Abdol Reviewed-by: Joerg Bornemann --- cmake/QtSyncQtHelpers.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/QtSyncQtHelpers.cmake b/cmake/QtSyncQtHelpers.cmake index e426b6ea0bb..2ee9872202c 100644 --- a/cmake/QtSyncQtHelpers.cmake +++ b/cmake/QtSyncQtHelpers.cmake @@ -232,6 +232,14 @@ function(qt_internal_target_sync_headers target module_headers module_headers_ge ERROR_VARIABLE syncqt_output ) if(NOT syncqt_result EQUAL 0) + if(syncqt_output STREQUAL "") + string(JOIN "" syncqt_output "The syncqt process exited with code ${syncqt_result}" + " and without any useful output. This can happen if syncqt crashes due to the" + " incompatibilities with the standard C++ library located by either PATH or" + " LD_LIBRARY_PATH environment variables. Please make sure that PATH or" + " LD_LIBRARY_PATH don't point to the standard libraries different from the one you" + " use for building Qt.") + endif() message(FATAL_ERROR "syncqt.cpp failed for module ${module}:\n${syncqt_output}") endif()