Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with 5.3.2: invalid type annotation for blockinfo iterator #6306

Closed
kpcyrd opened this issue Dec 16, 2022 · 3 comments · Fixed by #6314
Closed

Build error with 5.3.2: invalid type annotation for blockinfo iterator #6306

kpcyrd opened this issue Dec 16, 2022 · 3 comments · Fixed by #6314
Labels
A-build Area: Build system C-bug Category: This is a bug
Milestone

Comments

@kpcyrd
Copy link
Contributor

kpcyrd commented Dec 16, 2022

I've noticed a build failure with the 5.3.2 release:

txdb.cpp:394:58: error: no viable conversion from '__normal_iterator<std::vector<CBlockIndex *>::const_pointer, vector<CBlockIndex *, allocator<CBlockIndex *>>>' to '__normal_iterator<std::vector<const CBlockIndex *>::const_pointer, vector<const CBlockIndex *, allocator<const CBlockIndex *>>>'
    for (std::vector<const CBlockIndex*>::const_iterator it=blockinfo.begin(); it != blockinfo.end(); it++) {
                                                         ^  ~~~~~~~~~~~~~~~~~

Full build log


Build Options:
  with ecmult precomp     = yes
  with external callbacks = no
  with benchmarks         = no
  with tests              = yes
  with openssl tests      = no
  with coverage           = no
  module ecdh             = no
  module recovery         = yes
  module extrakeys        = no
  module schnorrsig       = no

  asm                     = x86_64
  ecmult window size      = 15
  ecmult gen prec. bits   = 4

  valgrind                = no
  CC                      = /usr/bin/clang
  CFLAGS                  = -O2 -fvisibility=hidden -Wconditional-uninitialized -std=c99 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection
  CPPFLAGS                =   -I/usr/include/utf8cpp
  LDFLAGS                 = -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

  CC_FOR_BUILD            = /usr/bin/clang
  CFLAGS_FOR_BUILD        = -O2 -fvisibility=hidden -Wconditional-uninitialized -std=c99 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection
  CPPFLAGS_FOR_BUILD      =   -I/usr/include/utf8cpp
  LDFLAGS_FOR_BUILD       = -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
=== configuring in src/univalue (/build/zcash/src/zcash/src/univalue)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr'  '--enable-online-rust' 'CXX=/usr/bin/clang++' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' 'CPPFLAGS= -I/usr/include/utf8cpp' 'CC=/usr/bin/clang' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection' '--disable-shared' '--with-pic' '--enable-benchmark=no' '--enable-module-recovery' '--disable-openssl-tests' --cache-file=/dev/null --srcdir=.
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... /usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /usr/bin/clang accepts -g... yes
checking for /usr/bin/clang option to enable C11 features... none needed
checking whether /usr/bin/clang understands -c and -o together... yes
checking dependency style of /usr/bin/clang... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /usr/bin/clang... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from /usr/bin/clang object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/bin/clang supports -fno-rtti -fno-exceptions... yes
checking for /usr/bin/clang option to produce PIC... -fPIC -DPIC
checking if /usr/bin/clang PIC flag -fPIC -DPIC works... yes
checking if /usr/bin/clang static flag -static works... yes
checking if /usr/bin/clang supports -c -o file.o... yes
checking if /usr/bin/clang supports -c -o file.o... (cached) yes
checking whether the /usr/bin/clang linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether the compiler supports GNU C++... yes
checking whether /usr/bin/clang++ accepts -g... yes
checking for /usr/bin/clang++ option to enable C++11 features... none needed
checking dependency style of /usr/bin/clang++... gcc3
checking how to run the C++ preprocessor... /usr/bin/clang++ -E
checking for ld used by /usr/bin/clang++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the /usr/bin/clang++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for /usr/bin/clang++ option to produce PIC... -fPIC -DPIC
checking if /usr/bin/clang++ PIC flag -fPIC -DPIC works... yes
checking if /usr/bin/clang++ static flag -static works... yes
checking if /usr/bin/clang++ supports -c -o file.o... yes
checking if /usr/bin/clang++ supports -c -o file.o... (cached) yes
checking whether the /usr/bin/clang++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pc/libunivalue.pc
config.status: creating pc/libunivalue-uninstalled.pc
config.status: creating univalue-config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Fixing libtool for -rpath problems.

Options used to compile and link:
  with wallet   = yes
  with zmq      = yes
  with test     = yes
  use asm       = yes
  sanitizers    = 
  debug enabled = no
  gprof enabled = no
  werror        = no

  target os     = linux
  build os      = 

  CC            = /usr/bin/clang
  CFLAGS        = -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection
  CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -I/usr/include/utf8cpp -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
  CXX           = /usr/bin/clang++ -std=c++17
  CXXFLAGS      =  -g  -Wformat -Wformat-security -Wstack-protector -fstack-protector-all -Wthread-safety-analysis   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -fwrapv -fno-strict-aliasing
  LDFLAGS       = -pthread  -Wl,-z,relro -Wl,-z,now -pie  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
  ARFLAGS       = cr

Making all in src
make[1]: Entering directory '/build/zcash/src/zcash/src'
  GEN      rust/gen/include/rust/blake2b.h
  GEN      rust/gen/include/rust/bundlecache.h
  GEN      rust/gen/include/rust/sapling.h
  GEN      rust/gen/include/rust/equihash.h
  GEN      rust/gen/include/rust/orchard_bundle.h
  GEN      rust/gen/include/rust/wallet_scanner.h
make  all-recursive
make[2]: Entering directory '/build/zcash/src/zcash/src'
make[3]: Entering directory '/build/zcash/src/zcash/src'
  CXX      libbitcoin_server_a-addrman.o
  CXX      libbitcoin_server_a-sendalert.o
  CXX      zcashd-bitcoind.o
  CXX      libbitcoin_server_a-asyncrpcqueue.o
  CXX      libbitcoin_server_a-addrdb.o
  CXX      libbitcoin_server_a-alert.o
  CXX      libbitcoin_server_a-asyncrpcoperation.o
  CXX      libbitcoin_server_a-experimental_features.o
  CXX      libbitcoin_server_a-bloom.o
  CXX      libbitcoin_server_a-chain.o
  CXX      libbitcoin_server_a-deprecation.o
  CXX      libbitcoin_server_a-checkpoints.o
  CXX      libbitcoin_server_a-httprpc.o
  CXX      libbitcoin_server_a-httpserver.o
  CXX      libbitcoin_server_a-init.o
  CXX      libbitcoin_server_a-dbwrapper.o
  CXX      libbitcoin_server_a-main.o
  CXX      libbitcoin_server_a-merkleblock.o
  CXX      libbitcoin_server_a-metrics.o
  CXX      libbitcoin_server_a-miner.o
  CXX      libbitcoin_server_a-net.o
  CXX      libbitcoin_server_a-noui.o
  CXX      libbitcoin_server_a-pow.o
  CXX      libbitcoin_server_a-rest.o
  CXX      libbitcoin_server_a-txdb.o
  CXX      libbitcoin_server_a-timedata.o
  CXX      libbitcoin_server_a-torcontrol.o
  CXX      libbitcoin_server_a-txmempool.o
  CXX      libbitcoin_server_a-mempool_limit.o
  CXX      libbitcoin_server_a-validationinterface.o
  CXX      libbitcoin_wallet_a-zcbenchmarks.o
  CXX      libbitcoin_common_a-arith_uint256.o
  CXX      libbitcoin_common_a-amount.o
  CXX      libbitcoin_common_a-coins.o
  CXX      libbitcoin_common_a-chainparams.o
  CXX      libbitcoin_common_a-bech32.o
  CXX      libbitcoin_common_a-base58.o
  CXX      libbitcoin_common_a-compressor.o
  CXX      libbitcoin_common_a-core_read.o
  CXX      libbitcoin_common_a-core_write.o
  CXX      libbitcoin_common_a-key_io.o
  CXX      libbitcoin_common_a-hash.o
  CXX      libbitcoin_common_a-key.o
  CXX      libbitcoin_common_a-netbase.o
  CXX      libbitcoin_common_a-keystore.o
  CXX      libbitcoin_common_a-protocol.o
  CXX      libbitcoin_common_a-proof_verifier.o
  CXX      libbitcoin_common_a-pubkey.o
  CXX      script/libbitcoin_common_a-script_error.o
  CXX      libbitcoin_common_a-scheduler.o
  CXX      libbitcoin_common_a-transaction_builder.o
  CXX      script/libbitcoin_common_a-interpreter.o
  CXX      script/libbitcoin_common_a-script.o
  CXX      libbitcoin_common_a-warnings.o
  CXX      script/libbitcoin_common_a-standard.o
  CXX      script/libbitcoin_common_a-sign.o
make[4]: Entering directory '/build/zcash/src/zcash/src/univalue'
  CXX      libbitcoin_util_a-chainparamsbase.o
  CXX      libbitcoin_util_a-fs.o
  CXX      libbitcoin_util_a-logging.o
  CXX      libbitcoin_util_a-random.o
  CXX      support/libbitcoin_util_a-cleanse.o
  CXX      rpc/libbitcoin_util_a-protocol.o
  CXX      lib/libunivalue_la-univalue.lo
  CXX      lib/libunivalue_la-univalue_get.lo
  CXX      libbitcoin_util_a-sync.o
  CXX      libbitcoin_util_a-uint256.o
  CXX      util/libbitcoin_util_a-system.o
  CXX      util/libbitcoin_util_a-moneystr.o
  CXX      util/libbitcoin_util_a-strencodings.o
  CXX      util/libbitcoin_util_a-time.o
  CXX      lib/libunivalue_la-univalue_read.lo
make[4]: Entering directory '/build/zcash/src/zcash/src/secp256k1'
  GEN      rust/gen/src/blake2b.cpp
  GEN      rust/gen/src/bundlecache.cpp
/usr/bin/clang -DHAVE_CONFIG_H -I/usr/include/utf8cpp -I. -I./src -O2 -fvisibility=hidden -Wconditional-uninitialized -std=c99 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -c src/gen_context.c -o gen_context.o
  GEN      rust/gen/src/equihash.cpp
  GEN      rust/gen/src/orchard_bundle.cpp
  GEN      rust/gen/src/sapling.cpp
  GEN      rust/gen/src/wallet_scanner.cpp
  CXX      zcash/libzcash_a-cache.o
  CXX      zcash/libzcash_a-History.o
  CXX      zcash/libzcash_a-JoinSplit.o
  CXX      zcash/libzcash_a-Note.o
  CXX      zcash/libzcash_a-prf.o
  CXX      zcash/libzcash_a-util.o
  CXX      lib/libunivalue_la-univalue_write.lo
  CXX      crc32c/src/libcrc32c_sse42_a-crc32c_sse42.o
  CXX      zcash_cli-bitcoin-cli.o
  CXX      rpc/libbitcoin_cli_a-client.o
  CXX      zcash_tx-bitcoin-tx.o
Generated test/data/script_valid.json.h
Generated test/data/base58_keys_valid.json.h
Generated test/data/base58_encode_decode.json.h
Generated test/data/base58_keys_invalid.json.h
Generated test/data/script_invalid.json.h
Generated test/data/tx_invalid.json.h
Generated test/data/merkle_roots.json.h
Generated test/data/tx_valid.json.h
Generated test/data/merkle_serialization.json.h
Generated test/data/merkle_commitments.json.h
Generated test/data/merkle_witness_serialization.json.h
Generated test/data/merkle_path.json.h
Generated test/data/merkle_roots_sapling.json.h
Generated test/data/merkle_serialization_sapling.json.h
Generated test/data/merkle_witness_serialization_sapling.json.h
Generated test/data/merkle_commitments_sapling.json.h
Generated test/data/merkle_path_sapling.json.h
Generated test/data/unified_addrs.json.h
Generated test/data/sapling_key_components.json.h
Generated test/data/unified_full_viewing_keys.json.h
  CXX      policy/libbitcoin_server_a-fees.o
  CXX      policy/libbitcoin_server_a-policy.o
  CXX      rpc/libbitcoin_server_a-blockchain.o
  CXX      rpc/libbitcoin_server_a-mining.o
Generated test/data/zip0244.json.h
  CXX      rpc/libbitcoin_server_a-misc.o
  CXX      rpc/libbitcoin_server_a-net.o
Generated test/data/alertTests.raw.h
  CXXLD    libunivalue.la
  CXX      rpc/libbitcoin_server_a-rawtransaction.o
  CXX      rpc/libbitcoin_server_a-server.o
  CXX      script/libbitcoin_server_a-sigcache.o
  CXX      script/libbitcoin_server_a-ismine.o
Generated test/data/sighash.json.h
  CXX      wallet/libbitcoin_wallet_a-asyncrpcoperation_common.o
/usr/bin/clang -O2 -fvisibility=hidden -Wconditional-uninitialized -std=c99 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now gen_context.o -o gen_context
  CXX      wallet/libbitcoin_wallet_a-asyncrpcoperation_mergetoaddress.o
./gen_context
  CC       src/libsecp256k1_la-secp256k1.lo
  CXX      wallet/libbitcoin_wallet_a-asyncrpcoperation_saplingmigration.o
  CXX      wallet/libbitcoin_wallet_a-asyncrpcoperation_sendmany.o
  CXX      wallet/libbitcoin_wallet_a-asyncrpcoperation_shieldcoinbase.o
  CXX      wallet/libbitcoin_wallet_a-crypter.o
  CXX      wallet/libbitcoin_wallet_a-db.o
In file included from src/secp256k1.c:20:
./src/ecdsa_impl.h:312:12: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
    return !secp256k1_scalar_is_zero(sigr) & !secp256k1_scalar_is_zero(sigs);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                           &&
./src/ecdsa_impl.h:312:12: note: cast one or both operands to int to silence this warning
make[4]: Leaving directory '/build/zcash/src/zcash/src/univalue'
  CXX      wallet/libbitcoin_wallet_a-orchard.o
  CXX      wallet/libbitcoin_wallet_a-paymentdisclosure.o
  CXX      wallet/libbitcoin_wallet_a-paymentdisclosuredb.o
  CXX      wallet/libbitcoin_wallet_a-rpcdisclosure.o
  CXX      wallet/libbitcoin_wallet_a-rpcdump.o
  CXX      wallet/libbitcoin_wallet_a-rpcwallet.o
  CXX      wallet/libbitcoin_wallet_a-wallet.o
  CXX      wallet/libbitcoin_wallet_a-walletdb.o
  CXX      consensus/libbitcoin_common_a-funding.o
txdb.cpp:394:58: error: no viable conversion from '__normal_iterator<std::vector<CBlockIndex *>::const_pointer, vector<CBlockIndex *, allocator<CBlockIndex *>>>' to '__normal_iterator<std::vector<const CBlockIndex *>::const_pointer, vector<const CBlockIndex *, allocator<const CBlockIndex *>>>'
    for (std::vector<const CBlockIndex*>::const_iterator it=blockinfo.begin(); it != blockinfo.end(); it++) {
                                                         ^  ~~~~~~~~~~~~~~~~~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1043:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::vector<CBlockIndex *>::const_iterator' (aka '__normal_iterator<CBlockIndex *const *, std::vector<CBlockIndex *>>') to 'const __gnu_cxx::__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>> &' for 1st argument
    class __normal_iterator
          ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1043:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::vector<CBlockIndex *>::const_iterator' (aka '__normal_iterator<CBlockIndex *const *, std::vector<CBlockIndex *>>') to '__gnu_cxx::__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>> &&' for 1st argument
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1079:2: note: candidate template ignored: could not match 'vector<const CBlockIndex *, allocator<const CBlockIndex *>>' against 'vector<CBlockIndex *, allocator<CBlockIndex *>>'
        __normal_iterator(const __normal_iterator<_Iter, _Container>& __i)
        ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1072:7: note: explicit constructor is not a candidate
      __normal_iterator(const _Iterator& __i) _GLIBCXX_NOEXCEPT
      ^
txdb.cpp:394:83: error: invalid operands to binary expression ('std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') and 'std::vector<CBlockIndex *>::const_iterator' (aka '__normal_iterator<CBlockIndex *const *, std::vector<CBlockIndex *>>'))
    for (std::vector<const CBlockIndex*>::const_iterator it=blockinfo.begin(); it != blockinfo.end(); it++) {
                                                                               ~~ ^  ~~~~~~~~~~~~~~~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/allocator.h:210:7: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'const std::allocator<CBlockIndex *>' for 1st argument
      operator!=(const allocator&, const allocator&) _GLIBCXX_NOTHROW
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/allocator.h:210:7: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'const std::allocator<const CBlockIndex *>' for 1st argument
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/system_error:416:3: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'const std::error_code' for 1st argument
  operator!=(const error_code& __lhs, const error_code& __rhs) noexcept
  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/system_error:421:3: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'const std::error_code' for 1st argument
  operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept
  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/system_error:426:3: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'const std::error_condition' for 1st argument
  operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept
  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/system_error:431:3: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'const std::error_condition' for 1st argument
  operator!=(const error_condition& __lhs,
  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/variant:1280:18: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'std::monostate' for 1st argument
  constexpr bool operator!=(monostate, monostate) noexcept { return false; }
                 ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/thread:66:3: note: candidate function not viable: no known conversion from 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>') to 'thread::id' for 1st argument
  operator!=(thread::id __x, thread::id __y) noexcept
  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1229:5: note: candidate template ignored: deduced conflicting types for parameter '_Container' ('vector<const CBlockIndex *, allocator<const CBlockIndex *>>' vs. 'vector<CBlockIndex *, allocator<CBlockIndex *>>')
    operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1237:5: note: candidate template ignored: deduced conflicting types for parameter '_Iterator' ('const CBlockIndex *const *' vs. 'CBlockIndex *const *')
    operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_pair.h:670:5: note: candidate template ignored: could not match 'pair' against '__normal_iterator'
    operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:458:5: note: candidate template ignored: could not match 'reverse_iterator' against '__normal_iterator'
    operator!=(const reverse_iterator<_Iterator>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:503:5: note: candidate template ignored: could not match 'reverse_iterator' against '__normal_iterator'
    operator!=(const reverse_iterator<_IteratorL>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1675:5: note: candidate template ignored: could not match 'move_iterator' against '__normal_iterator'
    operator!=(const move_iterator<_IteratorL>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator.h:1741:5: note: candidate template ignored: could not match 'move_iterator' against '__normal_iterator'
    operator!=(const move_iterator<_Iterator>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/array:333:5: note: candidate template ignored: could not match 'array' against '__normal_iterator'
    operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/postypes.h:197:5: note: candidate template ignored: could not match 'fpos' against '__normal_iterator'
    operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/new_allocator.h:203:2: note: candidate template ignored: could not match '__new_allocator' against '__normal_iterator'
        operator!=(const __new_allocator&, const __new_allocator<_Up>&)
        ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/new_allocator.h:203:2: note: candidate template ignored: could not match '__new_allocator' against '__normal_iterator'
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/allocator.h:226:5: note: candidate template ignored: could not match 'allocator' against '__normal_iterator'
    operator!=(const allocator<_T1>&, const allocator<_T2>&)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/string_view:575:5: note: candidate template ignored: could not match 'basic_string_view' against '__normal_iterator'
    operator!=(basic_string_view<_CharT, _Traits> __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/string_view:581:5: note: candidate template ignored: could not match 'basic_string_view' against '__normal_iterator'
    operator!=(basic_string_view<_CharT, _Traits> __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/string_view:588:5: note: candidate template ignored: could not match 'basic_string_view' against '__normal_iterator'
    operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/basic_string.h:3653:5: note: candidate template ignored: could not match 'basic_string' against '__normal_iterator'
    operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/basic_string.h:3666:5: note: candidate template ignored: could not match 'const _CharT *' against 'std::vector<const CBlockIndex *>::const_iterator' (aka '__normal_iterator<const CBlockIndex *const *, std::vector<const CBlockIndex *>>')
    operator!=(const _CharT* __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/basic_string.h:3678:5: note: candidate template ignored: could not match 'basic_string' against '__normal_iterator'
    operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/streambuf_iterator.h:241:5: note: candidate template ignored: could not match 'istreambuf_iterator' against '__normal_iterator'
    operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_list.h:2189:5: note: candidate template ignored: could not match 'list' against '__normal_iterator'
    operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/tuple:1551:5: note: candidate template ignored: could not match 'tuple' against '__normal_iterator'
    operator!=(const tuple<_TElements...>& __t,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_map.h:1556:5: note: candidate template ignored: could not match 'map' against '__normal_iterator'
    operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_multimap.h:1177:5: note: candidate template ignored: could not match 'multimap' against '__normal_iterator'
    operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/unique_ptr.h:848:5: note: candidate template ignored: could not match 'unique_ptr' against '__normal_iterator'
    operator!=(const unique_ptr<_Tp, _Dp>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/unique_ptr.h:856:5: note: candidate template ignored: could not match 'unique_ptr' against '__normal_iterator'
    operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/unique_ptr.h:863:5: note: candidate template ignored: could not match 'unique_ptr' against '__normal_iterator'
    operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/shared_ptr_base.h:1824:5: note: candidate template ignored: could not match '__shared_ptr' against '__normal_iterator'
    operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/shared_ptr_base.h:1830:5: note: candidate template ignored: could not match '__shared_ptr' against '__normal_iterator'
    operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/shared_ptr_base.h:1835:5: note: candidate template ignored: could not match '__shared_ptr' against '__normal_iterator'
    operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/shared_ptr.h:588:5: note: candidate template ignored: could not match 'shared_ptr' against '__normal_iterator'
    operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/shared_ptr.h:594:5: note: candidate template ignored: could not match 'shared_ptr' against '__normal_iterator'
    operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/shared_ptr.h:600:5: note: candidate template ignored: could not match 'shared_ptr' against '__normal_iterator'
    operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/optional:1231:5: note: candidate template ignored: could not match 'optional' against '__normal_iterator'
    operator!=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/optional:1298:5: note: candidate template ignored: could not match 'optional' against '__normal_iterator'
    operator!=(const optional<_Tp>& __lhs, nullopt_t) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/optional:1303:5: note: candidate template ignored: could not match 'optional' against '__normal_iterator'
    operator!=(nullopt_t, const optional<_Tp>& __rhs) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/optional:1362:5: note: candidate template ignored: could not match 'optional' against '__normal_iterator'
    operator!=(const optional<_Tp>& __lhs, const _Up& __rhs)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/optional:1368:5: note: candidate template ignored: could not match 'optional' against '__normal_iterator'
    operator!=(const _Up& __lhs, const optional<_Tp>& __rhs)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_set.h:1030:5: note: candidate template ignored: could not match 'set' against '__normal_iterator'
    operator!=(const set<_Key, _Compare, _Alloc>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_multiset.h:1017:5: note: candidate template ignored: could not match 'multiset' against '__normal_iterator'
    operator!=(const multiset<_Key, _Compare, _Alloc>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_vector.h:2081:5: note: candidate template ignored: could not match 'vector' against '__normal_iterator'
    operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/variant:1242:3: note: candidate template ignored: could not match 'variant' against '__normal_iterator'
  _VARIANT_RELATION_FUNCTION_TEMPLATE(!=, not_equal)
  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/variant:1216:20: note: expanded from macro '_VARIANT_RELATION_FUNCTION_TEMPLATE'
    constexpr bool operator __OP(const variant<_Types...>& __lhs, \
                   ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/unordered_map.h:2141:5: note: candidate template ignored: could not match 'unordered_map' against '__normal_iterator'
    operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/unordered_map.h:2155:5: note: candidate template ignored: could not match 'unordered_multimap' against '__normal_iterator'
    operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_deque.h:2338:5: note: candidate template ignored: could not match 'deque' against '__normal_iterator'
    operator!=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_stack.h:382:5: note: candidate template ignored: could not match 'stack' against '__normal_iterator'
    operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/std_function.h:736:5: note: candidate template ignored: could not match 'function' against '__normal_iterator'
    operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/std_function.h:742:5: note: candidate template ignored: could not match 'function' against '__normal_iterator'
    operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:1092:5: note: candidate template ignored: could not match 'sub_match' against '__normal_iterator'
    operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:1172:5: note: candidate template ignored: could not match 'basic_string' against '__normal_iterator'
    operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:1265:5: note: candidate template ignored: could not match 'sub_match' against '__normal_iterator'
    operator!=(const sub_match<_Bi_iter>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:1339:5: note: candidate template ignored: could not match 'sub_match' against '__normal_iterator'
    operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:1433:5: note: candidate template ignored: could not match 'sub_match' against '__normal_iterator'
    operator!=(const sub_match<_Bi_iter>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:1507:5: note: candidate template ignored: could not match 'sub_match' against '__normal_iterator'
    operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:1607:5: note: candidate template ignored: could not match 'sub_match' against '__normal_iterator'
    operator!=(const sub_match<_Bi_iter>& __lhs,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/regex.h:2156:5: note: candidate template ignored: could not match 'match_results' against '__normal_iterator'
    operator!=(const match_results<_Bi_iter, _Alloc>& __m1,
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/complex:483:5: note: candidate template ignored: could not match 'complex' against '__normal_iterator'
    operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/complex:488:5: note: candidate template ignored: could not match 'complex' against '__normal_iterator'
    operator!=(const complex<_Tp>& __x, const _Tp& __y)
    ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/complex:493:5: note: candidate template ignored: could not match 'complex' against '__normal_iterator'
    operator!=(const _Tp& __x, const complex<_Tp>& __y)
    ^
  CXX      consensus/libbitcoin_common_a-merkle.o
  CXX      consensus/libbitcoin_common_a-params.o
  CXX      consensus/libbitcoin_common_a-upgrades.o
  CXX      primitives/libbitcoin_common_a-block.o
  CXX      primitives/libbitcoin_common_a-transaction.o
  CXX      primitives/libbitcoin_common_a-tx_version_info.o
1 warning generated.
  CXX      util/libbitcoin_common_a-test.o
  CCLD     libsecp256k1.la
  CXX      support/libbitcoin_util_a-lockedpool.o
  CXX      libbitcoin_util_a-clientversion.o
  CXX      compat/libbitcoin_util_a-glibc_sanity.o
2 errors generated.
  CXX      compat/libbitcoin_util_a-glibcxx_sanity.o
make[3]: *** [Makefile:5969: libbitcoin_server_a-txdb.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/build/zcash/src/zcash/src/secp256k1'
make[3]: Leaving directory '/build/zcash/src/zcash/src'
make[2]: *** [Makefile:8798: all-recursive] Error 1
make[2]: Leaving directory '/build/zcash/src/zcash/src'
make[1]: *** [Makefile:2785: all] Error 2
make[1]: Leaving directory '/build/zcash/src/zcash/src'
make: *** [Makefile:646: all-recursive] Error 1
==> ERROR: A failure occurred in build().
@str4d str4d added C-bug Category: This is a bug A-build Area: Build system labels Jan 3, 2023
@str4d
Copy link
Contributor

str4d commented Jan 3, 2023

The error is the inability to convert from:

__normal_iterator<
    std::vector<CBlockIndex *>::const_pointer,
    vector<CBlockIndex *, allocator<CBlockIndex *>>>

to:

__normal_iterator<
    std::vector<const CBlockIndex *>::const_pointer,
    vector<const CBlockIndex *, allocator<const CBlockIndex *>>>

This was almost certainly caused by #6192, specifically aee8d5c#diff-cafbe1353eff6084b73fd3b6c3dee603e0827348fdd2fe12dfad1e01003a84edR385:

- bool CBlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo) {
+ bool CBlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<CBlockIndex*>& blockinfo) {

Are you building with ./zcutil/build.sh, or are you using ./configure && make directly? The latter is not supported, and I suspect what is happening here is that your Clang version differs from what we currently require to build (Clang 14).

@str4d
Copy link
Contributor

str4d commented Jan 3, 2023

I notice that my VS Code editor is defaulting to error checking with gcc 11.3 (i.e. my system GCC), and shows the same error in the UI. So it seems like Clang-specific behaviour we are now depending upon. This is technically fine, as we don't support compiling with GCC, but the fact that above log shows Clang being used indicates we are maybe depending on recent Clang.

str4d added a commit to str4d/zcash that referenced this issue Jan 3, 2023
The const annotation was removed from the blockinfo type in
zcash#6192, but not from the type of its iterator. Recent Clang
versions are able to handle this, but GCC 11 (and it appears older Clang
versions) raise an error.

Closes zcash#6306.
@str4d
Copy link
Contributor

str4d commented Jan 3, 2023

Opened #6314 with a fix. Let me know if it works for you.

@str4d str4d changed the title Build error with 5.3.2: no viable conversion from '__normal_iterator<std::vector<CBlockIndex *>::const_pointer, vector<CBlockIndex *, allocator<CBlockIndex *>>>' to '__normal_iterator<std::vector<const CBlockIndex *>::const_pointer, vector<const CBlockIndex *, allocator<const CBlockIndex *>>> Build error with 5.3.2: invalid type annotation for blockinfo iterator Jan 3, 2023
@str4d str4d added this to the Release 5.4.0 milestone Jan 3, 2023
DeckerSU pushed a commit to DeckerSU/KomodoOcean that referenced this issue Mar 31, 2023
The const annotation was removed from the blockinfo type in
zcash/zcash#6192, but not from the type of its iterator. Recent Clang
versions are able to handle this, but GCC 11 (and it appears older Clang
versions) raise an error.

Closes zcash/zcash#6306.
DeckerSU pushed a commit to DeckerSU/KomodoOcean that referenced this issue Jun 12, 2023
The const annotation was removed from the blockinfo type in
zcash/zcash#6192, but not from the type of its iterator. Recent Clang
versions are able to handle this, but GCC 11 (and it appears older Clang
versions) raise an error.

Closes zcash/zcash#6306.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: Build system C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants