Ubuntu install fails
Sjors opened this issue · comments
On Ubuntu 18.04 with cmake version 3.10.2, capnproto (0.6.1), libcapnp-dev (0.6.1):
cmake ..
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.65.1
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Performing Test HAVE_PTHREAD_GETNAME_NP
-- Performing Test HAVE_PTHREAD_GETNAME_NP - Success
-- Performing Test HAVE_PTHREAD_THREADID_NP
-- Performing Test HAVE_PTHREAD_THREADID_NP - Failed
-- Performing Test HAVE_PTHREAD_GETTHREADID_NP
-- Performing Test HAVE_PTHREAD_GETTHREADID_NP - Failed
-- Configuring done
CMake Error at CMakeLists.txt:73 (add_executable):
Target "mpgen" links to target "CapnProto::capnp-rpc" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at CMakeLists.txt:105 (add_executable):
Target "mptest" links to target "CapnProto::capnp-rpc" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at CMakeLists.txt:105 (add_executable):
Target "mptest" links to target "CapnProto::kj-test" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
-- Generating done
-- Build files have been written to: /home/dev/libmultiprocess/build
Looks like cmake
can't find libcapnp-dev.
~/libmultiprocess/build$ make
[ 14%] Compiling Cap'n Proto schema include/mp/proxy.capnp
Scanning dependencies of target multiprocess
[ 14%] Compiling Cap'n Proto schema include/mp/proxy.capnp
[ 28%] Building CXX object CMakeFiles/multiprocess.dir/include/mp/proxy.capnp.c++.o
c++: error: /home/dev/libmultiprocess/include/mp/proxy.capnp.c++: No such file or directory
c++: fatal error: no input files
compilation terminated.
CMakeFiles/multiprocess.dir/build.make:69: recipe for target 'CMakeFiles/multiprocess.dir/include/mp/proxy.capnp.c++.o' failed
make[2]: *** [CMakeFiles/multiprocess.dir/include/mp/proxy.capnp.c++.o] Error 1
CMakeFiles/Makefile2:355: recipe for target 'CMakeFiles/multiprocess.dir/all' failed
make[1]: *** [CMakeFiles/multiprocess.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
I can reproduce this. I thought it was still working but I actually had a non-system capnp 0.7.0 installed on my PATH, and cmake was using that to find lib/cmake/CapnProto/CapnProtoConfig.cmake
and from there import the tools and libraries.
This was working at some point, but I probably have caused this issue and #26 while working on bitcoin depends support bitcoin/bitcoin#16367
I think all the c++ code should still be compatible with ubuntu's capnproto 0.6.1, but the build stuff seems pretty broken. Will try to figure it out this week
I don't mind if the instructions recommend installing capnp 0.7.0 either.
I don't mind if the instructions recommend installing capnp 0.7.0 either.
It probably is better to avoid being too tied to a particular capnp version. I made a pull request #28 which fixes the problem for me and adds more compatibility. Will extend it as needed to fix the two mac build issues #26 and bitcoin/bitcoin#16367 (comment) and merge it after merging @vasild's open pull requests