From d6722127d9d44d824fcba4c9832fa003768eb9b3 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Fri, 1 May 2020 00:39:37 +0430 Subject: added a note regarding stddef.h not found in the readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3f9756b..bbd54a3 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ - [mutator-lvl0](#mutator-lvl0) - [Directory Outline](#directory-outline) - [Acknowledgements](#acknowledgements) +- [FAQ](#faq) - [Feedback](#feedback) - [Suggestions and Feature Requests](#suggestions-and-feature-requests) - [TODO List](#todo-list) @@ -399,6 +400,13 @@ Misra 2012 support will be added in the future.
Also a note regarding building the LLVM libraries. It is safer to build the libraries with clang++ if you're going to later use those libraries with clang++(you can get the distro version of clang from your distro's repo). The same applies to g++.
The master branch is the dev version. Release versions will be forked.
+### FAQ + +#### tool complains that it can't find stddef.h +Tool complains that it cannot find `stddef.h` or some other similar header. If that happens to you , it's because the tool can't find the clang built-in headers. run `llvm-config --libdir`, then head on to `clang`. Inside that directory you should see one(or maybe more) llvm/clang versions. Pick the one you used to build cgrep against. Inside that directory there will be a directory named `include`. Pass that to the tool any way you see fit.
+Alternatively, `$(llvm-config --libdir)/clang/$(llvm-config --version)/include` should give the path the tool needs to include. If you build your llvm/clang from upstream, this might not work. SVN bulds will have the svn string attached to the version number.
+You could,for example, use `--extra-arg=-I/usr/lib/llvm-9/lib/clang/9.0.0/include` to call cgrep or you could just alias `cgrep` to `cgrep --extra-arg=-I/usr/lib/llvm-9/lib/clang/9.0.0/include`.
+ ### Acknowledgements Project mutator uses the following libraries: * [LLVM/Clang](http://llvm.org) -- cgit v1.2.3