DeadCodeProductions / dead

Other
50 stars 5 forks source link

callchain_checker build failed #75

Closed Ghy0202 closed 1 year ago

Ghy0202 commented 1 year ago

hello~I come back again.🤣 As mentioned in the previous issue, when I was conducting experiments, I found that there was no case for a long time. I finally found that the program consistently outputs False under the judgment of the is_interesting_wrt_ccc, which may be the reason why the case cannot be generated. I tried to execute CCC and found an error:

CommandLine Error: Option 'use-dbg-addr' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

I consulted StackOverflow's suggestion and recompiled LLVM-14.0.0 with the following command:

cmake -G Ninja -DCMAKE_BUILD_TYPE="Release" -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;compiler-rt" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON  -DLLVM_ENABLE_EN=ON  -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="/usr" ../llvm

, but found that the ccc module that could have been successfully compiled failed with an error as follows:

image

I think the issue should be caused by the command in the "/callchain_checker/build/src/CMakeFiles/ccc. dir/link. txt" file, but I am not sure how to fix it. The content in link.txt is like this:

/usr/bin/c++ -Wall -Wextra -Wpedantic -march=native -O3 CMakeFiles/ccc.dir/CallChainCheckerTool.cpp.o -o ../bin/ccc  libccc-lib.a /usr/lib/libLLVM-14.so /usr/lib/libclang-cpp.so.14

Or is this still a problem caused by inconsistent configuration information in LLVM installation?😢

Ghy0202 commented 1 year ago

I find this version of CCC can solve the bug.😍