Closed leoauri closed 8 months ago
I have tested with libtorch 2.2.1 and 2.2.0, the only versions I can still download from pytorch. Same error.
cmake version 3.28.1
GNU Make 3.81
GNU Make 4.4.1 same errors
I was able to find libtorch 2.1.0 here.
The build gets further and instead ends with error:
[ 11%] Building CXX object backend/CMakeFiles/backend.dir/parsing_utils.cpp.o
[ 22%] Building CXX object backend/CMakeFiles/backend.dir/backend.cpp.o
[ 33%] Linking CXX static library libbackend.a
[ 33%] Built target backend
[ 44%] Building CXX object frontend/maxmsp/nn_tilde/CMakeFiles/nn_tilde.dir/nn_tilde.cpp.o
.../nn_tilde/src/frontend/maxmsp/nn_tilde/nn_tilde.cpp:5:10: fatal error: 'semaphore' file not found
#include <semaphore>
^~~~~~~~~~~
1 error generated.
gmake[2]: *** [frontend/maxmsp/nn_tilde/CMakeFiles/nn_tilde.dir/build.make:76: frontend/maxmsp/nn_tilde/CMakeFiles/nn_tilde.dir/nn_tilde.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:178: frontend/maxmsp/nn_tilde/CMakeFiles/nn_tilde.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
std::counting_semaphore
needs Apple Clang >= 13.1.6, so I needed to upgrade Xcode. I used
Xcode 15.3 beta 3.
The libtorch version I found above didn't work for building arm64 builds. Luckily I wanted to build x86 versions anyway, so including -DCMAKE_OSX_ARCHITECTURES=x86_64
in the cmake
command, I was able to build successfully.
Having followed the instructions from the README
I end up with errors, mainly
error: 'value' is unavailable: introduced in macOS 10.14
.MacBook Pro 14-inch, 2021 M1 Pro, MacOS 14.2.1 (23C71)
Complete output
``` $ make [ 11%] Building CXX object backend/CMakeFiles/backend.dir/parsing_utils.cpp.o [ 22%] Building CXX object backend/CMakeFiles/backend.dir/backend.cpp.o In file included from .../nn_tilde/src/backend/backend.cpp:1: In file included from .../nn_tilde/src/backend/backend.h:4: In file included from .../nn_tilde/libtorch/include/torch/script.h:3: In file included from .../nn_tilde/libtorch/include/torch/csrc/api/include/torch/types.h:3: In file included from .../nn_tilde/libtorch/include/ATen/ATen.h:7: In file included from .../nn_tilde/libtorch/include/ATen/Context.h:6: .../nn_tilde/libtorch/include/ATen/core/DeprecatedTypeProperties.h:110:34: error: 'value' is unavailable: introduced in macOS 10.14 Device device = device_opt.value(); ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here constexpr value_type& value() & ^ In file included from .../nn_tilde/src/backend/backend.cpp:1: In file included from .../nn_tilde/src/backend/backend.h:4: In file included from .../nn_tilde/libtorch/include/torch/script.h:3: In file included from .../nn_tilde/libtorch/include/torch/csrc/api/include/torch/types.h:3: In file included from .../nn_tilde/libtorch/include/ATen/ATen.h:9: In file included from .../nn_tilde/libtorch/include/ATen/DeviceGuard.h:3: In file included from .../nn_tilde/libtorch/include/ATen/core/IListRef.h:631: In file included from .../nn_tilde/libtorch/include/ATen/core/IListRef_inl.h:3: In file included from .../nn_tilde/libtorch/include/ATen/core/List.h:490: In file included from .../nn_tilde/libtorch/include/ATen/core/List_inl.h:4: In file included from .../nn_tilde/libtorch/include/ATen/core/ivalue.h:4: In file included from .../nn_tilde/libtorch/include/ATen/core/TensorBody.h:28: .../nn_tilde/libtorch/include/c10/util/OptionalArrayRef.h:159:34: error: 'value' is unavailable: introduced in macOS 10.14 return wrapped_opt_array_ref.value(); ^ .../nn_tilde/libtorch/include/c10/util/OptionalArrayRef.h:222:13: note: in instantiation of member function 'c10::OptionalArrayRef