CREDITSCOM / node

Credits Node is the main module that provide an opportunity to run a node and participate in CREDITS blockchain network.
https://developers.credits.com/
GNU Affero General Public License v3.0
151 stars 16 forks source link

91% No rule to make target. Needed by 'client/client' #5

Closed tkoen93 closed 5 years ago

tkoen93 commented 5 years ago

Tried to build the node on Ubuntu 18.04.

At 45% I received the following message:

`[ 45%] Building CXX object cscrypto/CMakeFiles/cscrypto.dir/src/maincryptofunctions.cpp.o In file included from /home//csnode/node/cscrypto/include/cscrypto/memoryprotection.hpp:11:0, from /home//csnode/node/cscrypto/include/cscrypto/privatekey.hpp:5, from /home//csnode/node/cscrypto/include/cscrypto/maincryptofunctions.hpp:4, from /home//csnode/node/cscrypto/src/maincryptofunctions.cpp:1: /home/*/csnode/node/cscrypto/third-party/libsodium/src/libsodium/include/sodium.h:5:10: fatal error: sodium/version.h: No such file or directory

include "sodium/version.h"

      ^~~~~~~~~~~~~~~~~~

compilation terminated. `

I did find a file in the above mentioned folder named sodium.h.in. Renaming that file did not work and caused the following error:

[ 45%] Building CXX object cscrypto/CMakeFiles/cscrypto.dir/src/maincryptofunctions.cpp.o In file included from /home/*/csnode/node/cscrypto/third-party/libsodium/src/libsodium/include/sodium.h:5:0, from /home/*/csnode/node/cscrypto/include/cscrypto/memoryprotection.hpp:11, from /home/*/csnode/node/cscrypto/include/cscrypto/privatekey.hpp:5, from /home/*/csnode/node/cscrypto/include/cscrypto/maincryptofunctions.hpp:4, from /home/*/csnode/node/cscrypto/src/maincryptofunctions.cpp:1: /home/*/csnode/node/cscrypto/third-party/libsodium/src/libsodium/include/sodium/version.h:11:1: error: stray ‘@’ in program @SODIUM_LIBRARY_MINIMAL_DEF@ ^ /home/*/csnode/node/cscrypto/third-party/libsodium/src/libsodium/include/sodium/version.h:11:28: error: stray ‘@’ in program @SODIUM_LIBRARY_MINIMAL_DEF@ ^ /home/*/csnode/node/cscrypto/third-party/libsodium/src/libsodium/include/sodium/version.h:11:2: error: ‘SODIUM_LIBRARY_MINIMAL_DEF’ does not name a type; did you mean ‘SODIUM_LIBRARY_VERSION_MAJOR’? @SODIUM_LIBRARY_MINIMAL_DEF@ ^~~~~~~~~~~~~~~~~~~~~~~~~~ SODIUM_LIBRARY_VERSION_MAJOR cscrypto/CMakeFiles/cscrypto.dir/build.make:62: recipe for target 'cscrypto/CMakeFiles/cscrypto.dir/src/maincryptofunctions.cpp.o' failed

tkoen93 commented 5 years ago

Installed a new version of libsodium which solved this issue for me

tkoen93 commented 5 years ago

As I have still some other issue with libsodium at 91% of building the node I'll just add that over here:

[ 91%] Building CXX object client/CMakeFiles/client.dir/src/main.cpp.o make[2]: *** No rule to make target '../cscrypto/third-party/libsodium/Build/Release/x64/lib/libsodium.a', needed by 'client/client'. Stop. CMakeFiles/Makefile2:1306: recipe for target 'client/CMakeFiles/client.dir/all' failed make[1]: *** [client/CMakeFiles/client.dir/all] Error 2 Makefile:162: recipe for target 'all' failed make: *** [all] Error 2

tkoen93 commented 5 years ago

Noticed a change in the readme document today. Tried to build node again. Got until 98% this time.

[ 97%] Building CXX object tests/csnode/CMakeFiles/nodetests.dir/opackstream_tests.cpp.o [ 97%] Building CXX object tests/csnode/CMakeFiles/nodetests.dir/packetqueue_tests.cpp.o CMakeFiles/Makefile2:1393: recipe for target 'tests/lib_system/CMakeFiles/system.dir/all' failed make[1]: *** [tests/lib_system/CMakeFiles/system.dir/all] Error 2 [ 98%] Building CXX object tests/csnode/CMakeFiles/nodetests.dir/transactionspacket_tests.cpp.o make[2]: *** No rule to make target '../cscrypto/third-party/libsodium/Build/Release/x64/lib/libsodium.a', needed by 'tests/csnode/nodetests'. Stop. make[2]: *** Waiting for unfinished jobs.... [ 98%] Building CXX object tests/csnode/CMakeFiles/nodetests.dir/__/__/client/src/config.cpp.o CMakeFiles/Makefile2:1460: recipe for target 'tests/csnode/CMakeFiles/nodetests.dir/all' failed make[1]: *** [tests/csnode/CMakeFiles/nodetests.dir/all] Error 2 Makefile:162: recipe for target 'all' failed make: *** [all] Error 2

Basically same message about libsodium.a as I had earlier.

tkoen93 commented 5 years ago

Managed to build the node. Had to install autoconf and automake

sudo apt-get install autoconf automake