Dear @marty1885 and other C++ folks. I’m trying to install HTMPath as described in Path anomoly detection using Grid Cells and Temporal Memory, but having trouble, specifically with xtensor and xtl.
I downloaded xtl source code, did a local build (cmake and make), but back in xtensor I’m still getting this error:
> cmake ..
-- Building xtensor v0.19.1
CMake Error at CMakeLists.txt:32 (find_package):
By not providing "Findxtl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "xtl", but
CMake did not find one.
Could not find a package configuration file provided by "xtl" (requested
version 0.5.1) with any of the following names:
xtlConfig.cmake
xtl-config.cmake
Add the installation prefix of "xtl" to CMAKE_PREFIX_PATH or set "xtl_DIR"
to a directory containing one of the above files. If "xtl" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/Users/mtaylor/dev/xtensor/build/CMakeFiles/CMakeOutput.log".
I’m not a C++ guy so bear that in mind. I may just be doing something ignorant.
Have you make install
xtl? make only builds the binary (which xtl has none). While make install
installs the files
For example:
git clone https://github.com/QuantStack/xtl
cd xtl
cmake .
make
sudo make install
cd ..
git clone https://github.com/QuantStack/xtensor
cd xtensor
cmake .
make
sudo make install
1 Like
Thanks, I forgot to run make install
.
I’m on macOS, and I’m having trouble getting dependencies installed. I had to install XCode, then xtensor, now trying to install xtl.
Ohh… You’ll need to install xtl before xtensor otherwire xtensor will refuse to build. And you need nupic_core instealled. I forget about that.
And SFML shoule be installable from bomebrew.
Still having problems with SMFL. Do I also need to install imgui too?
∙ make -j10
[ 50%] Building CXX object CMakeFiles/imgui_sfml.dir/imgui.cpp.o
[ 50%] Building CXX object CMakeFiles/imgui_sfml.dir/imgui-SFML.cpp.o
[ 50%] Building CXX object CMakeFiles/bench.dir/bench.cpp.o
[ 50%] Building CXX object CMakeFiles/imgui_sfml.dir/imgui_draw.cpp.o
In file included from /Users/mtaylor/nta/HTMPath/imgui-SFML.cpp:1:
/Users/mtaylor/nta/HTMPath/./imgui-SFML.h:4:10: fatal error: 'SFML/System/Vector2.hpp' file not found
#include <SFML/System/Vector2.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~
imgui
is included in the repository directly. There is no need to install imgui explicitly. That seems to be caused by an old version of SFML. May you check which SFML are you using? The code should only work with SFML 2.5 (as the CMake script is utilizing functionality only available since 2.5). But you could also change the included file from SFML/System/Vector2.hpp
to whatever the path it is on your system. (Should be located under /usr/include
or /usr/local/include
. If under /usr/local/include
. Please let me know as you might need to change some parameters to make things working)
Ok, making progress.
Now another error:
∙ make -j10
[ 50%] Building CXX object CMakeFiles/imgui_sfml.dir/imgui_draw.cpp.o
[ 50%] Building CXX object CMakeFiles/bench.dir/bench.cpp.o
[ 50%] Building CXX object CMakeFiles/imgui_sfml.dir/imgui.cpp.o
[ 50%] Building CXX object CMakeFiles/imgui_sfml.dir/imgui-SFML.cpp.o
In file included from /Users/mtaylor/nta/HTMPath/bench.cpp:8:
/Users/mtaylor/nta/HTMPath/./HTMHelper.hpp:3:10: fatal error: 'nupic/algorithms/Cells4.hpp' file not
found
#include <nupic/algorithms/Cells4.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/bench.dir/bench.cpp.o] Error 1
make[1]: *** [CMakeFiles/bench.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 62%] Linking CXX shared library lib/libimgui_sfml.dylib
ld: library not found for -lGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libimgui_sfml.dylib] Error 1
make[1]: *** [CMakeFiles/imgui_sfml.dir/all] Error 2
make: *** [all] Error 2
You have a helper that is trying to classload Cells4 from the wrong place maybe?
The code works on my system. Do you have NuPIC.core installed? I do have a helper that wraps N-D array code around NuPIC.core.
Also you want to change L21 in CMakeLists.txt. Find GL
in that line and change it to OpenGL
. OS X has a different library name as Linux has.