I’m trying to get LibTorch running on an aarch64 computer. Namely a Jetson AGX Xavier.
I built it by downloading the PyTorch repo and running ‘python3 tools/build_libtorch.py’
It took hours to ‘build libtorch’ and then I ran the example script from the official LibTorch site.
The first time I created a build folder, and ran cmake -DCMAKE_PREFIX_PATH=/home/jet/pytorch/ …  then cmake --build . --config Release
it seemed like it built with no errors, but since that one time it worked I’ve been getting the following error…
This is the error I get now when I run cmake -DCMAKE_PREFIX_PATH=/home/jet/pytorch/ …
$ cmake -DCMAKE_PREFIX_PATH=/home/jet/pytorch/ …
– The C compiler identification is Clang 6.0.0
– The CXX compiler identification is Clang 6.0.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/lib/ccache/clang - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/lib/ccache/clang++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Warning at /home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library onnx_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:104 (append_torchlib_if_found)
CMakeLists.txt:4 (find_package)
CMake Warning at /home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library foxi_loader_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:106 (append_torchlib_if_found)
CMakeLists.txt:4 (find_package)
CMake Warning at /home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library fmt_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:106 (append_torchlib_if_found)
CMakeLists.txt:4 (find_package)
CMake Warning at /home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library eigen_blas_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:113 (append_torchlib_if_found)
CMakeLists.txt:4 (find_package)
CMake Warning at /home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library asmjit_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/jet/pytorch/torch/share/cmake/Torch/TorchConfig.cmake:123 (append_torchlib_if_found)
CMakeLists.txt:4 (find_package)
– Found Torch: /home/jet/pytorch/torch/lib/libtorch.a
– Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
-Wl,-force_load,/home/jet/pytorch/torch/lib/libtorch.a;-Wl,-force_load,/home/jet/pytorch/torch/lib/libtorch_cpu.a;-Wl,-force_load,/home/jet/pytorch/torch/lib/libtorch_cuda.a;-Wl,-force_load,/home/jet/pytorch/torch/lib/libc10_cuda.a;/home/jet/pytorch/torch/lib/libc10.a;/home/jet/pytorch/torch/lib/libcaffe2_protos.a;/home/jet/pytorch/torch/lib/libprotobuf-lite.a;/home/jet/pytorch/torch/lib/libprotobuf.a;/home/jet/pytorch/torch/lib/libprotoc.a;/usr/lib/aarch64-linux-gnu/libonnx_proto.a;/home/jet/pytorch/torch/lib/libclog.a;/home/jet/pytorch/torch/lib/libcpuinfo.a;/home/jet/pytorch/torch/lib/libsleef.a;/home/jet/pytorch/torch/lib/libkineto.a;LIBNVTOOLSEXT
linked by target “example-app” in directory /home/jet/example-app
– Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.