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

Building Thrill as a dependency fails #132

Closed
tim3z opened this issue Nov 23, 2016 · 1 comment
Closed

Building Thrill as a dependency fails #132

tim3z opened this issue Nov 23, 2016 · 1 comment

Comments

@tim3z
Copy link
Contributor

tim3z commented Nov 23, 2016

I was trying to build the examples from the tutorial but in it's own project with Thrill as a dependency. So I added Thrill as a git submodule in my lib folder and created a very simple CMakeLists.txt like this:

cmake_minimum_required (VERSION 2.6)
project (KMeans)
include_directories("lib/thrill")
add_subdirectory (lib/thrill)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG -std=c++14 -Wall -Wextra")
add_executable(KMeans k_means.cpp)
target_link_libraries(KMeans thrill)

When building the project I get an error:

[  5%] Built target s3
[  5%] Building CXX object lib/thrill/thrill/CMakeFiles/thrill.dir/vfs/s3_file.cpp.o
[...]/thrill_tut/lib/thrill/thrill/vfs/s3_file.cpp:18:19: fatal error: libs3.h: No such file or directory
compilation terminated.
lib/thrill/thrill/CMakeFiles/thrill.dir/build.make:1358: recipe for target 'lib/thrill/thrill/CMakeFiles/thrill.dir/vfs/s3_file.cpp.o' failed
make[2]: *** [lib/thrill/thrill/CMakeFiles/thrill.dir/vfs/s3_file.cpp.o] Error 1
CMakeFiles/Makefile2:1235: recipe for target 'lib/thrill/thrill/CMakeFiles/thrill.dir/all' failed
make[1]: *** [lib/thrill/thrill/CMakeFiles/thrill.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Maybe I'm missing something terribly stupid because I suck at CMake but in any case it would be great to have an example in the tutorial of how to build and include thrill as a lib.

@bingmann
Copy link
Member

Hmm, cmake is very "hacky". We havent put too much thought into how to use thrill as a library yet, but what you did looks right.
"[...]/thrill_tut/lib/thrill/thrill/vfs/s3_file.cpp:18:19: fatal error: libs3.h: No such file or directory"
This is probably just a simple include_directories() to libs3 which is messed up in our CMakeLists.txt
Maybe you can fix it and send a pull request.

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

No branches or pull requests

2 participants