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

build error #1

Open
Tigerly opened this issue Jul 16, 2019 · 3 comments
Open

build error #1

Tigerly opened this issue Jul 16, 2019 · 3 comments

Comments

@Tigerly
Copy link

Tigerly commented Jul 16, 2019

Hello,

There is an error when I try to compile the project (use "make").
Would it be possible to help to check it?

Here is the error message:
[ 75%] Building C object dataflow/runtime/CMakeFiles/runtime.dir/runtime.o cc: error: unrecognized argument to -fsanitize= option: ‘dataflow’ dataflow/runtime/CMakeFiles/runtime.dir/build.make:62: recipe for target 'dataflow/runtime/CMakeFiles/runtime.dir/runtime.o' failed make[2]: *** [dataflow/runtime/CMakeFiles/runtime.dir/runtime.o] Error 1 CMakeFiles/Makefile2:142: recipe for target 'dataflow/runtime/CMakeFiles/runtime.dir/all' failed make[1]: *** [dataflow/runtime/CMakeFiles/runtime.dir/all] Error 2 Makefile:83: recipe for target 'all' failed
Thanks in advance!

@evilpan
Copy link
Owner

evilpan commented Jul 16, 2019

Note the following error message:

unrecognized argument to -fsanitize= option: ‘dataflow’ 

Which means you should (re)build your clang(compiler-rt) with DataFlowSanitizer enabled.

@Tigerly
Copy link
Author

Tigerly commented Jul 16, 2019

@pannzh Thanks so much for the reply.

Actually, when I try to do - 2). compile runtime library
clang -g -fsanitize=dataflow ../dataflow/runtime/runtime.c \ -I../dataflow/runtime -c -o runtime.o
It works well. The runtime.o has been generated. So, I guess my clang is OK.

However,
when I try to do - 1). compile target source with clang
clang -g -fsanitize=dataflow -std=c11 -Xclang -load -Xclang ../build/dataflow/libLoadStorePass.so -I../dataflow/runtime -c target.c -o target.o error: unable to load plugin '../build/dataflow/libLoadStorePass.so': '../build/dataflow/libLoadStorePass.so: undefined symbol: _ZN4llvm23EnableABIBreakingChecksE'

I'm a little bit confused about that...

@evilpan
Copy link
Owner

evilpan commented Jul 16, 2019

What's your LLVM version? I built and tested this pass with LLVM3.8, 3.9, 4.0, and maybe 5.0. Since LLVM introduce breaking changes from time to time, It's sugguested to use a dedicated version instead.

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

2 participants