Describe the bug
The logic that finds version-suffixed Clang binaries (from self-built entities or from PPA) does not work, it just keeps saying
[WARNING][2022-05-21 11:20:28] {analyzer} [14955] <140279203762176> - analyzer_types.py:122 print_unsupported_analyzers() - Analyzer 'clang-tidy' is enabled but CodeChecker is failed to execute analysis with it:
'Failed to detect analyzer binary!'. Please check your 'PATH' environment variable and the 'config/package_layout.json' file!
CodeChecker version
v6.19.1, installed from PyPI
To Reproduce
Steps to reproduce the behaviour:
Create a new Docker image, apt install python3 python3-pip software-properties-common wget curl
Install LLVM from PPA: bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
Ensure that Clang and Clang-Tidy is installed: apt install clang-14 clang-tidy-14 (replace with latest non-rolling version number appropriately)
which clang clang++ clang-tidy returns "not found"
which clang-14 clang++-14 clang-tidy-14 returns the binaries under /usr/bin
While certainly if I have the right to install packages I would have the right to just edit this config file (and putting clang-14 and clang-tidy-14 in it makes the issue disappear), it is not always the case, and this just makes the PyPI package unusable in a restricted environment...
Describe the bug The logic that finds version-suffixed Clang binaries (from self-built entities or from PPA) does not work, it just keeps saying
CodeChecker version v6.19.1, installed from PyPI
To Reproduce Steps to reproduce the behaviour:
apt install python3 python3-pip software-properties-common wget curl
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
apt install clang-14 clang-tidy-14
(replace with latest non-rolling version number appropriately)which clang clang++ clang-tidy
returns "not found"which clang-14 clang++-14 clang-tidy-14
returns the binaries under/usr/bin
echo $PATH | grep "/usr/bin"
matchesCC_ANALYZERS_FROM_PATH=yes CodeChecker check -b "clang++-14 -UNDEBUG -std=c++17 main.cpp" -o Reports
Expected behaviour Pick up the only installed version of Clang in the current environment and run the analysis with it.
Desktop (please complete the following information)
Additional context
While certainly if I have the right to install packages I would have the right to just edit this config file (and putting
clang-14
andclang-tidy-14
in it makes the issue disappear), it is not always the case, and this just makes the PyPI package unusable in a restricted environment...