Skip to content

Instantly share code, notes, and snippets.

@matthijs
matthijs / gist:f60a54d6f5ce86b3ec35c83d751c9631
Last active November 16, 2023 13:35
boost compile failure (undefined reference)
matthijs@monster % echo $CC
clang-16
matthijs@monster % echo $CXX
clang++-16
matthijs@monster % echo $LDFLAGS
-fuse-ld=lld-16 -ferror-limit=0
matthijs@monster % ./bootstrap.sh --with-toolset=clang --with-icu --with-python=python3 --with-icu=/usr/include/x86_64-linux-gnu
Building B2 engine..
###
[DEBUG][2019-08-29 22:03:55] {system} [22242] <140620091918144> - analyze.py:582 main() - Output will be stored to: '/home/matthijs/Projects/moneymaker/results'
[DEBUG_ANALYZER][2019-08-29 22:03:55] {system} [22242] <140620091918144> - analyze.py:526 __get_skip_handler() - Skip file was not set in the command line
[DEBUG][2019-08-29 22:03:55] {buildlogger} [22242] <140620091918144> - log_parser.py:260 __get_compiler_err() - Retrieving default includes via '/usr/bin/clang++ -std=c++17 -E -x c - -v '
[DEBUG][2019-08-29 22:03:55] {buildlogger} [22242] <140620091918144> - log_parser.py:260 __get_compiler_err() - Retrieving default includes via '/usr/bin/clang++ -v'
[DEBUG][2019-08-29 22:03:55] {buildlogger} [22242] <140620091918144> - log_parser.py:260 __get_compiler_err() - Retrieving default includes via '/usr/bin/clang++ /tmp/tmpJfkRN9.c'
[DEBUG][2019-08-29 22:03:55] {buildlogger} [22242] <140620091918144> - log_parser.py:260 __get_compiler_err() - Retrieving default includes via '/usr/bin/clang++ -std=c++17 -
(venv) matthijs@monster % CodeChecker check --logfile compile_commands.json --output ../results
Traceback (most recent call last):
File "/home/matthijs/codechecker/build/CodeChecker/cc_bin/CodeChecker.py", line 111, in main
subcommands[subcommand])
File "/home/matthijs/codechecker/build/CodeChecker/cc_bin/CodeChecker.py", line 47, in add_subcommand
command_module.add_arguments_to_parser(sc_parser)
File "/home/matthijs/codechecker/build/CodeChecker/cc_bin/../lib/python2.7/codechecker_analyzer/cmd/check.py", line 324, in add_arguments_to_parser
if analyzer_types.is_ctu_capable(context):
File "/home/matthijs/codechecker/build/CodeChecker/lib/python2.7/codechecker_analyzer/analyzers/analyzer_types.py", line 36, in is_ctu_capable
return clangsa_cfg.ctu_capability.is_ctu_capable
@matthijs
matthijs / gist:e89a2532107710ad2fca70c177f93995
Created August 28, 2019 19:35
compile command and clang analyzer command
/usr/bin/clang++ -DBOOST_ALL_DYN_LINK -DBOOST_BEAST_USE_STD_STRING_VIEW -DCMAKE_SOURCE_DIR=\"/home/matthijs/Projects/moneymaker\" -I/home/matthijs/boost/boost_1_71_0 -I/home/matthijs/Projects/moneymaker/include -I/home/matthijs/Projects/moneymaker/tests/include -isystem /usr/include/postgresql -isystem /usr/include/postgresql/11/server -stdlib=libc++ -g -std=c++17 -o CMakeFiles/moneymaker_tests.dir/OrderId.cpp.o -c /home/matthijs/Projects/moneymaker/tests/OrderId.cpp
clang --analyze -Qunused-arguments --analyzer-no-default-checks -Xclang -analyzer-opt-analyze-headers -Xclang -analyzer-output=plist-multi-file -o /home/matthijs/Projects/moneymaker/results/OrderId.cpp_a14c79cf70086945860cebd27f04a703.plist -Xclang -analyzer-config -Xclang expand-macros=true -Xclang -analyzer-disable-checker=alpha.clone.CloneChecker -Xclang -analyzer-disable-checker=alpha.core.BoolAssignment -Xclang -analyzer-disable-checker=alpha.core.CallAndMessageUnInitRefArg -Xclang -analyzer-disable-checker=alpha.core.CastSize -Xclang