moneroexamples / compile-cpp-ethereum-on-arch

Compile cpp-ethereum on Arch Linux
5 stars 2 forks source link

No rule to make target '../deps/lib/libmpir.a', needed by 'eth/eth'. [Makefile:141: all] Error 2 #1

Closed Payden-Pringle closed 7 years ago

Payden-Pringle commented 7 years ago

System Specs:

Kernel: 4.11.4-1-ARCH Latest version of cpp-ethereum cloned from Git.

What I expected to happen.

Successfully make the build.

What happened.

Error at 73% during the CXX build process.

Backtrace

~git clone --recursive https://github.com/ethereum/cpp-ethereum.git
~cd cpp-ethereum
~mkdir -p build && cd build
~cmake .. -DCMAKE_INSTALL_PREFIX=/opt/eth
-- The C compiler identification is GNU 7.1.1
-- The CXX compiler identification is GNU 7.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- 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 mhd: /usr/lib/libmicrohttpd.so

------------------------------------------------------------------------
-- Configuring cpp-ethereum
------------------------------------------------------------------------
-- CMake 3.8.2 (/usr/bin/cmake)
-- CMAKE_BUILD_TYPE Build type
-- TARGET_PLATFORM  Target platform                          Linux
-- BUILD_SHARED_LIBS                                         OFF

-- Found leveldb: /usr/lib/libleveldb.so
-- Cpuid headers: CPUID_INCLUDE_DIR-NOTFOUND
-- Cpuid lib   : CPUID_LIBRARY-NOTFOUND
-- Could NOT find miniupnpc (missing:  MINIUPNPC_LIBRARY MINIUPNPC_INCLUDE_DIR)
-- miniupnpc headers: MINIUPNPC_INCLUDE_DIR-NOTFOUND
-- miniupnpc lib   : MINIUPNPC_LIBRARY-NOTFOUND
-- test: ClientBase |  --eth_testfile=BlockTests/bcJS_API_Test --eth_threads=1; --eth_testfile=BlockTests/bcJS_API_Test --eth_threads=3; --eth_testfile=BlockTests/bcJS_API_Test --eth_threads=10; --eth_testfile=BlockTests/bcValidBlockTest --eth_threads=1; --eth_testfile=BlockTests/bcValidBlockTest --eth_threads=3; --eth_testfile=BlockTests/bcValidBlockTest --eth_threads=10
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/cpp-ethereum/build
~make
Scanning dependencies of target mpir
[  0%] Creating directories for 'mpir'
[  1%] Performing download step (download, verify and extract) for 'mpir'
-- Downloading...
   dst='/opt/cpp-ethereum/deps/src/mpir-cmake.tar.gz'
   timeout='none'
....
.... # lots of stuff happens here that doesn't seem like it is wrong
....
[ 92%] Building CXX object src/CMakeFiles/ff.dir/common/profiling.cpp.o
/opt/cpp-ethereum/deps/src/snark/src/common/profiling.cpp: In function 'void libff::print_mem(const string&)':
/opt/cpp-ethereum/deps/src/snark/src/common/profiling.cpp:332:35: warning: unused parameter 's' [-Wunused-parameter]
 void print_mem(const std::string &s)
... # It's the &s it points at with a ^
[ 96%] Building CXX object src/CMakeFiles/ff.dir/common/utils.cpp.o
[100%] Linking CXX static library libff.a
... # More C Objects are built that succeed fine here
[ 21%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpccommonStatic.dir/common/specificationparser.cpp.o
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/common/specificationparser.cpp:10:0:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/common/specificationparser.h:21:97: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 :vector<Procedure> GetProceduresFromFile(const std::string& filename)    throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/common/specificationparser.h:22:97: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 :vector<Procedure> GetProceduresFromString(const std::string& spec)      throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/common/specificationparser.cpp:18:90: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecate ]
 >   SpecificationParser::GetProceduresFromFile  (const string &filename) throw(JsonRpcException)
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/common/specificationparser.cpp:24:89: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecate ]
 e>   SpecificationParser::GetProceduresFromString(const string &content) throw(JsonRpcException)
                                                                          ^~~~~
[ 26%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpccommonStatic.dir/common/specificationwriter.cpp.o
... # More C Objects built fine here.
[ 31%] Linking CXX static library ../../lib/libjsonrpccpp-common.a
[ 31%] Built target jsonrpccommonStatic
Scanning dependencies of target jsonrpcclientStatic
[ 36%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcclientStatic.dir/client/batchcall.cpp.o
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:13:0,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:16,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/batchcall.cpp:11:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/iclientconnector.h:23:90  warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 ual void SendRPCMessage(const std::string& message, std::string& result) throw(JsonRpcException) = 0;
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:16:0,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/batchcall.cpp:11:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:33:122: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 st std::string &name, const Json::Value &parameter, Json::Value& result) throw (JsonRpcException);
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:16:0,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/batchcall.cpp:11:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:34:101: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 lMethod          (const std::string &name, const Json::Value &parameter) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:36:98: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    CallProcedures      (const BatchCall &calls, BatchResponse &response) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:37:73: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             BatchResponse  CallProcedures      (const BatchCall &calls) throw (JsonRpcException);
                                                                         ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:39:101: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 lNotification    (const std::string& name, const Json::Value& parameter) throw (JsonRpcException);
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/batchcall.cpp:11:0:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:53:83: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    void HandleResponse(const std::string &response, Json::Value &result) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:61:90: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 ::Value HandleResponse(const Json::Value &response, Json::Value &result) throw (JsonRpcException);
                                                                          ^~~~~
[ 42%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcclientStatic.dir/client/batchresponse.cpp.o
[ 47%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcclientStatic.dir/client/client.cpp.o
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:13:0,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:10:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/iclientconnector.h:23:90  warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 ual void SendRPCMessage(const std::string& message, std::string& result) throw(JsonRpcException) = 0;
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:10:0:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:33:122: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 st std::string &name, const Json::Value &parameter, Json::Value& result) throw (JsonRpcException);
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:10:0:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:34:101: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 lMethod          (const std::string &name, const Json::Value &parameter) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:36:98: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    CallProcedures      (const BatchCall &calls, BatchResponse &response) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:37:73: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             BatchResponse  CallProcedures      (const BatchCall &calls) throw (JsonRpcException);
                                                                         ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:39:101: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 lNotification    (const std::string& name, const Json::Value& parameter) throw (JsonRpcException);
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:11:0:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:53:83: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    void HandleResponse(const std::string &response, Json::Value &result) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:61:90: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 ::Value HandleResponse(const Json::Value &response, Json::Value &result) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:26:101: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 st std::string &name, const Json::Value &parameter, Json::Value& result) throw(JsonRpcException)
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:34:76: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 id Client::CallProcedures(const BatchCall &calls, BatchResponse &result) throw(JsonRpcException)
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:67:62: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 BatchResponse Client::CallProcedures(const BatchCall &calls) throw(JsonRpcException)
                                                              ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:74:87: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 lient::CallMethod(const std::string& name, const Json::Value& parameter) throw(JsonRpcException)
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.cpp:81:86: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 :CallNotification(const std::string& name, const Json::Value& parameter) throw(JsonRpcException)
                                                                          ^~~~~
[ 52%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcclientStatic.dir/client/rpcprotocolclient.cpp.o
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:13:0,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:16,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.cpp:10:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/iclientconnector.h:23:90  warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 ual void SendRPCMessage(const std::string& message, std::string& result) throw(JsonRpcException) = 0;
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:16:0,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.cpp:10:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:33:122: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 st std::string &name, const Json::Value &parameter, Json::Value& result) throw (JsonRpcException);
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:16:0,
                 from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.cpp:10:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:34:101: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 lMethod          (const std::string &name, const Json::Value &parameter) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:36:98: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    CallProcedures      (const BatchCall &calls, BatchResponse &response) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:37:73: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             BatchResponse  CallProcedures      (const BatchCall &calls) throw (JsonRpcException);
                                                                         ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/client.h:39:101: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 lNotification    (const std::string& name, const Json::Value& parameter) throw (JsonRpcException);
                                                                          ^~~~~
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.cpp:10:0:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:53:83: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    void HandleResponse(const std::string &response, Json::Value &result) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.h:61:90: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 ::Value HandleResponse(const Json::Value &response, Json::Value &result) throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.cpp:39:90: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 Client::HandleResponse(const std::string &response, Json::Value& result) throw(JsonRpcException)
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/client/rpcprotocolclient.cpp:53:94: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 colClient::HandleResponse(const Json::Value &value, Json::Value &result) throw(JsonRpcException)
                                                                          ^~~~~
[ 57%] Linking CXX static library ../../lib/libjsonrpccpp-client.a
[ 57%] Built target jsonrpcclientStatic
Scanning dependencies of target jsonrpcserverStatic
[ 63%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcserverStatic.dir/server/abstractprotocolhandler.cpp.o
[ 68%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcserverStatic.dir/server/abstractserverconnector.cpp.o
[ 73%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcserverStatic.dir/server/requesthandlerfactory.cpp.o
[ 78%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcserverStatic.dir/server/rpcprotocolserver12.cpp.o
[ 84%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcserverStatic.dir/server/rpcprotocolserverv1.cpp.o
[ 89%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcserverStatic.dir/server/rpcprotocolserverv2.cpp.o
[ 94%] Building CXX object src/jsonrpccpp/CMakeFiles/jsonrpcserverStatic.dir/server/connectors/httpserver.cpp.o
In file included from /opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/server/connectors/httpserver.cpp:14:0:
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/../jsonrpccpp/common/specificationparser.h:21:97: warning: dynamic exception specifications are deprecated in C++11  -Wdeprecated]
 :vector<Procedure> GetProceduresFromFile(const std::string& filename)    throw (JsonRpcException);
                                                                          ^~~~~
/opt/cpp-ethereum/deps/src/jsonrpccpp/src/jsonrpccpp/../jsonrpccpp/common/specificationparser.h:22:97: warning: dynamic exception specifications are deprecated in C++11  -Wdeprecated]
 :vector<Procedure> GetProceduresFromString(const std::string& spec)      throw (JsonRpcException);
                                                                          ^~~~~
[100%] Linking CXX static library ../../lib/libjsonrpccpp-server.a
[100%] Built target jsonrpcserverStatic
[ 19%] Performing install step for 'jsonrpccpp'
-- jsonrpccpp install command succeeded.  See also /opt/cpp-ethereum/deps/src/jsonrpccpp-stamp/jsonrpccpp-install-*.log
[ 19%] Completed 'jsonrpccpp'
[ 19%] Built target jsonrpccpp
Scanning dependencies of target scrypt
[ 20%] Building C object utils/libscrypt/CMakeFiles/scrypt.dir/b64.c.o
... # More CXX Objects built fine here.
[ 73%] Building CXX object eth/CMakeFiles/eth.dir/main.cpp.o
make[2]: *** No rule to make target '../deps/lib/libmpir.a', needed by 'eth/eth'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:402: eth/CMakeFiles/eth.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

That is where the make stops.

moneroexamples commented 7 years ago

I have the same issue now. The problem is that libmpir.a is in deps/lib64 rather than in deps/lib. So the compilation blows up as its looking for libmpir.a in wrong folder.

I will be making issues on cpp-ethereum about this shortly. In the meantime, have to manually fix it:

edit file ~/cpp-ethereum/cmake/ProjectMPIR.cmake

and change:

set(MPIR_LIBRARY ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}mpir${CMAKE_STATIC_LIBRARY_SUFFIX})

into

set(MPIR_LIBRARY ${INSTALL_DIR}/lib64/${CMAKE_STATIC_LIBRARY_PREFIX}mpir${CMAKE_STATIC_LIBRARY_SUFFIX})

and re-compile.

Hope this helps.

moneroexamples commented 7 years ago

Fixed in cpp-ethereum: https://github.com/ethereum/cpp-ethereum/pull/4173

Closing.