B
B
blueberries20162018-11-28 18:29:45
C++ / C#
blueberries2016, 2018-11-28 18:29:45

Why does code compilation fail?

Trying to compile code ( https://github.com/Veronite/veronite) on Ubuntu Server 16.04. (I know that there is already built in the same repository, but there is not the fix that is in the sources). I install all the programs from the list and run the compilation with make. At the very beginning, some errors appear among the check of all modules:

-- Could not find DEVELOPER_LOCAL_TOOLS in env (not required)
-- Could not find DEVELOPER_LIBUNBOUND_OLD in env (not required)
-- Could not find DATABASE in env (not required unless you want to change database type from default: lmdb)
-- Checking for module 'libpcsclite'
--   No package 'libpcsclite' found
-- Could NOT find PCSC (missing:  PCSC_LIBRARY PCSC_INCLUDE_DIR) 
-- Could NOT find MiniUPnPc (missing:  MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY) 
-- Could NOT find Readline (missing:  Readline_INCLUDE_DIR Readline_LIBRARY) 
-- Could not find GNU readline library so building without readline support
-- Found Git: /usr/bin/git
-- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
-- GTest not found on the system: will use GTest bundled with this source
Doxygen: graphviz not found - graphs disabled
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)

Although most of these packages are installed, for some reason they are not detected.
Next, the compilation process takes place up to 40%, and then an error occurs, which ends the compilation:
/root/veronite/src/rpc/zmq_server.cpp: In member function ‘bool cryptonote::rpc::ZmqServer::addTCPSocket(std::__cxx11::string, std::__cxx11::string)’:
/root/veronite/src/rpc/zmq_server.cpp:105:69: error: no matching function for call to ‘zmq::socket_t::setsockopt(int, const int&)’
     rep_socket->setsockopt(ZMQ_RCVTIMEO, DEFAULT_RPC_RECV_TIMEOUT_MS);
                                                                     ^
In file included from /root/veronite/src/rpc/zmq_server.h:32:0,
                 from /root/veronite/src/rpc/zmq_server.cpp:29:
/usr/include/zmq.hpp:289:21: note: candidate: void zmq::socket_t::setsockopt(int, const void*, size_t)
         inline void setsockopt (int option_, const void *optval_,
                     ^
/usr/include/zmq.hpp:289:21: note:   candidate expects 3 arguments, 2 provided
src/rpc/CMakeFiles/obj_daemon_rpc_server.dir/build.make:86: recipe for target 'src/rpc/CMakeFiles/obj_daemon_rpc_server.dir/zmq_server.cpp.o' failed
make[3]: *** [src/rpc/CMakeFiles/obj_daemon_rpc_server.dir/zmq_server.cpp.o] Error 1
make[3]: Leaving directory '/root/veronite/build/release'
CMakeFiles/Makefile2:1801: recipe for target 'src/rpc/CMakeFiles/obj_daemon_rpc_server.dir/all' failed
make[2]: *** [src/rpc/CMakeFiles/obj_daemon_rpc_server.dir/all] Error 2
make[2]: Leaving directory '/root/veronite/build/release'
Makefile:138: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/veronite/build/release'
Makefile:64: recipe for target 'release-all' failed
make: *** [release-all] Error 2

Since this project has a release, it means that the code can be compiled, but how? What's going wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-11-28
@jcmvbkbc

Although most of these packages are installed, for some reason they are not detected.

In order for them to be detected, the appropriate -dev packages must be installed (i.e., for libpcsclite to be detected, libpcsclite-dev must be installed, for example).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question