Closed taf2 closed 2 years ago
Hi, @taf2, you are trying to build torch-rb against wrong version of libtorch. If you are trying to build actual at the moment torch-rb version 0.10.1 then you must have libtorch 1.11.0. Looks like your libtorch version is 1.9.*
@orlando-labs thanks - just ran brew install libtorch and got that older version... i'm running brew update now to see if i can get the newer version.
Actual brew should do the trick
orlylabs@MacBook-Pro ~ % brew upgrade libtorch
Warning: libtorch 1.11.0 already installed
Yes this worked! I also noticed when compiling with brew on linux... i had issues with LD_LIBRARY_PATH and CXXFLAGS, since by default brew linux puts things in /home/linuxbrew/... I'm at work now but can share details tonight... it's been usually nice to be able to use brew in mac and linux...
Hey @taf2, thanks for sharing. For Homebrew on Linux, you'll need to run:
bundle config build.torch-rb --with-torch-dir=/home/linuxbrew/.linuxbrew
before installing the gem. I've added it to the readme in the commit above.
@ankane thanks that worked - much easier thank hacking env vars thank you!
For future readers: Torch.rb now checks /home/linuxbrew/.linuxbrew
, so no additional config is needed.
./utils.h:8:1: error: static_assert failed due to requirement '1 == 1 && 9 == 11' "Incompatible LibTorch version"