[Qt-creator] Error Using .clang-tidy file instead of built ins (Master branch from QtCreator Git Repo)
Michael Jackson
mike.jackson at bluequartz.net
Thu Jan 21 22:23:14 CET 2021
I am having some trouble getting QtCreator to a full functioning state after building from Git. I cloned the sources from <ssh://git@github.com/qt-creator/qt-creator> and started through the ReadMe.md file.
I have CMake 3.19.3, Xcode 12.3, ninja 1.9.0 all installed.
I have the prebuilt Qt5.14.2 installed
I grabbed the prebuilt libclang version 110 as suggested and installed into /Users/Shared/OpenSource/libclang
My configuration is as follows:
[me at host] $ export PATH=/Users/Shared/IMF_SDK/Qt5.14.2/5.14.2/clang_64/bin:$PATH
[me at host] $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/Users/mjackson/Applications/QtCreator-master \
-DBUILD_PLUGIN_CLANGREFACTORING=ON \
-DBUILD_PLUGIN_CLANGPCHMANAGER=ON \
-DCMAKE_PREFIX_PATH=/Users/Shared/OpenSource/libclang \
../../qt-creator
[me at host] $ ninja
[me at host] $ cmake --install . --prefix /path/to/qtcreator_install
[me at host] $ cmake --install . --prefix /path/to/qtcreator_install --component Dependencies
Launch QtCreator, load up my project (CMake based with an existing build in place). All works fine. I open a source file and try to "Analyze current File" by right clicking on the editor, the analysis starts but I get errors back. This is with Analyzer->Clang Tools->Diagnostic Configuration set to a custom value where the "Clang-Tidy Checks" are set to "Use .clang-tidy config file". Here is the output from the analyzer run:
16:18:57: Running Clang-Tidy and Clazy on /Users/mjackson/DREAM3D-Dev/DREAM3D/CMakeLists.txt with configuration "Mike-No-Clazy".
Analyzing "/Users/mjackson/DREAM3D-Dev/DREAM3D_Plugins/DREAM3DReview/DREAM3DReviewFilters/PrincipalComponentAnalysis.cpp" [Clang-Tidy].
Failed to analyze "/Users/mjackson/DREAM3D-Dev/DREAM3D_Plugins/DREAM3DReview/DREAM3DReviewFilters/PrincipalComponentAnalysis.cpp": Clang-Tidy finished with exit code: 1.
Command line: '/Users/mjackson/Applications/QtCreator-Master/Qt Creator.app/Contents/Resources/libexec/clang/bin/clang-tidy' '--warnings-as-errors=-*' '-check=-clang-diagnostic-*' -export-fixes=/private/var/folders/_5/02hyk35j4_n6k_nl9ltq37n80000gn/T/QtCreator-KrrgEu/clangtools-hsKImT/report-PrincipalComponentAnalysis.cpp-OHzGfK /Users/mjackson/DREAM3D-Dev/DREAM3D_Plugins/DREAM3DReview/DREAM3DReviewFilters/PrincipalComponentAnalysis.cpp -- -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-documentation-unknown-command -nostdinc -nostdinc++ -mfpmath=sse -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15 -fPIC -fPIC -std=c++17 -fsyntax-only -m64 --target=x86_64-apple-darwin14.5.0 -x c++ -DDEBUG -DDREAM3DReviewServer_EXPORTS -DH5Support_USE_MUTEX -DH5Support_USE_QT -DH5_BUILT_AS_DYNAMIC_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/Plugins/DREAM3DReview -I /Users/mjackson/DREAM3D-Dev/DREAM3D_Plugins/DREAM3DReview -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/Plugins/DREAM3DReview/DREAM3DReviewServer_autogen/include -I /Users/mjackson/DREAM3D-Dev/DREAM3D_Plugins -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/Plugins -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/Plugins/DREAM3DReview/DREAM3DReviewFilters -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/Core/Common -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/Common/include -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/Eigen3/src -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/KWIML/src -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/KWIML/src -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/VNL/src/vxl/core -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/VNL/src/vxl/v3p/netlib -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/VNL/src/vxl/vcl -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/VNL/src/vxl/core -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageCompare/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageFilterBase/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageIntensity/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/ImageAdaptors/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageGrid/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/ImageFunction/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Numerics/Statistics/include -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/Netlib -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/Transform/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageStatistics/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageCompose/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/SpatialObjects/include -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/MetaIO/src/MetaIO/src -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/MetaIO/src/MetaIO/src -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/ZLIB/src -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/ZLIB/src -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/Path/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/Denoising/include -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/IO/ImageBase -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/ImageBase/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/Convolution/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/FFT/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/Thresholding/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Registration/Common/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/DisplacementField/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/Smoothing/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/FiniteDifference/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageFeature/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageGradient/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageSources/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/Mesh/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Numerics/Optimizers/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/Watersheds/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/MathematicalMorphology/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/ConnectedComponents/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageLabel/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/Classifiers/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Nonunit/Review/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/AnisotropicSmoothing/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/CurvatureFlow/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/AntiAlias/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/LevelSets/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/DistanceMap/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/BinaryMathematicalMorphology/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/LabelMap/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Numerics/NarrowBand/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/FastMarching/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Core/QuadEdgeMesh/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/SignedDistanceFunction/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/BiasCorrection/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Numerics/Polynomials/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/DeformableMesh/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/DiffusionTensorImage/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Numerics/Eigen/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/BMP/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/BioRad/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/GDCM/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/GE/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/IPL/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/GIPL/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/JPEG/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/Meta/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/NIFTI/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/NRRD/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/PNG/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/RAW/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/Siemens/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/SpatialObjects/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/Stimulate/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/TIFF/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/TransformBase/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/TransformFactory/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/TransformHDF5/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/TransformInsightLegacy/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/TransformMatlab/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/VTK/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/XML/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/ImageFusion/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/KLMRegionGrowing/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/LabelVoting/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/OpenJPEG/src/openjpeg -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/OpenJPEG/src/openjpeg -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Registration/PDEDeformable/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/RegionGrowing/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Filtering/SpatialFunction/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Bridge/VTK/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/Segmentation/Voronoi/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/IO/MRC/include -I /Users/mjackson/DREAM3D-Dev/SIMPL/Source -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Common -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/DataArrays -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/DataContainers -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Geometry -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/HDF5 -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Math -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Messages -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Montages -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/StatsData -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Utilities -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/ITK -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Filtering -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/FilterParameters -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/VTKUtils -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/Plugin -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/REST -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/CoreFilters -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SIMPLib/TestFilters -I /Users/mjackson/DREAM3D-Dev/SIMPL/ThirdParty -I /Users/mjackson/DREAM3D-Dev/H5Support/Source -I /Users/mjackson/DREAM3D-Dev/SIMPL/Source/SimpleITKExplicit/Explicit/include -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/SIMPLView/SIMPL/SimpleITKExplicit/Common/include -I /Users/mjackson/DREAM3D-Dev/EbsdLib/Source -I /Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/EbsdLib -I /Users/Shared/DREAM3D_SDK/Eigen-3.3.7/include/eigen3 -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/KWSys/src -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/VNL/src/vxl/vcl -F /Users/Shared/DREAM3D_SDK/Qt5.15.2/5.15.2/clang_x86_64/lib -I /Users/Shared/DREAM3D_SDK/Qt5.15.2/5.15.2/clang_x86_64/lib/QtCore.framework/Headers -I /Users/Shared/DREAM3D_SDK/Qt5.15.2/5.15.2/clang_x86_64/mkspecs/macx-clang -I /Users/Shared/DREAM3D_SDK/hdf5-1.10.7-Debug/include -I /Users/Shared/DREAM3D_SDK/Qt5.15.2/5.15.2/clang_x86_64/lib/QtNetwork.framework/Headers -I /Users/Shared/DREAM3D_SDK/tbb-2020.1-mac/tbb/include -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo -I /Users/Shared/DREAM3D_SDK/superbuild/ITK-master/Source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl -I /Users/Shared/DREAM3D_SDK/ITK-master-Debug/Modules/ThirdParty/VNL/src/vxl/core/vnl -I /Users/Shared/DREAM3D_SDK/ghcFilesystem-1.3.2/include -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -isystem '/Users/mjackson/Applications/QtCreator-Master/Qt Creator.app/Contents/Resources/libexec/clang/lib/clang/11.0.0/include' -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
Process Error: 5
Output:
error: [CommonOptionsParser]: clang-tidy: Unknown command line argument '-check=-clang-diagnostic-*'. Try: '/Users/mjackson/Applications/QtCreator-Master/Qt Creator.app/Contents/Resources/libexec/clang/bin/clang-tidy --help'
clang-tidy: Did you mean '--checks=-clang-diagnostic-*'?
16:18:57: Error: Failed to analyze 1 files.
16:18:57: Clang-Tidy and Clazy finished: Processed 0 files successfully, 1 failed.
16:18:57: Elapsed time: 00:00.
Looks like the arguments to clang-tidy are not setup correctly as indicated by clang-tidy's suggestion? I actually made that change and ran the command from the terminal and it seemed to work.
If I set go back and switch to using the GUI to setup the checks to use, then the analyzer will complete successfully.
This is on macOS 10.15, Xcode 12.3. Thoughts?
--
Mike Jackson
More information about the Qt-creator
mailing list