tiramisu icon indicating copy to clipboard operation
tiramisu copied to clipboard

Trouble With Compiling Dependencies

Open WillianJunior opened this issue 3 years ago • 2 comments

I'm attempting to compile tag V0.2, but failing to resolve the 3rd party dependencies. More specifically, Halide. After running install_submodules.sh I encounter the following error:

I also tried to compile Halide manually, as advised by INSTALL.md with no success, as it breaks at tiramisu/3rdParty/Halide/Makefile:696:

ar: bin/build/llvm_objects/llvm_.o: No such file or directory

At last, I tried to compile Halide through cmake, which after some changes to CMakeFiles.txt it found the tiramisu/3rdParty/llvm dependency, but still failled to find some includes:

/home/willian/git/tiramisu/3rdParty/Halide/src/LLVM_Headers.h:18:10: fatal error: llvm/ExecutionEngine/JITEventListener.h: No such file or directory

I'm using Ubuntu 20.04, gcc 7.5.0 and cmake 3.16.3. How should I proceed in order to compile the dependencies?

Thanks for the help

WillianJunior avatar Nov 17 '21 22:11 WillianJunior

I' believe to have found the reason behind the "ar: bin/build/llvm_objects/llvm_.o: No such file or directory" problem: the Halide's Makefile.

The Makefile of Halide's tiramisu_64 branch (at 3rdParty) bundles multiple LLVM libs for libHalide.a. This list is compiled by line 670 of Makefile. However, this list is never used. I've changed line 696 to add argument "$(BUILD_DIR)/llvm_objects/list" instead of "$(BUILD_DIR)/llvm_objects/llvm_.o". This allows the compilation of Halide through install_submodules.sh.

Now, when trying to compile tiramisu, there are many linker errors similar to this: /usr/bin/ld: libtiramisu.so: undefined reference to 'llvm::TargetIRAnalysis::TargetIRAnalysis()'

WillianJunior avatar Nov 23 '21 02:11 WillianJunior

@WillianJunior Do you solve the linkers errors? I experienced the same problem as you met. However, after running the install script again, the problem "ar: bin/build/llvm_objects/llvm_.o: No such file or directory" disappeared. After make tiramisu, I met many linkers errors /usr/bin/ld: libtiramisu.so: undefined reference to 'llvm::..... I have no idea how to solve the problem.

kzwrime avatar Dec 16 '21 02:12 kzwrime