tch-rs
tch-rs copied to clipboard
Header files supposedly missing
Hello. I'm trying to compile a project that uses your library as a dependency. I'm currently on Linux and, as per instructions in the readme about manual installations, I added environmental variables for LIBTORCH and LD_LIBRARY_PATH. I used config.toml for that:
[env]
LIBTORCH = "models/libtorch"
LD_LIBRARY_PATH = "models/libtorch/lib:$LD_LIBRARY_PATH"
As far as I can tell, it does pick up that LIBTORCH is defined (the behavior is the same whether I use "export" in bash or define environmental variables with cargo's config.toml), but in either case, it doesnt seem to realize that the include folder exists.
The error I encountered is:
torch/csrc/autograd/engine.h: No such file or directory,
but that file does exist inside models/libtorch/include/torch/csrc/autograd/.
The models folder is inside crate's root folder, next to src and I call cargo from that root folder with cargo run/build.
I did try different combinations of ./models/libtorch, /models/libtorch/, models/libtorch/include, both through [env] and export, but to no avail.
Am I doing something wrong or is this an issue with the library? If I am, could you guide me in the right direction?
With regards, Cal
I got the same issue ... If someone knows how to fix this, that would be awesome :)