mptest isn't built with make all
fanquake opened this issue · comments
Following the installation instructions in the README on a new Debian system. It seems that make all
doesn't build the mptest
executable, so the tests don't run.
If you build it with make mptest
and then run make test
everything works fine. Unsure if this a doc or CMake issue.
cmake ..
-- The CXX compiler identification is GNU 9.3.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
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'capnp'
-- Found capnp, version 0.7.0
-- Checking for module 'capnp-rpc'
-- Found capnp-rpc, version 0.7.0
-- Checking for module 'capnp-json'
-- Found capnp-json, version 0.7.0
-- Checking for module 'kj'
-- Found kj, version 0.7.0
-- Checking for module 'kj-async'
-- Found kj-async, version 0.7.0
-- Checking for module 'kj-http'
-- Found kj-http, version 0.7.0
-- Checking for module 'kj-test'
-- Found kj-test, version 0.7.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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
-- Looking for C++ include kj/filesystem.h
-- Looking for C++ include kj/filesystem.h - found
-- 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
-- Generating done
-- Build files have been written to: /libmultiprocess/build
root@3ddadd8ec436:/libmultiprocess/build# make
[ 14%] Compiling Cap'n Proto schema include/mp/proxy.capnp
Scanning dependencies of target multiprocess
[ 28%] Building CXX object CMakeFiles/multiprocess.dir/include/mp/proxy.capnp.c++.o
[ 42%] Building CXX object CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o
[ 57%] Building CXX object CMakeFiles/multiprocess.dir/src/mp/util.cpp.o
[ 71%] Linking CXX static library libmultiprocess.a
[ 71%] Built target multiprocess
Scanning dependencies of target mpgen
[ 85%] Building CXX object CMakeFiles/mpgen.dir/src/mp/gen.cpp.o
/libmultiprocess/src/mp/gen.cpp: In function 'void Generate(kj::StringPtr, kj::StringPtr, kj::StringPtr, kj::ArrayPtr<const kj::StringPtr>)':
/libmultiprocess/src/mp/gen.cpp:154:77: warning: 'capnp::ParsedSchema capnp::SchemaParser::parseDiskFile(kj::StringPtr, kj::StringPtr, kj::ArrayPtr<const kj::StringPtr>) const' is deprecated [-Wdeprecated-declarations]
154 | auto file_schema = parser.parseDiskFile(src_file, src_file, import_paths);
| ^
In file included from /libmultiprocess/src/mp/gen.cpp:9:
/usr/include/capnp/schema-parser.h:103:16: note: declared here
103 | ParsedSchema parseDiskFile(kj::StringPtr displayName, kj::StringPtr diskPath,
| ^~~~~~~~~~~~~
[100%] Linking CXX executable mpgen
[100%] Built target mpgen
root@3ddadd8ec436:/libmultiprocess/build# make all test
[ 71%] Built target multiprocess
[100%] Built target mpgen
Running tests...
Test project /libmultiprocess/build
Start 1: mptest
Could not find executable /libmultiprocess/build/mptest
Looked in the following places:
/libmultiprocess/build/mptest
/libmultiprocess/build/mptest
/libmultiprocess/build/Release/mptest
/libmultiprocess/build/Release/mptest
/libmultiprocess/build/Debug/mptest
/libmultiprocess/build/Debug/mptest
/libmultiprocess/build/MinSizeRel/mptest
/libmultiprocess/build/MinSizeRel/mptest
/libmultiprocess/build/RelWithDebInfo/mptest
/libmultiprocess/build/RelWithDebInfo/mptest
/libmultiprocess/build/Deployment/mptest
/libmultiprocess/build/Deployment/mptest
/libmultiprocess/build/Development/mptest
/libmultiprocess/build/Development/mptest
libmultiprocess/build/mptest
libmultiprocess/build/mptest
libmultiprocess/build/Release/mptest
libmultiprocess/build/Release/mptest
libmultiprocess/build/Debug/mptest
libmultiprocess/build/Debug/mptest
libmultiprocess/build/MinSizeRel/mptest
libmultiprocess/build/MinSizeRel/mptest
libmultiprocess/build/RelWithDebInfo/mptest
libmultiprocess/build/RelWithDebInfo/mptest
libmultiprocess/build/Deployment/mptest
libmultiprocess/build/Deployment/mptest
libmultiprocess/build/Development/mptest
libmultiprocess/build/Development/mptest
Unable to find executable: /libmultiprocess/build/mptest
1/1 Test #1: mptest ...........................***Not Run 0.00 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.00 sec
The following tests FAILED:
1 - mptest (Not Run)
Errors while running CTest
make: *** [Makefile:107: test] Error 8
Thanks for reporting. I guess this is technically a documentation bug, but there wasn't a convenient way to build and run all tests, so I added "make check" and "make tests" targets in #37
Thanks for testing #37. Just merged that, so the problem should be resolved. The test still won't be built with "make all" but the convention for cmake (as per "make help") seems to be that "make all" is identical to "make", and it wouldn't make sense to build tests for the default target