Closed xdemocle closed 6 years ago
I think you might not have built the dependencies first - are you building on linux? Can you try to run ./scripts/build.sh which should bootstrap all the deps including the right versions of boost and gtest
I tried, despite in documentation for ubuntu wasn't mentioned this extra passage. It went ahead for a while, until got stuck again at algebra and gtests things :((
# Create placeholder directories for installed dependencies. Some make settings (including the default) require actually running ./prepare-depends.sh to populate this directory. mkdir -p /home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/../lib /home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/../include touch /home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/../.exists g++ -o libsnark/gtests libsnark/algebra/curves/tests/test_bilinearity.o libsnark/algebra/curves/tests/test_groups.o libsnark/algebra/fields/tests/test_bigint.o libsnark/algebra/fields/tests/test_fields.o libsnark/gadgetlib1/gadgets/hashes/sha256/tests/test_sha256_gadget.o libsnark/gadgetlib1/gadgets/merkle_tree/tests/test_merkle_tree_gadgets.o libsnark/relations/arithmetic_programs/qap/tests/test_qap.o libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/tests/test_r1cs_ppzksnark.o libsnark/gtests.o libsnark.a -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-comment -Wfatal-errors -O2 -march=x86-64 -DMONTGOMERY_OUTPUT -DCURVE_ALT_BN128 -I/home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/../include -Ilibsnark -DNO_PROCPS -static -DSTATIC -DMULTICORE -fopenmp -L/home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/../lib -Wl,-rpath,/home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/../lib -lgtest -lpthread -lgmpxx -lgmp -lboost_program_options -lsodium /usr/lib/gcc/x86_64-linux-gnu/5/libgomp.a(target.o): In function
gomp_target_init':
(.text+0xba): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/../lib/libgtest.a(gtest-all.o): In function testing::internal::StreamingListener::SocketWriter::MakeConnection()': gtest-all.cc:(.text+0xe042): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libsnark/algebra/curves/tests/test_bilinearity.o: In function
_GLOBALsub_I_test_bilinearity.cpp':
test_bilinearity.cpp:(.text.startup+0x7f): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' libsnark/algebra/curves/tests/test_groups.o: In function
_GLOBALsub_I_test_groups.cpp':
test_groups.cpp:(.text.startup+0x7f): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' libsnark/algebra/fields/tests/test_bigint.o: In function
_GLOBAL__sub_I_test_bigint.cpp':
test_bigint.cpp:(.text.startup+0x7f): undefined reference to testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' collect2: error: ld returned 1 exit status Makefile:226: recipe for target 'libsnark/gtests' failed make[3]: *** [libsnark/gtests] Error 1 make[3]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/src/snark' Makefile:10874: recipe for target 'snark/libsnark.a' failed make[2]: *** [snark/libsnark.a] Error 2 make[2]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/src' Makefile:10366: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/src' Makefile:800: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1
Sorry, can't find a cleaner way to add my make logs
oh, try installing (on ubuntu) libgtest-dev and googletest thanks for this, we'll work on adding this as a packaged dependency
libgtest-dev is already the newest version (1.7.0-4ubuntu1).
instead for the second: E: Unable to locate package googletest
apparently googletest gets installed trough libgtest-dev
I tried also libgtest0 but no luck. No presense in ubuntu 16.04 repos
EDIT: trying this now https://askubuntu.com/a/145913/328001
I'll let you know soon if fails even with static library.
Thanks a lot for your support!
YEYYYY!!! Probably also these steps helps: https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
Additionally on Ubuntu 16.04 I had also issues with liboost before this gtest issue. Despite I followed the guide in doc/build.unix.md and installed previously all deps.
I had to set the var before launching my ./configure
BOOST_ROOT="/home/rocco/Downloads/boost_1_66_0" ./configure --with-incompatible-bdb --disable-wallet
It went well, until the next break :D Now a new one: /usr/bin/ld: cannot find -lrustzcash Wanna die!!! :D
I think you guys must give us an opportunity to really see this faster sync! :D Do you have any ETA for the ending of rebasing?
if you can get it to build you should be able to sync the full mainnet chain (please for testing only, don't rely on this in production yet)
hmmm i just checked again and gtest is packaged as a dependency, and lrustzcash definitely is
are you sure you are running ./scripts/build.sh which should setup your dependencies and pass the right prefix,host,build to configure so that the linker finds all of your locally built dependencies
for example, this is roughly what it runs for me:
$ HOST=x86_64-pc-linux-gnu
$ BUILD=x86_64-pc-linux-gnu
$ make -C ./depends/ V=1
$ ./autogen.sh
$ ./configure --disable-wallet --prefix=./depends/x86_64-pc-linux-gnu/ --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu '' --enable-hardening '' '' '' --enable-proton=no '' --enable-werror CXXFLAGS=-g
$ make -j8 V=1
Ok, I re-run all over from scratch. Run only the ./script/build.sh and finally everything went trough.
Now I have an error during install phase, sorry man:
make[2]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/man/man1' /usr/bin/install -c -m 644 bitcoind.1 bitcoin-qt.1 bitcoin-cli.1 bitcoin-tx.1 '/home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/share/man/man1' make[2]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/doc/man' make[1]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/doc/man' make[1]: Entering directory '/home/rocco/Downloads/BTCP-Rebase' make[2]: Entering directory '/home/rocco/Downloads/BTCP-Rebase' make install-exec-hook make[3]: Entering directory '/home/rocco/Downloads/BTCP-Rebase' mv /home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/bin/fetch-params.sh /home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/bin/zcash-fetch-params mv: cannot stat '/home/rocco/Downloads/BTCP-Rebase/depends/x86_64-pc-linux-gnu/bin/fetch-params.sh': No such file or directory Makefile:1383: recipe for target 'install-exec-hook' failed make[3]: *** [install-exec-hook] Error 1 make[3]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase' Makefile:1158: recipe for target 'install-exec-am' failed make[2]: *** [install-exec-am] Error 2 make[2]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase' Makefile:1104: recipe for target 'install-am' failed make[1]: *** [install-am] Error 2 make[1]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase' Makefile:800: recipe for target 'install-recursive' failed make: *** [install-recursive] Error 1
oh you shouldn't need to install just run the binaries out of your build directory like ./src/bitcoind -debug -noprinttoconsole
(it will use ~/.btcp as the default datadir but of course you can override with -datadir=
)
gosh, I removed all over again hahahah Ok, cross fingers. Thanks a lot for your patient and your help!
Ok compiled!! 👍
During compilation I receive the follow error: libsnark/algebra/curves/tests/test_bilinearity.cpp:13:25: fatal error: gtest/gtest.h: No such file or directory
A bit of more logs of my compilation:
crypto/equihash.cpp:234:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] At global scope: cc1plus: warning: unrecognized command line option ‘-Wno-builtin-declaration-mismatch’ CXX crypto/crypto_libbitcoin_crypto_a-hmac_sha256.o CXX crypto/crypto_libbitcoin_crypto_a-hmac_sha512.o CXX crypto/crypto_libbitcoin_crypto_a-ripemd160.o CXX crypto/crypto_libbitcoin_crypto_a-sha1.o CXX crypto/crypto_libbitcoin_crypto_a-sha256.o CXX crypto/crypto_libbitcoin_crypto_a-sha512.o CXX crypto/crypto_libbitcoin_crypto_a-sha256_sse4.o AR crypto/libbitcoin_crypto.a CXX zcash/libzcash_a-IncrementalMerkleTree.o CXX zcash/libzcash_a-NoteEncryption.o CXX zcash/libzcash_a-Address.o CXX zcash/libzcash_a-JoinSplit.o CXX zcash/libzcash_a-Proof.o CXX zcash/libzcash_a-Note.o CXX zcash/libzcash_a-prf.o CXX zcash/libzcash_a-util.o AR libzcash.a make[3]: Entering directory '/home/rocco/Downloads/BTCP-Rebase/src/snark' g++ -o libsnark/algebra/curves/tests/test_bilinearity.o libsnark/algebra/curves/tests/test_bilinearity.cpp -c -MMD -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-comment -Wfatal-errors -O2 -march=x86-64 -DMONTGOMERY_OUTPUT -DCURVE_ALT_BN128 -INONE/include -Ilibsnark -DNO_PROCPS -static -DSTATIC -DMULTICORE -fopenmp libsnark/algebra/curves/tests/test_bilinearity.cpp:13:25: fatal error: gtest/gtest.h: No such file or directory compilation terminated. Makefile:191: recipe for target 'libsnark/algebra/curves/tests/test_bilinearity.o' failed make[3]: *** [libsnark/algebra/curves/tests/test_bilinearity.o] Error 1 make[3]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/src/snark' Makefile:10874: recipe for target 'snark/libsnark.a' failed make[2]: *** [snark/libsnark.a] Error 2 make[2]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/src' Makefile:10366: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/rocco/Downloads/BTCP-Rebase/src' Makefile:800: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1