Build failing on various Linux platforms
make[1]: Entering directory '/usr/local/src/zcoin/src'
make[2]: Entering directory '/usr/local/src/zcoin/src'
CXXLD zcoind
tor/src/common/libor.a(compat.o): In function drop_capabilities':
compat.c:(.text+0xed): undefined reference to cap_get_proc'
compat.c:(.text+0x101): undefined reference to cap_clear'
compat.c:(.text+0x116): undefined reference to cap_set_flag'
compat.c:(.text+0x12e): undefined reference to cap_set_flag'
compat.c:(.text+0x149): undefined reference to cap_set_flag'
compat.c:(.text+0x151): undefined reference to cap_set_proc'
compat.c:(.text+0x15b): undefined reference to cap_free'
tor/src/common/libor.a(compat.o): In function have_capability_support':
compat.c:(.text+0x2685): undefined reference to cap_get_proc'
compat.c:(.text+0x2694): undefined reference to cap_free'
tor/src/common/libor.a(sandbox.o): In function sb_kill':
sandbox.c:(.text+0x1fe): undefined reference to seccomp_rule_add'
tor/src/common/libor.a(sandbox.o): In function sb_ioctl':
sandbox.c:(.text+0x271): undefined reference to seccomp_rule_add'
tor/src/common/libor.a(sandbox.o): In function sb_socketpair':
sandbox.c:(.text+0x31a): undefined reference to seccomp_rule_add'
tor/src/common/libor.a(sandbox.o): In function sb_stat64':
sandbox.c:(.text+0x3dc): undefined reference to seccomp_rule_add'
tor/src/common/libor.a(sandbox.o): In function sb_poll':
sandbox.c:(.text+0x4a7): undefined reference to seccomp_rule_add'
tor/src/common/libor.a(sandbox.o):sandbox.c:(.text+0x51e): more undefined references to seccomp_rule_add' follow
tor/src/common/libor.a(sandbox.o): In function sandbox_init':
sandbox.c:(.text+0x33ba): undefined reference to seccomp_init'
sandbox.c:(.text+0x3500): undefined reference to seccomp_release'
sandbox.c:(.text+0x35ce): undefined reference to seccomp_rule_add'
sandbox.c:(.text+0x3634): undefined reference to seccomp_rule_add'
sandbox.c:(.text+0x3712): undefined reference to seccomp_rule_add'
sandbox.c:(.text+0x37d7): undefined reference to seccomp_rule_add'
sandbox.c:(.text+0x38d3): undefined reference to seccomp_rule_add'
sandbox.c:(.text+0x392f): undefined reference to seccomp_load'
sandbox.c:(.text+0x394b): undefined reference to seccomp_release'
collect2: error: ld returned 1 exit status
Makefile:3243: recipe for target 'zcoind' failed
make[2]: *** [zcoind] Error 1
make[2]: Leaving directory '/usr/local/src/zcoin/src'
Makefile:7611: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/zcoin/src'
Makefile:688: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
git branch
- master
ii libseccomp-dev:amd64 2.3.1-2.1ubuntu2~16.04.1 amd64 high level interface to Linux seccomp filter (development files) ii libseccomp2:amd64 2.3.1-2.1ubuntu2~16.04.1 amd64 high level interface to Linux seccomp filter
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609
I had the same "undefined reference to cap_get_proc" error
Here is how i fixed that
from the main zcoin source folder
edit src/Makefile and change these lines as shown below
zcoind_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS)
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(zcoind_CXXFLAGS)
$(CXXFLAGS) -Wl,--no-as-needed -lcap $(zcoind_LDFLAGS) $(LDFLAGS) -o $@
Adding "-Wl,--no-as-needed -lcap" solved the issue and compiled fine
I cant find zcoind_LINK in the makefile, where in the file do i put it?
Follow the build instructions, when it fails edit the file and run make again
This didn't work sadly
Can you try build using the latest 0.13.5.8 client please
got the same error - Ubuntu 18.04
Making all in src
make[1]: Verzeichnis „/home/uter/src/zcoin/src“ wird betreten
make[2]: Verzeichnis „/home/uter/src/zcoin/src“ wird betreten
make[3]: Verzeichnis „/home/uter/src/zcoin/src/secp256k1“ wird betreten
make[3]: Verzeichnis „/home/uter/src/zcoin/src/secp256k1“ wird verlassen
CXXLD zcoind
tor/src/common/libor-crypto.a(crypto.o): In function `crypto_force_rand_ssleay':
crypto.c:(.text+0x1b6): undefined reference to `RAND_SSLeay'
tor/src/common/libor-crypto.a(crypto.o): In function `crypto_openssl_get_version_str':
crypto.c:(.text+0x90b): undefined reference to `SSLeay_version'
tor/src/common/libor-crypto.a(crypto.o): In function `crypto_early_init.part.28':
crypto.c:(.text+0x6a43): undefined reference to `ERR_load_crypto_strings'
crypto.c:(.text+0x6a48): undefined reference to `OPENSSL_add_all_algorithms_noconf'
crypto.c:(.text+0x6a4d): undefined reference to `CRYPTO_num_locks'
crypto.c:(.text+0x6aac): undefined reference to `CRYPTO_set_locking_callback'
crypto.c:(.text+0x6ab8): undefined reference to `CRYPTO_THREADID_set_callback'
crypto.c:(.text+0x6abd): undefined reference to `SSLeay'
crypto.c:(.text+0x6ac7): undefined reference to `SSLeay_version'
tor/src/common/libor-crypto.a(crypto.o): In function `crypto_global_init':
crypto.c:(.text+0x6db0): undefined reference to `ENGINE_get_default_ECDH'
crypto.c:(.text+0x6dc4): undefined reference to `ENGINE_get_default_ECDSA'
tor/src/common/libor-crypto.a(crypto.o): In function `crypto_global_cleanup':
crypto.c:(.text+0x6ff9): undefined reference to `EVP_cleanup'
crypto.c:(.text+0x7005): undefined reference to `ERR_free_strings'
crypto.c:(.text+0x703d): undefined reference to `ENGINE_cleanup'
crypto.c:(.text+0x704c): undefined reference to `CRYPTO_cleanup_all_ex_data'
tor/src/common/libor-crypto.a(crypto.o): In function `tor_set_openssl_thread_id':
crypto.c:(.text+0xf9): undefined reference to `CRYPTO_THREADID_set_numeric'
tor/src/common/libor-crypto.a(tortls.o): In function `tor_tls_classify_client_ciphers':
tortls.c:(.text+0x406): undefined reference to `sk_value'
tortls.c:(.text+0x467): undefined reference to `sk_num'
tortls.c:(.text+0x4dd): undefined reference to `SSLv23_method'
tortls.c:(.text+0x586): undefined reference to `sk_value'
tortls.c:(.text+0x5b7): undefined reference to `sk_num'
tortls.c:(.text+0x5eb): undefined reference to `sk_value'
tortls.c:(.text+0x606): undefined reference to `sk_num'
tor/src/common/libor-crypto.a(tortls.o): In function `tor_tls_server_info_callback':
tortls.c:(.text+0x80c): undefined reference to `SSL_state'
tor/src/common/libor-crypto.a(tortls.o): In function `tor_tls_init':
tortls.c:(.text+0x1309): undefined reference to `SSL_library_init'
tortls.c:(.text+0x130e): undefined reference to `SSL_load_error_strings'
tortls.c:(.text+0x1313): undefined reference to `SSLeay'
tortls.c:(.text+0x13f4): undefined reference to `SSL_get_ex_new_index'
tor/src/common/libor-crypto.a(tortls.o): In function `tor_tls_context_init_one':
tortls.c:(.text+0x1d0c): undefined reference to `SSLv23_method'
tor/src/common/libor-crypto.a(tortls.o): In function `tor_tls_handshake':
tortls.c:(.text+0x364c): undefined reference to `SSL_state'
tortls.c:(.text+0x367a): undefined reference to `SSL_state'
tor/src/common/libor-crypto.a(tortls.o): In function `tor_tls_verify':
tortls.c:(.text+0x3ce6): undefined reference to `sk_num'
tortls.c:(.text+0x3d07): undefined reference to `sk_value'
tor/src/common/libor-crypto.a(aes.o): In function `aes_cipher_free':
aes.c:(.text+0xde): undefined reference to `EVP_CIPHER_CTX_cleanup'
collect2: error: ld returned 1 exit status
Makefile:3246: recipe for target 'zcoind' failed
make[2]: *** [zcoind] Error 1
make[2]: Verzeichnis „/home/uter/src/zcoin/src“ wird verlassen
Makefile:7614: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Verzeichnis „/home/uter/src/zcoin/src“ wird verlassen
Makefile:688: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
---
if I try the suggested Way with Adding "-Wl,--no-as-needed -lcap" -> I will get the error lcap not found
Confirm failure on Archlinux
tor/src/common/libor-crypto.a(compress_zstd.o): In function `tor_zstd_get_version_str':
compress_zstd.c:(.text+0x55): undefined reference to `ZSTD_versionNumber'
tor/src/common/libor-crypto.a(compress_zstd.o): In function `tor_zstd_compress_new':
compress_zstd.c:(.text+0x1ab): undefined reference to `ZSTD_createCStream'
compress_zstd.c:(.text+0x1c2): undefined reference to `ZSTD_initCStream'
compress_zstd.c:(.text+0x1cd): undefined reference to `ZSTD_isError'
compress_zstd.c:(.text+0x232): undefined reference to `ZSTD_createDStream'
compress_zstd.c:(.text+0x246): undefined reference to `ZSTD_initDStream'
compress_zstd.c:(.text+0x251): undefined reference to `ZSTD_isError'
compress_zstd.c:(.text+0x25d): undefined reference to `ZSTD_getErrorName'
compress_zstd.c:(.text+0x287): undefined reference to `ZSTD_freeDStream'
compress_zstd.c:(.text+0x2ec): undefined reference to `ZSTD_getErrorName'
compress_zstd.c:(.text+0x316): undefined reference to `ZSTD_freeCStream'
tor/src/common/libor-crypto.a(compress_zstd.o): In function `tor_zstd_compress_process':
compress_zstd.c:(.text+0x47c): undefined reference to `ZSTD_isError'
compress_zstd.c:(.text+0x4bb): undefined reference to `ZSTD_endStream'
compress_zstd.c:(.text+0x4ea): undefined reference to `ZSTD_isError'
compress_zstd.c:(.text+0x543): undefined reference to `ZSTD_decompressStream'
compress_zstd.c:(.text+0x58c): undefined reference to `ZSTD_isError'
compress_zstd.c:(.text+0x5b9): undefined reference to `ZSTD_flushStream'
compress_zstd.c:(.text+0x5e1): undefined reference to `ZSTD_isError'
compress_zstd.c:(.text+0x609): undefined reference to `ZSTD_isError'
compress_zstd.c:(.text+0x653): undefined reference to `ZSTD_compressStream'
compress_zstd.c:(.text+0x66c): undefined reference to `ZSTD_getErrorName'
compress_zstd.c:(.text+0x764): undefined reference to `ZSTD_getErrorName'
compress_zstd.c:(.text+0x79c): undefined reference to `ZSTD_getErrorName'
tor/src/common/libor-crypto.a(compress_zstd.o): In function `tor_zstd_compress_free':
compress_zstd.c:(.text+0x828): undefined reference to `ZSTD_freeDStream'
compress_zstd.c:(.text+0x851): undefined reference to `ZSTD_freeCStream'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3246: zcoind] Error 1
@sn-ntu please review ASAP
Also stuck on this issue with 18.04. Still no solution? Edit: Just built this on Ubuntu 18.04, with OpenSSL1.1 and had no issues, despite having same issue as above with similar...
@josephnicholas Since you're looking into the automated builds, best if you take a look into this as well.
@dragononcrypto still reproducible?
Closing this since no response from current bug reporter.
Problem stills occurs with Manjaro Linux
/usr/bin/ld: tor/src/common/libor-crypto.a(compress_zstd.o): in function tor_zstd_get_version_str':
compress_zstd.c:(.text+0xe5): undefined reference to ZSTD_versionNumber'
/usr/bin/ld: tor/src/common/libor-crypto.a(compress_zstd.o): in function tor_zstd_can_use_static_apis':
compress_zstd.c:(.text+0x175): undefined reference to ZSTD_versionNumber'
/usr/bin/ld: tor/src/common/libor-crypto.a(compress_zstd.o): in function tor_zstd_compress_new':
compress_zstd.c:(.text+0x1ec): undefined reference to ZSTD_versionNumber'
/usr/bin/ld: compress_zstd.c:(.text+0x21b): undefined reference to ZSTD_createCStream'
/usr/bin/ld: compress_zstd.c:(.text+0x232): undefined reference to ZSTD_initCStream'
/usr/bin/ld: compress_zstd.c:(.text+0x23d): undefined reference to ZSTD_isError'
/usr/bin/ld: compress_zstd.c:(.text+0x28f): undefined reference to ZSTD_versionNumber'
/usr/bin/ld: compress_zstd.c:(.text+0x2a6): undefined reference to ZSTD_estimateCStreamSize'
/usr/bin/ld: compress_zstd.c:(.text+0x2c1): undefined reference to ZSTD_estimateDCtxSize'
/usr/bin/ld: compress_zstd.c:(.text+0x2ca): undefined reference to ZSTD_createDStream'
/usr/bin/ld: compress_zstd.c:(.text+0x2de): undefined reference to ZSTD_initDStream'
/usr/bin/ld: compress_zstd.c:(.text+0x2e9): undefined reference to ZSTD_isError'
/usr/bin/ld: compress_zstd.c:(.text+0x2f9): undefined reference to ZSTD_getErrorName'
/usr/bin/ld: compress_zstd.c:(.text+0x323): undefined reference to ZSTD_freeDStream'
/usr/bin/ld: compress_zstd.c:(.text+0x37c): undefined reference to ZSTD_getErrorName'
/usr/bin/ld: compress_zstd.c:(.text+0x3a6): undefined reference to ZSTD_freeCStream'
/usr/bin/ld: tor/src/common/libor-crypto.a(compress_zstd.o): in function tor_zstd_compress_process':
compress_zstd.c:(.text+0x51c): undefined reference to ZSTD_isError'
/usr/bin/ld: compress_zstd.c:(.text+0x5a3): undefined reference to ZSTD_decompressStream'
/usr/bin/ld: compress_zstd.c:(.text+0x5c1): undefined reference to ZSTD_isError'
/usr/bin/ld: compress_zstd.c:(.text+0x5f9): undefined reference to ZSTD_endStream'
/usr/bin/ld: compress_zstd.c:(.text+0x628): undefined reference to ZSTD_isError'
/usr/bin/ld: compress_zstd.c:(.text+0x65b): undefined reference to ZSTD_compressStream'
/usr/bin/ld: compress_zstd.c:(.text+0x6a1): undefined reference to ZSTD_flushStream'
/usr/bin/ld: compress_zstd.c:(.text+0x6c9): undefined reference to ZSTD_isError'
/usr/bin/ld: compress_zstd.c:(.text+0x6f5): undefined reference to ZSTD_isError'
/usr/bin/ld: compress_zstd.c:(.text+0x75c): undefined reference to ZSTD_getErrorName'
/usr/bin/ld: compress_zstd.c:(.text+0x804): undefined reference to ZSTD_getErrorName'
/usr/bin/ld: compress_zstd.c:(.text+0x83c): undefined reference to ZSTD_getErrorName'
/usr/bin/ld: tor/src/common/libor-crypto.a(compress_zstd.o): in function tor_zstd_compress_free_':
compress_zstd.c:(.text+0x8c4): undefined reference to ZSTD_freeDStream'
/usr/bin/ld: compress_zstd.c:(.text+0x8e9): undefined reference to ZSTD_freeCStream'
/usr/bin/ld: tor/src/common/libor-crypto.a(compress_zstd.o): in function tor_zstd_warn_if_version_mismatched':
compress_zstd.c:(.text+0xa17): undefined reference to ZSTD_versionNumber'
/usr/bin/ld: compress_zstd.c:(.text+0xa52): undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3639: zcoind] Error 1
make[2]: *** Waiting for unfinished jobs....
@aizensou that one will be fixed by #249. For the others, need to look at ./configure output to understand what is going on.