etaler / Etaler

A flexable HTM (Hierarchical Temporal Memory) framework with full GPU support.
BSD 3-Clause "New" or "Revised" License
89 stars 14 forks source link

Build process can't find Catch2 #33

Closed dstromberg closed 5 years ago

dstromberg commented 5 years ago

I'm attempting to build Etaler with:

TBBROOT=/usr
export TBBROOT

cp ../Catch2/include/catch.hpp tests/.
cp -r ../cereal/. Etaler/3rdparty/.

mkdir build
cd build
cmake ..
make -j1

But I quickly get the following error:

-- Performing Test HAVE_CXA_DEMANGLE -- Performing Test HAVE_CXA_DEMANGLE - Success CMake Error at tests/CMakeLists.txt:4 (find_package): By not providing "FindCatch2.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Catch2", but CMake did not find one.

Could not find a package configuration file provided by "Catch2" with any of the following names:

Catch2Config.cmake
catch2-config.cmake

Add the installation prefix of "Catch2" to CMAKE_PREFIX_PATH or set "Catch2_DIR" to a directory containing one of the above files. If "Catch2" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred! See also "/home/dstromberg/src/etaler/src/build/CMakeFiles/CMakeOutput.log".

Am I putting Catch2 in the wrong place?

Thanks!

dstromberg commented 5 years ago

Oh, and I'm on a Linux Mint 19.1 system, using an Etaler checked out earlier today.

marty1885 commented 5 years ago

@dstromberg Thanks for your report. You'll need to install Catch2 to system. As we initially decided that Catch2 is too big of a library to be included as a sub-module. The CMake script we wrote only works when Catch2 is installed to system. The following command should do the trick.

 $ git clone https://github.com/catchorg/Catch2
 $ mkdir build
 $ cd build
 $ cmake ..
 $ make
 $ sudo make install

Or if you want a simpler solution. If you are not interested in running the tests, you can disable the tests using the ETALER_BUILD_TESTS flag. cmake -DETALER_BUILD_TESTS=off ..

Also, you might want to install cereal to system too. Though putting it in the 3rdparty directory should also work.

marty1885 commented 5 years ago

Update: I believe the instructions are added for Windows support. And they might not work with Linux.

breznak commented 5 years ago

I'm trying to run this repo on ubuntu 18.04,

TBB dependency was easy with apt install libtbb-dev

As we initially decided that Catch2 is too big of a library to be included as a sub-module. The CMake script we wrote only works when Catch2 is installed to system.

as a dependency that likely needs building from source, it would be nice if you could automate the process. (ie installed during cmake)

marty1885 commented 5 years ago

as a dependency that likely needs building from source, it would be nice if you could automate the process. (ie installed during cmake)

Yeah.. I agree.. On my to-do list!

breznak commented 5 years ago

@dkeeney has implemented this for htm.core, cmake uses "downloadProject" to pull and build any other external deps during configuration phase. It works really nice For example, https://github.com/htm-community/htm.core/blob/master/external/eigen.cmake

marty1885 commented 5 years ago

@breznak BTW, if you just want to build the library and don't care about using it. You can use the docker build scripts.

breznak commented 5 years ago

ad docker: nice! :+1: I didn't see that's available. Yes, for start I want to just try to build and run a few examples.

alior101 commented 5 years ago

@breznak - I PR (few minutes ago) martin with an updated docker with works on my linux machine and contains all dependencies (except the catch2 - which I disabled in cmake file) -

marty1885 commented 5 years ago

@alior101 Thank you! Review is in progress.

marty1885 commented 5 years ago

@alior101 Just double checking. Does your PR fix this issue?

alior101 commented 5 years ago

yes, downloading and putting directly in place seems to fix it - at least in my docker image ..

On Fri, Aug 2, 2019 at 5:56 AM Martin Chang notifications@github.com wrote:

@alior101 https://github.com/alior101 Just double checking. Does your PR fix this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/issues/33?email_source=notifications&email_token=AAXET3AEYILOFKVPTGDQRXTQCOO5LA5CNFSM4H6UI6OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3MNWUQ#issuecomment-517528402, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3B5FXT7CVNFLRJ6MPTQCOO5LANCNFSM4H6UI6OA .

marty1885 commented 5 years ago

I guess this issue is resolved. closing.

Feel free to re-open if anyone still have the problem.