Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build process can't find Catch2 #33

Closed
dstromberg opened this issue Jul 6, 2019 · 13 comments
Closed

Build process can't find Catch2 #33

dstromberg opened this issue Jul 6, 2019 · 13 comments
Labels
build Problems with building

Comments

@dstromberg
Copy link

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
Copy link
Author

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

@marty1885
Copy link
Member

marty1885 commented Jul 7, 2019

@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
Copy link
Member

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

@breznak
Copy link

breznak commented Jul 11, 2019

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
Copy link
Member

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
Copy link

breznak commented Jul 11, 2019

@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
Copy link
Member

@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
Copy link

breznak commented Jul 11, 2019

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

@marty1885 marty1885 added the build Problems with building label Jul 11, 2019
@alior101
Copy link
Contributor

@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
Copy link
Member

@alior101 Thank you! Review is in progress.

@marty1885
Copy link
Member

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

@alior101
Copy link
Contributor

alior101 commented Aug 2, 2019 via email

@marty1885
Copy link
Member

I guess this issue is resolved. closing.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Problems with building
Projects
None yet
Development

No branches or pull requests

4 participants