Static library fmt_LIBRARY-NOTFOUND errors on my LibTorch install to aarch64

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