codechecker
codechecker copied to clipboard
`make standalone_package` does not make everything standalone
I do make standalone_package, but then the build/CodeChecker/bin/report-converter tool does not work, it needs to import the environment. Furthermore the file is basic a symlink to a non-executable file, so it needs to be executed as python3 report-converter.
Possibly same issues with other files that show as symlinks:
tu_collector -> ../lib/python3/tu_collector/tu_collector.py
merge-clang-extdef-mappings -> ../lib/python3/codechecker_merge_clang_extdef_mappings/cli.py
post-process-stats -> ../lib/python3/codechecker_statistics_collector/cli.py
bazel-compile-commands -> ../lib/python3/bazel_compile_commands/bazel_compile_commands.py
ldlogger -> ../ld_logger/bin/ldlogger
report-converter -> ../lib/python3/codechecker_report_converter/cli.py
I believe all these paths point to executable files. About sourcing the virtual environment, I don't know. We should probably do something about that.
Here is what I execute after make standalone_package to make report-converter standalone executable:
cd build/CodeChecker/bin/
mv report-converter _report-converter
echo '#!/bin/bash
'"source '$(pwd)/../../../venv/bin/activate'
exec python3 '$(pwd)/_report-converter'" '"$@"' >> report-converter
chmod +x report-converter
Still a valid issue. I just compiled the latest CodeChecker, and report-converter is a symlink to a file with permissions 764 instead of 777.
However I didn't have to activate the virtual environment manually, so I guess this part has been fixed.