harvard-acc / LLVM-Tracer

An LLVM pass to profile dynamic LLVM IR instructions and runtime values
Other
135 stars 35 forks source link

fatal error: llvm/Analysis/LoopInfo.h: No such file or directory #23

Closed jerrysinha closed 6 years ago

jerrysinha commented 6 years ago

I followed the following steps to install llvm and LLVM-Tracer: Installing llvm:

  1. svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_34/final llvm
  2. cd llvm/tools
  3. svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_34/final clang
  4. cd ../..
  5. cd llvm/tools/clang/tools
  6. svn co http://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_34/final extra
  7. cd ../../../..
  8. cd llvm/projects
  9. svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_34/final compiler-rt
  10. cd ../..
  11. mkdir build (in-tree build is not supported)
  12. cd build
  13. cmake -G "Unix Makefiles" ../llvm
  14. make

Installing LLVM-Tracer:

  1. export LLVM_HOME=export LLVM_HOME=/home/mitali/build
  2. git clone https://github.com/ysshao/LLVM-Tracer
  3. cd LLVM-Tracer/
  4. mkdir build/
  5. cd build
  6. cmake ..
  7. make error: **Scanning dependencies of target full_trace [ 7%] Building CXX object full-trace/CMakeFiles/full_trace.dir/full_trace.cpp.o /home/mitali/LLVM-Tracer/full-trace/full_trace.cpp:4:36: fatal error: llvm/Analysis/LoopInfo.h: No such file or directory

    include "llvm/Analysis/LoopInfo.h"

                                ^

    compilation terminated. make[2]: [full-trace/CMakeFiles/full_trace.dir/full_trace.cpp.o] Error 1 make[1]: [full-trace/CMakeFiles/full_trace.dir/all] Error 2 make: * [all] Error 2

xyzsam commented 6 years ago

We've seen this problem in the past when building from source. We never got to the bottom of it, but people have been able to workaround this by using the Docker image that I recently prepared. You can get it here: hub.docker.io/xyzsam/gem5-aladdin.

jerrysinha commented 6 years ago

@xyzsam thanks for your suggestion. I will look into it.

drodo commented 6 years ago

Hello,

are there any pointers for the above error? Sadly, I am unable to use Docker in my setup.

Cheers & Thanks,

-- drodo

xyzsam commented 6 years ago

Have you tried LLVM 3.4.2? You can also try copy pasting the commands used in the Dockerfile to build and install - those have worked reliably for me.

drodo commented 6 years ago

@xyzsam thanks for the pointer! ended up porting the entire thing to a machine with Docker enabled. Really bypasses the whole installation process. Anyway, thanks again!