TensorComprehensions icon indicating copy to clipboard operation
TensorComprehensions copied to clipboard

[Build] Error while "Building CXX object tc/core/CMakeFiles/tc_core_cpu.dir/polyhedral/llvm_jit.cc.o"

Open insuhan opened this issue 5 years ago • 0 comments

I got build errors while building CXX object tc/core/CMakeFiles/tc_core_cpu.dir/polyhedral/llvm_jit.cc.o. My settings are in below:

  • OS: ubuntu 18.04
  • How you installed TC (docker, conda, source): source
  • Python version: Python 3.6.12 :: Anaconda, Inc.
  • CUDA/cuDNN version: cuda 9.0
  • Conda version (if using conda): conda 4.9.1
  • Docker image (if using docker): N/A
  • GCC/GXX version (if compiling from source): 5.5
  • LLVM/Tapir git hash used (if compiling from source): I installed llvmlite (version 0.31.0) via pip. And when I checked "conda list | grep llvm", it returned
llvm-tapir50              0.1.0                h186cc49_2    tensorcomp
llvm-trunk                1.0.0                         1    nicolasvasilache

To get the hash, run: $CONDA_PREFIX/bin/clang --version

  • Commit hash of our repo and submodules (if compiling from source):
clang version 5.0.0 (https://github.com/wsmoses/Tapir-Clang 2637f015d66418964aa0225534c004dd71a174b8) (/opt/conda/conda-bld/git_cache/github.com/wsmoses/Tapir-LLVM ec3ad2b8d3810dde9c0aaccf3f3f971144d90bc2)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/0000/anaconda3/envs/tc_build/bin
  • A script to reproduce the issue (highly recommended if its a build issue)

I run CMake command as in build.sh then excute "make" in build directory.

  • Error messages and/or stack traces of the issue (create a gist)
[  2%] Built target gflags_nothreads_static
[  4%] Built target gflags_static
[  7%] Built target glog
[  8%] Built target signalhandler_unittest
[  9%] Built target stacktrace_unittest
[ 10%] Built target demangle_unittest
[ 11%] Built target symbolize_unittest
[ 12%] Built target logging_unittest
[ 13%] Built target stl_logging_unittest
[ 14%] Built target utilities_unittest
[ 15%] Built target gtest
[ 16%] Built target gtest_main
[ 52%] Built target tc_isl
[ 54%] Built target tc_lang
[ 56%] Built target tc_proto
[ 57%] Built target tc_version
[ 68%] Built target tc_core
[ 73%] Built target tc_cuda
[ 73%] Building CXX object tc/core/CMakeFiles/tc_core_cpu.dir/polyhedral/llvm_jit.cc.o
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc: In constructor ‘tc::Jit::Jit()’:
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:40:7: error: class ‘tc::Jit’ does not have any field named ‘ES’
     : ES(),
       ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:41:7: error: class ‘tc::Jit’ does not have any field named ‘Resolver’
       Resolver(llvm::orc::createLegacyLookupResolver(
       ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:41:16: error: ‘createLegacyLookupResolver’ is not a member of ‘llvm::orc’
       Resolver(llvm::orc::createLegacyLookupResolver(
                ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:42:11: error: ‘ES’ was not declared in this scope
           ES,
           ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:58:29: error: ‘llvm::orc::VModuleKey’ has not been declared
           [this](llvm::orc::VModuleKey) {
                             ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc: In lambda function:
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:59:20: error: ‘Resources’ is not a member of ‘llvm::orc::RTDyldObjectLinkingLayer’
             return llvm::orc::RTDyldObjectLinkingLayer::Resources{
                    ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:59:20: error: ‘Resources’ is not a member of ‘llvm::orc::RTDyldObjectLinkingLayer’
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:59:66: error: expected ‘;’ before ‘{’ token
             return llvm::orc::RTDyldObjectLinkingLayer::Resources{
                                                                  ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:60:59: error: ‘Resolver’ was not declared in this scope
                 std::make_shared<SectionMemoryManager>(), Resolver};
                                                           ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc: In member function ‘void tc::Jit::addModule(std::shared_ptr<llvm::Module>)’:
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:66:12: error: ‘ES’ was not declared in this scope
   auto K = ES.allocateVModule();
            ^
/home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:67:62: error: no matching function for call to ‘CloneModule(llvm::Module&)’
   llvm::Error res = compileLayer_.addModule(K, CloneModule(*M));
                                                              ^
In file included from /home/0000/workspace/TensorComprehensions/tc/core/polyhedral/llvm_jit.cc:29:0:
/home/0000/anaconda3/envs/tc_build/include/llvm/Transforms/Utils/Cloning.h:52:25: note: candidate: std::unique_ptr<llvm::Module> llvm::CloneModule(const llvm::Module*)
 std::unique_ptr<Module> CloneModule(const Module *M);
                         ^
/home/0000/anaconda3/envs/tc_build/include/llvm/Transforms/Utils/Cloning.h:52:25: note:   no known conversion for argument 1 from ‘llvm::Module’ to ‘const llvm::Module*’
/home/0000/anaconda3/envs/tc_build/include/llvm/Transforms/Utils/Cloning.h:53:25: note: candidate: std::unique_ptr<llvm::Module> llvm::CloneModule(const llvm::Module*, llvm::ValueToValueMapTy&)
 std::unique_ptr<Module> CloneModule(const Module *M, ValueToValueMapTy &VMap);
                         ^
/home/0000/anaconda3/envs/tc_build/include/llvm/Transforms/Utils/Cloning.h:53:25: note:   candidate expects 2 arguments, 1 provided
/home/0000/anaconda3/envs/tc_build/include/llvm/Transforms/Utils/Cloning.h:60:1: note: candidate: std::unique_ptr<llvm::Module> llvm::CloneModule(const llvm::Module*, llvm::ValueToValueMapTy&, llvm::function_ref<bool(const llvm::GlobalValue*)>)
 CloneModule(const Module *M, ValueToValueMapTy &VMap,
 ^
/home/0000/anaconda3/envs/tc_build/include/llvm/Transforms/Utils/Cloning.h:60:1: note:   candidate expects 3 arguments, 1 provided
tc/core/CMakeFiles/tc_core_cpu.dir/build.make:133: recipe for target 'tc/core/CMakeFiles/tc_core_cpu.dir/polyhedral/llvm_jit.cc.o' failed
make[2]: *** [tc/core/CMakeFiles/tc_core_cpu.dir/polyhedral/llvm_jit.cc.o] Error 1
CMakeFiles/Makefile2:1761: recipe for target 'tc/core/CMakeFiles/tc_core_cpu.dir/all' failed
make[1]: *** [tc/core/CMakeFiles/tc_core_cpu.dir/all] Error 2
Makefile:181: recipe for target 'all' failed
make: *** [all] Error 2

Thanks in advance

insuhan avatar Nov 06 '20 08:11 insuhan