0

I am building Monero from source on Ubunto 16.04 LTS.

Eventually, it gets to 98% but then gives an error. However, I am still able to run monerod. Can anyone elaborate as to what has happened?

(I have tried building on Ubunto 14.04 and 17.04 with failures at around 42% many times. This is the further I have got)

[ 98%] Linking CXX executable unit_tests /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libgtest.a(gtest-al
l.cc.o): relocation R_X86_64_32 against .rodata' can not be used when making a
shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libgtest.a: error adding symbols
: Bad value collect2: error: ld returned 1 exit status tests/unit_tests/CMakeFiles/unit_tests.dir/build.make:1205: recipe for target 't
ests/unit_tests/unit_tests' failed make[3]: * [tests/unit_tests/unit_tests] Error 1 make[3]: Leaving directory '/home/spencer/monero/build/release' CMakeFiles/Makefile2:4425: recipe for target 'tests/unit_tests/CMakeFiles/unit_t
ests.dir/all' failed make[2]:
[tests/unit_tests/CMakeFiles/unit_tests.dir/all] Error 2 make[2]: Leaving directory '/home/spencer/monero/build/release' Makefile:138: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/home/spencer/monero/build/release' Makefile:64: recipe for target 'release-all' failed make: * [release-all] Error 2

However, I can run monerod:

root@aleph3:~/monero/build/release/bin# ./monerod 2018-06-26 13:14:45.057 7f1c80523780 INFO global src/daemon/main. cpp:279 Monero 'Lithium Luna' (v0.12.2.0-release) 2018-06-26 13:14:45.058 7f1c80523780 INFO global src/daemon/proto col.h:53 Initializing cryptonote protocol... 2018-06-26 13:14:45.058 7f1c80523780 INFO global src/daemon/proto col.h:58 Cryptonote protocol initialized OK 2018-06-26 13:14:45.058 7f1c80523780 INFO global src/daemon/p2p.h :63 Initializing p2p server... 2018-06-26 13:14:50.939
7f1c80523780 INFO global src/daemon/p2p.h
:68 p2p server initialized OK 2018-06-26 13:14:50.939
7f1c80523780 INFO global src/daemon/rpc.h
:63 Initializing core RPC server... 2018-06-26 13:14:50.939
7f1c80523780 INFO global contrib/epee/inc
lude/net/http_server_impl_base.h:76 Binding on 127.0.0.1:18081 2018-06-26 13:14:50.939 7f1c80523780 INFO global src/daemon/rpc.h
:69 core RPC server initialized OK on port: 18081 2018-06-26 13:14:50.939 7f1c80523780 INFO global src/daemon/core. h:86 Initializing core... 2018-06-26 13:14:50.940 7f1c80523780 INFO global src/cryptonote_c
ore/cryptonote_core.cpp:427 Loading blockchain from folder /home/spencer/.bi
tmonero/lmdb ... 2018-06-26 13:14:50.940 7f1c80523780 WARN blockchain.db.lmdb s
rc/blockchain_db/lmdb/db_lmdb.cpp:75 Error attempting to retrieve a hard fork
version at height 0 from the db: MDB_NOTFOUND: No matching key/data pair found 2018-06-26 13:14:51.014 7f1c80523780 INFO
global src/cryptonote_c
ore/cryptonote_core.cpp:526 Loading checkpoints 2018-06-26 13:14:51.444 7f1c80523780 INFO global src/daemon/core. h:92 Core initialized OK 2018-06-26 13:14:51.444 7f1c80523780
INFO global src/daemon/rpc.h
:74 Starting core RPC server... 2018-06-26 13:14:51.444 [SRV_MAIN] INFO global src/daemon/rpc.h:79 c
ore RPC server started ok 2018-06-26 13:14:51.448 [SRV_MAIN] INFO global src/daemon/p2p.h:78 S
tarting p2p net loop... 2018-06-26 13:14:52.449 [P2P2] INFO global src/cryptonote_core/cryptonote_c
ore.cpp:1354 ********************************************************************** The daemon will start synchronizing with the network. This may take a long time
to complete.

You can set the level of process detailization through "set_log s>" command, where is between 0 (no details) and 4 (very verbose), or custom category
based levels (eg, *:WARNING).

Use the "help" command to see the list of available commands. Use "help " to see a command's documentation.


2018-06-26 13:15:04.364 [P2P1] INFO global src/cryptonote_protocol/cryptono
te_protocol_handler.inl:310 [51.15.179.106:18080 OUT] Sync data returned a n
ew top block candidate: 1 -> 1584467 [Your node is 1584466 blocks (1499 days) be
hind] SYNCHRONIZATION started ...

1
  • Could you please provide the environment you are trying to compile?
    – user9532
    Commented Dec 14, 2018 at 6:36

1 Answer 1

2

The simple answer is that make will build a whole bunch of stuff (i.e., monerod, monero-wallet-cli, monero-wallet-gui, monero-blockchain-import, etc., along with all the files it compiles as precursors to those binaries). At the end of the build process, it builds tests. Your error comes at the stage of the build process where all the main binaries have already successfully been compiled, and it's the building of the tests that has failed.

Your error reflects that you have libgtest on your system, but it wasn't compiled with the -fPIC flag. You can either recompile with -fPIC, or see this SE question/answer for other possible solutions (e.g., uninstall libgtest).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.