You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And even then cmake couldn't locate my lua header directly. I had to manually set the LUA_INCLUDE_DIR to G:/LuaJIT-2.1.0/include/luajit-2.1.
Torch7 finally builds after making the above changes. It produced 3 targets: libtorch.dll, libTH.dll and libluaT.dll and they all reside in G:/OSS/torch7/build. It's unclear to me if the directory layout of those target outputs and intermediate files is even correct. What should a properly installed directory tree look like so that outside projects can correctly and reliably find it as a dependency?
Since I'm originally trying to get torch-threads working, let's use that as an example. Running cmake over torch-threads gives me the follow errors:
CMake Error at CMakeLists.txt:7 (find_package):
By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Torch", but
CMake did not find one.
Could not find a package configuration file provided by "Torch" with any of
the following names:
TorchConfig.cmake
torch-config.cmake
Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
"Torch_DIR" to a directory containing one of the above files. If "Torch"
provides a separate development package or SDK, be sure it has been
installed.
Now I can point Torch_DIR to some place in where TorchConfig.cmake exist but somehow that doesn't seem to be the right way to resolve things. And indeed I tried exactly that setting Torch_DIR to G:/OSS/torch7/build/cmake-exports but that only gives me more errors like:
CMake Error at G:/OSS/torch7/build/cmake-exports/TorchConfig.cmake:24 (INCLUDE):
include could not find load file:
TorchPathsInit
Likewise for TorchPackage, TorchWrap and others.
I'd really like to not have to play whack-a-mole with the build process. What's the right approach to ensure I can build torch and torch-threads painlessly with the environment I have?
Thanks
The text was updated successfully, but these errors were encountered:
In particular how does my build environment need to be setup to ensure cmake finds what it needs?
Here's what's setup so far:
The corresponding paths for each of the above have been added to
set Path
.Problems encountered so far:
Under mingw
ssize_t
is already defined under one of its headers. I fixed it by wrapping thattypedef
in an#ifndef
guard inlib/TH/THGeneral.h.in
.The torch7 cmake file isn't properly locating my luajit location setup. I had to manually add
And even then cmake couldn't locate my lua header directly. I had to manually set the
LUA_INCLUDE_DIR
toG:/LuaJIT-2.1.0/include/luajit-2.1
.Torch7 finally builds after making the above changes. It produced 3 targets:
libtorch.dll
,libTH.dll
andlibluaT.dll
and they all reside inG:/OSS/torch7/build
. It's unclear to me if the directory layout of those target outputs and intermediate files is even correct. What should a properly installed directory tree look like so that outside projects can correctly and reliably find it as a dependency?Since I'm originally trying to get torch-threads working, let's use that as an example. Running cmake over torch-threads gives me the follow errors:
Now I can point
Torch_DIR
to some place in whereTorchConfig.cmake
exist but somehow that doesn't seem to be the right way to resolve things. And indeed I tried exactly that settingTorch_DIR
toG:/OSS/torch7/build/cmake-exports
but that only gives me more errors like:Likewise for
TorchPackage
,TorchWrap
and others.I'd really like to not have to play whack-a-mole with the build process. What's the right approach to ensure I can build torch and torch-threads painlessly with the environment I have?
Thanks
The text was updated successfully, but these errors were encountered: