tch-rs icon indicating copy to clipboard operation
tch-rs copied to clipboard

Header files supposedly missing

Open Calandiel opened this issue 3 years ago • 1 comments

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

Calandiel avatar Jan 23 '22 20:01 Calandiel

I got the same issue ... If someone knows how to fix this, that would be awesome :)

squiidz avatar Apr 06 '23 03:04 squiidz