Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Error #43

Open
liaomin111 opened this issue Sep 6, 2021 · 3 comments
Open

Make Error #43

liaomin111 opened this issue Sep 6, 2021 · 3 comments

Comments

@liaomin111
Copy link

I ran the cmake command successfully, but I encountered an error when I ran the make command.

CMAKE Output:
-- The CXX compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /bwfefs/opt/x86_64/gcc/5.4.0/bin/c++
-- Check for working CXX compiler: /bwfefs/opt/x86_64/gcc/5.4.0/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- use LLVM_ROOT : /home/Huimin97/download/LLVM-Tracer/build/lib/llvm-3.4
-- find LLVM-Config : /home/Huimin97/libs/llvm3.4/bin/llvm-config
-- LLVM version : 3.4svn
-- LLVM_LINK found : /home/Huimin97/libs/llvm3.4/bin/llvm-link
-- LLVM_OPT found : /home/Huimin97/libs/llvm3.4/bin/opt
-- LLVM_LLC found : /home/Huimin97/libs/llvm3.4/bin/llc
-- LLVM_COMPILER found : /home/Huimin97/libs/llvm3.4/bin/clang-3.4
-- Found ZLIB: /home/Huimin97/libs/zlib/lib (found suitable version "1.2.11", minimum required is "1.2.10")
-- Found Curses: /usr/lib64/libcurses.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/Huimin97/download/LLVM-Tracer/build

MAKE Output:
Scanning dependencies of target trace_logger
Scanning dependencies of target get-labeled-stmts
Scanning dependencies of target full_trace
[ 8%] Generating trace_logger.obj.llvm
[ 16%] Building CXX object full-trace/CMakeFiles/full_trace.dir/full_trace.cpp.o
[ 25%] Building CXX object ast-pass/CMakeFiles/get-labeled-stmts.dir/GetLabeledStmts.cpp.o
[ 25%] Built target full_trace
[ 33%] Generating trace_logger.unopt.llvm
[ 41%] Generating trace_logger.llvm
[ 41%] Built target trace_logger
Scanning dependencies of target PROFILE_FUNC
[ 41%] Built target PROFILE_FUNC
Scanning dependencies of target Tracer_triad
[ 50%] Generating triad.obj.llvm
[ 58%] Generating triad.unopt.llvm
Linking CXX executable get-labeled-stmts
[ 66%] Generating triad.llvm
[ 75%] Generating triad-opt.llvm
Error opening '/home/Huimin97/download/LLVM-Tracer/build/full-trace/full_trace.so': /home/Huimin97/download/LLVM-Tracer/build/full-trace/full_trace.so: undefined symbol: _ZNK4llvm12FunctionPass17createPrinterPassERNS_11raw_ostreamERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
-load request ignored.
opt: Unknown command line argument '-fulltrace'. Try: '/home/Huimin97/libs/llvm3.4/bin/opt -help'
opt: Did you mean '-filetype'?
make[2]: *** [example/triad/triad-opt.llvm] Error 1
make[1]: *** [example/triad/CMakeFiles/Tracer_triad.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/get-labeled-stmts.dir/GetLabeledStmts.cpp.o: In function main': GetLabeledStmts.cpp:(.text.startup+0x6e): undefined reference to clang::tooling::ClangTool::ClangTool(clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >)'
collect2: error: ld returned 1 exit status
make[2]: *** [ast-pass/get-labeled-stmts] Error 1
make[1]: *** [ast-pass/CMakeFiles/get-labeled-stmts.dir/all] Error 2
make: *** [all] Error 2

I don't know how to fix it, and I checked that the file full_trace.so exists.

@xyzsam
Copy link
Member

xyzsam commented Sep 9, 2021

Are you building this from the Docker image?

@liaomin111
Copy link
Author

Are you building this from the Docker image?

No, I don't use docker.

@Kepontry
Copy link

It seems that your llvm's vesion(3.4) is low and the opt doesn't support the '-fulltrace' argument, the latest project needs llvm6.0.
By the way, building LLVM-Tracer from the Docker image is convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants