🐛 Bug
Building libtorch using CMake with binary tools and without python part will result into failure:
[100%] Linking CXX executable ../bin/aot_model_compiler
/usr/bin/ld: cannot find -laot_compiler
collect2: error: ld returned 1 exit status
binaries/CMakeFiles/aot_model_compiler.dir/build.make:106: recipe for target 'bin/aot_model_compiler' failed
make[2]: *** [bin/aot_model_compiler] Error 1
CMakeFiles/Makefile2:6428: recipe for target 'binaries/CMakeFiles/aot_model_compiler.dir/all' failed
make[1]: *** [binaries/CMakeFiles/aot_model_compiler.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
It happens because CMake script exits too early if python part is disabled.
Also it does not install required library for aot_model_compiler target.
I will provide PR wit fix.
To Reproduce
mkdir build && cd build
cmake -DBUILD_BINARY=ON -DBUILD_PYTHON=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3 ..
make
Environment
- PyTorch Version (e.g., 1.0): master
- OS (e.g., Linux): Ubuntu 18.04
- How you installed PyTorch (
conda, pip, source): source
- Python version: 3.6.9
cc @malfet @seemethere
🐛 Bug
Building libtorch using CMake with binary tools and without python part will result into failure:
It happens because CMake script exits too early if python part is disabled.
Also it does not install required library for aot_model_compiler target.
I will provide PR wit fix.
To Reproduce
Environment
conda,pip, source): sourcecc @malfet @seemethere