Failed to install libtorch

Hi,

I am building from sources libtorch with support of GPU on OSX.

The build is fine everthing seems to be working but when I call make install I have this error

CMake Error at third_party/protobuf/cmake/cmake_install.cmake:80 (file):
  file cannot create directory:
  /Volumes/WORKSPACE/exp/pytorch/torch/include/google/protobuf.
  Maybe need administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:95 (include)

Here the command I used to build:

  1. export CMAKE_PREFIX_PATH=/Volumes/WORKSPACE/exp/pytorch/install
  2. MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python3 setup.py build --cmake-only
  3. python3 setup.py install

Is there something I am doing wrong ?
Thanks

Did you properly updated all the submodules with git submodule update --init --recursive?
Also make sure you don’t have permission issues in your folder. It complains that it cannot create directories.

Hi @albanD, sorry for my late response, It seems I initialize all the repository properly.

During the install it seems, torch is creating symlink, the google/protobuf is not a folder in my install but a symlink, is it normal ?

Thanks

Tony

In the third_party folder? It should be a submodule.

I just delete everything and rebuild from scratch, it seems I am able to build and install Libtorch now.

It may be a trouble when I was doing the submodule update --init --recursive.

Thanks for you help.

1 Like