PRUNERS / archer

Archer, a data race detection tool for large OpenMP applications
https://pruners.github.io/archer
Apache License 2.0
61 stars 13 forks source link

CMake Error: could not find load file LLVMConfig #46

Closed lwb4 closed 6 years ago

lwb4 commented 6 years ago

I'm trying to manually build archer with the instructions in the runtime under the "Stand-alone building with LLVM OpenMP Runtime and ThreadSanitizer OMPT Support" heading.

OS is Ubuntu 16.04.

Everything was going hunky-dory until I ran this command:

cmake -G Ninja \
 -D CMAKE_C_COMPILER=clang-3.9 \
 -D CMAKE_CXX_COMPILER=clang++-3.9 \
 -D OMP_PREFIX:PATH=$OPENMP_INSTALL \
 -D CMAKE_INSTALL_PREFIX:PATH=${ARCHER_INSTALL} \
 ..

That command gave me this output:

-- LLVM llvm-config found at: /usr/bin/llvm-config
CMake Error at CMakeLists.txt:102 (include):
  include could not find load file:

    LLVMConfig

CMake Error at CMakeLists.txt:103 (include):
  include could not find load file:

    HandleLLVMOptions

CMake Error at CMakeLists.txt:104 (include):
  include could not find load file:

    AddLLVM

-- Found OpenMP: /home/lincoln/usr/include  
-- Found OpenMP: /home/lincoln/usr/lib  
CMake Error at lib/CMakeLists.txt:69 (add_llvm_loadable_module):
  Unknown CMake command "add_llvm_loadable_module".

I'm afraid I'm not well-versed in LLVM and have no clue what this means.

lwb4 commented 6 years ago

For what it's worth, it appears I have three different versions of everything llvm:

lincoln@ubuntu:/usr/bin$ ls ll*
llc                   llvm-dis            llvm-objdump-3.8
llc-3.8               llvm-dis-3.8        llvm-objdump-3.9
llc-3.9               llvm-dis-3.9        llvm-pdbdump-3.8
lli                   llvm-dsymutil-3.8   llvm-pdbdump-3.9
lli-3.8               llvm-dsymutil-3.9   llvm-PerfectShuffle-3.9
lli-3.9               llvm-dwarfdump      llvm-profdata-3.8
lli-child-target-3.9  llvm-dwarfdump-3.8  llvm-profdata-3.9
llvm-ar               llvm-dwarfdump-3.9  llvm-ranlib
llvm-ar-3.8           llvm-dwp-3.8        llvm-ranlib-3.8
llvm-ar-3.9           llvm-dwp-3.9        llvm-ranlib-3.9
llvm-as               llvm-extract        llvm-readobj-3.8
llvm-as-3.8           llvm-extract-3.8    llvm-readobj-3.9
llvm-as-3.9           llvm-extract-3.9    llvm-rtdyld
llvm-bcanalyzer       llvm-lib-3.8        llvm-rtdyld-3.8
llvm-bcanalyzer-3.8   llvm-lib-3.9        llvm-rtdyld-3.9
llvm-bcanalyzer-3.9   llvm-link           llvm-size
llvm-config           llvm-link-3.8       llvm-size-3.8
llvm-config-3.8       llvm-link-3.9       llvm-size-3.9
llvm-config-3.9       llvm-lto-3.8        llvm-split-3.8
llvm-cov              llvm-lto-3.9        llvm-split-3.9
llvm-cov-3.8          llvm-mc             llvm-stress-3.8
llvm-cov-3.9          llvm-mc-3.8         llvm-stress-3.9
llvm-c-test-3.8       llvm-mc-3.9         llvm-symbolizer-3.8
llvm-c-test-3.9       llvm-mcmarkup-3.8   llvm-symbolizer-3.9
llvm-cxxdump-3.8      llvm-mcmarkup-3.9   llvm-tblgen
llvm-cxxdump-3.9      llvm-nm             llvm-tblgen-3.8
llvm-diff             llvm-nm-3.8         llvm-tblgen-3.9
llvm-diff-3.8         llvm-nm-3.9
llvm-diff-3.9         llvm-objdump
lwb4 commented 6 years ago

So it appears the default llvm on ubuntu 16.04 is not the right version. I added the -D LLVM_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/llvm-config-3.9 to my original cmake command and it worked. Pretty confusing error message if you ask me!