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

Document non-functional no-std for bitcoinconsensus #1352

Closed
wants to merge 1 commit into from

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Oct 27, 2022

The rust-bitcoinconsensus dependency is not able to be built with --thumbv7m-none-eabi. This means, at least as far as verifying our no-std build, no-std does not work when the bitcoinconsensus dependency is enabled.

Instead of fixing the problem, document that it is broken.

Context

cargo +nightly build --target thumbv7m-none-eabi fails on every tag in rust-bitcoinconsensus back to v0.17.1

@apoelstra
Copy link
Member

concept ACK, though we should try to investigate upstream what's wrong

apoelstra
apoelstra previously approved these changes Oct 27, 2022
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3988e4a

@Kixunil
Copy link
Collaborator

Kixunil commented Oct 27, 2022

What's the error message? Are you sure it's not some ARM issue instead of no_std?

@tcharding
Copy link
Member Author

Its a build problem with building the C code, I did not do more than a cursory read of the output but here it is:

cargo +nightly build --target thumbv7m-none-eabi
   Compiling bitcoinconsensus v0.20.2-0.5.0 (/home/tobin/build/github.com/tcharding/rust-bitcoinconsensus)
The following warnings were emitted during compilation:

warning: depend/bitcoin/src/secp256k1/src/secp256k1.c:64:1: warning: missing initializer for member 'secp256k1_ecmult_gen_context::blind' [-Wmissing-field-initializers]
warning:    64 | };
warning:       | ^
warning: depend/bitcoin/src/secp256k1/src/secp256k1.c:64:1: warning: missing initializer for member 'secp256k1_ecmult_gen_context::initial' [-Wmissing-field-initializers]
warning: In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:15:
warning: depend/bitcoin/src/secp256k1/src/ecmult_const_impl.h:120:13: warning: 'void secp256k1_ecmult_const(secp256k1_gej*, const secp256k1_ge*, const secp256k1_scalar*, int)' defined but not used [-Wunused-function]
warning:   120 | static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *scalar, int size) {
warning:       |             ^~~~~~~~~~~~~~~~~~~~~~
warning: In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:14:
warning: depend/bitcoin/src/secp256k1/src/ecmult_impl.h:1135:12: warning: 'int secp256k1_ecmult_multi_var(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, int (*)(secp256k1_scalar*, secp256k1_ge*, size_t, void*), void*, size_t)' defined but not used [-Wunused-function]
warning:  1135 | static int secp256k1_ecmult_multi_var(const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning:       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
warning: depend/bitcoin/src/secp256k1/src/ecmult_impl.h:1042:12: warning: 'int secp256k1_ecmult_pippenger_batch_single(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, int (*)(secp256k1_scalar*, secp256k1_ge*, size_t, void*), void*, size_t)' defined but not used [-Wunused-function]
warning:  1042 | static int secp256k1_ecmult_pippenger_batch_single(const secp256k1_ecmult_context *actx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning:       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: depend/bitcoin/src/secp256k1/src/ecmult_impl.h:669:12: warning: 'int secp256k1_ecmult_strauss_batch_single(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, int (*)(secp256k1_scalar*, secp256k1_ge*, size_t, void*), void*, size_t)' defined but not used [-Wunused-function]
warning:   669 | static int secp256k1_ecmult_strauss_batch_single(const secp256k1_ecmult_context *actx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) {
warning:       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:13:
warning: depend/bitcoin/src/secp256k1/src/group_impl.h:691:12: warning: 'int secp256k1_gej_has_quad_y_var(const secp256k1_gej*)' defined but not used [-Wunused-function]
warning:   691 | static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) {
warning:       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: depend/bitcoin/src/secp256k1/src/group_impl.h:272:12: warning: 'int secp256k1_gej_is_valid_var(const secp256k1_gej*)' defined but not used [-Wunused-function]
warning:   272 | static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) {
warning:       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
warning: depend/bitcoin/src/secp256k1/src/group_impl.h:202:13: warning: 'void secp256k1_ge_set_infinity(secp256k1_ge*)' defined but not used [-Wunused-function]
warning:   202 | static void secp256k1_ge_set_infinity(secp256k1_ge *r) {
warning:       |             ^~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:11:
warning: depend/bitcoin/src/secp256k1/src/field_impl.h:266:13: warning: 'void secp256k1_fe_inv_all_var(secp256k1_fe*, const secp256k1_fe*, size_t)' defined but not used [-Wunused-function]
warning:   266 | static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len) {
warning:       |             ^~~~~~~~~~~~~~~~~~~~~~~~
warning: depend/bitcoin/src/hash.cpp: In function 'unsigned int MurmurHash3(unsigned int, const std::vector<unsigned char>&)':
warning: depend/bitcoin/src/hash.cpp:48:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
warning:    48 |             k1 ^= tail[2] << 16;
warning:       |             ~~~^~~~~~~~~~~~~~~~
warning: depend/bitcoin/src/hash.cpp:49:9: note: here
warning:    49 |         case 2:
warning:       |         ^~~~
warning: depend/bitcoin/src/hash.cpp:50:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
warning:    50 |             k1 ^= tail[1] << 8;
warning:       |             ~~~^~~~~~~~~~~~~~~
warning: depend/bitcoin/src/hash.cpp:51:9: note: here
warning:    51 |         case 1:
warning:       |         ^~~~
warning: In file included from depend/bitcoin/src/primitives/transaction.h:11,
warning:                  from depend/bitcoin/src/primitives/transaction.cpp:6:
warning: depend/bitcoin/src/script/script.h: In member function 'CScript& CScript::operator<<(opcodetype)':
warning: depend/bitcoin/src/script/script.h:449:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
warning:   449 |         if (opcode < 0 || opcode > 0xff)
warning:       |             ~~~~~~~^~~
warning: depend/bitcoin/src/script/script.h:449:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
warning:   449 |         if (opcode < 0 || opcode > 0xff)
warning:       |                           ~~~~~~~^~~~~~
warning: In file included from /usr/include/newlib/c++/10.3.1/vector:67,
warning:                  from depend/bitcoin/src/serialize.h:22,
warning:                  from depend/bitcoin/src/script/script.h:11,
warning:                  from depend/bitcoin/src/primitives/transaction.h:11,
warning:                  from depend/bitcoin/src/primitives/transaction.cpp:6:
warning: /usr/include/newlib/c++/10.3.1/bits/stl_vector.h: In copy constructor 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = CTxOut; _Alloc = std::allocator<CTxOut>]':
warning: /usr/include/newlib/c++/10.3.1/bits/stl_vector.h:558:31: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning:   558 |    std::__uninitialized_copy_a(__x.begin(), __x.end(),
warning:       |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
warning:   559 |           this->_M_impl._M_start,
warning:       |           ~~~~~~~~~~~~~~~~~~~~~~~
warning:   560 |           _M_get_Tp_allocator());
warning:       |           ~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from /usr/include/newlib/c++/10.3.1/memory:66,
warning:                  from depend/bitcoin/src/serialize.h:16,
warning:                  from depend/bitcoin/src/script/script.h:11,
warning:                  from depend/bitcoin/src/primitives/transaction.h:11,
warning:                  from depend/bitcoin/src/primitives/transaction.cpp:6:
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >; _ForwardIterator = CTxOut*; _Tp = CTxOut]':
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:323:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning:   323 |     __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
warning:       |     ^~~~~~~~~~~~~~~~~~~~~~
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:323:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:325:37: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning:   325 |     { return std::uninitialized_copy(__first, __last, __result); }
warning:       |              ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h: In function '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >; _ForwardIterator = CTxOut*]':
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:125:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning:   125 |     uninitialized_copy(_InputIterator __first, _InputIterator __last,
warning:       |     ^~~~~~~~~~~~~~~~~~
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:125:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning:   147 |       return std::__uninitialized_copy<__is_trivial(_ValueType1)
warning:       |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning:   148 |            && __is_trivial(_ValueType2)
warning:       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning:   149 |            && __assignable>::
warning:       |            ~~~~~~~~~~~~~~~~~~
warning:   150 |  __uninit_copy(__first, __last, __result);
warning:       |  ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >; _ForwardIterator = CTxOut*; bool _TrivialValueTypes = false]':
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning:    84 |         __uninit_copy(_InputIterator __first, _InputIterator __last,
warning:       |         ^~~~~~~~~~~~~
warning: /usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning: In file included from depend/bitcoin/src/primitives/transaction.h:11,
warning:                  from depend/bitcoin/src/script/bitcoinconsensus.cpp:8:
warning: depend/bitcoin/src/script/script.h: In member function 'CScript& CScript::operator<<(opcodetype)':
warning: depend/bitcoin/src/script/script.h:449:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
warning:   449 |         if (opcode < 0 || opcode > 0xff)
warning:       |             ~~~~~~~^~~
warning: depend/bitcoin/src/script/script.h:449:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
warning:   449 |         if (opcode < 0 || opcode > 0xff)
warning:       |                           ~~~~~~~^~~~~~
warning: In file included from /usr/include/newlib/c++/10.3.1/vector:72,
warning:                  from depend/bitcoin/src/serialize.h:22,
warning:                  from depend/bitcoin/src/script/script.h:11,
warning:                  from depend/bitcoin/src/primitives/transaction.h:11,
warning:                  from depend/bitcoin/src/script/bitcoinconsensus.cpp:8:
warning: /usr/include/newlib/c++/10.3.1/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {}; _Tp = CTxOut; _Alloc = std::allocator<CTxOut>]':
warning: /usr/include/newlib/c++/10.3.1/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
warning:   121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
warning:       |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: /usr/include/newlib/c++/10.3.1/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {}; _Tp = CTxOut; _Alloc = std::allocator<CTxOut>]':
warning: /usr/include/newlib/c++/10.3.1/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector<CTxOut>::iterator' changed in GCC 7.1
warning:   426 |       vector<_Tp, _Alloc>::
warning:       |       ^~~~~~~~~~~~~~~~~~~
warning: In file included from depend/bitcoin/src/primitives/transaction.h:11,
warning:                  from depend/bitcoin/src/script/interpreter.h:10,
warning:                  from depend/bitcoin/src/script/interpreter.cpp:6:
warning: depend/bitcoin/src/script/script.h: In member function 'CScript& CScript::operator<<(opcodetype)':
warning: depend/bitcoin/src/script/script.h:449:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
warning:   449 |         if (opcode < 0 || opcode > 0xff)
warning:       |             ~~~~~~~^~~
warning: depend/bitcoin/src/script/script.h:449:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
warning:   449 |         if (opcode < 0 || opcode > 0xff)
warning:       |                           ~~~~~~~^~~~~~
warning: depend/bitcoin/src/script/interpreter.cpp: In function 'bool EvalScript(std::vector<std::vector<unsigned char> >&, const CScript&, unsigned int, const BaseSignatureChecker&, SigVersion, ScriptError*)':
warning: depend/bitcoin/src/script/interpreter.cpp:407:28: warning: comparison is always true due to limited range of data type [-Wtype-limits]
warning:   407 |             if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4) {
warning:       |                          ~~^~~~~~~~~
warning: In file included from depend/bitcoin/src/script/script.h:11,
warning:                  from depend/bitcoin/src/primitives/transaction.h:11,
warning:                  from depend/bitcoin/src/script/interpreter.h:10,
warning:                  from depend/bitcoin/src/script/interpreter.cpp:6:
warning: depend/bitcoin/src/serialize.h: In instantiation of 'void Serialize(Stream&, const T&) [with Stream = CHashWriter; T = int]':
warning: depend/bitcoin/src/hash.h:154:20:   required from 'CHashWriter& CHashWriter::operator<<(const T&) [with T = int]'
warning: depend/bitcoin/src/script/interpreter.cpp:1343:12:   required from 'uint256 SignatureHash(const CScript&, const T&, unsigned int, int, const CAmount&, SigVersion, const PrecomputedTransactionData*) [with T = CTransaction; CAmount = long long int]'
warning: depend/bitcoin/src/script/interpreter.cpp:1385:36:   required from 'bool GenericTransactionSignatureChecker<T>::CheckSig(const std::vector<unsigned char>&, const std::vector<unsigned char>&, const CScript&, SigVersion) const [with T = CTransaction]'
warning: depend/bitcoin/src/script/interpreter.cpp:1478:16:   required from here
warning: depend/bitcoin/src/serialize.h:751:7: error: request for member 'Serialize' in 'a', which is of non-class type 'const int'
warning:   751 |     a.Serialize(os);
warning:       |     ~~^~~~~~~~~

error: failed to run custom build command for `bitcoinconsensus v0.20.2-0.5.0 (/home/tobin/build/github.com/tcharding/rust-bitcoinconsensus)`

Caused by:
  process didn't exit successfully: `/home/tobin/.cache/cargo/debug/build/bitcoinconsensus-37fb7709c89098f7/build-script-build` (exit status: 1)
  --- stdout
  OPT_LEVEL = Some("0")
  TARGET = Some("thumbv7m-none-eabi")
  HOST = Some("x86_64-unknown-linux-gnu")
  CXX_thumbv7m-none-eabi = None
  CXX_thumbv7m_none_eabi = None
  TARGET_CXX = None
  CXX = None
  CROSS_COMPILE = None
  CXXFLAGS_thumbv7m-none-eabi = None
  CXXFLAGS_thumbv7m_none_eabi = None
  TARGET_CXXFLAGS = None
  CXXFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("llvm14-builtins-abi,mclass,thumb-mode,thumb2,v5te,v6,v6k,v6t2,v7")
  CXX_thumbv7m-none-eabi = None
  CXX_thumbv7m_none_eabi = None
  TARGET_CXX = None
  CXX = None
  CROSS_COMPILE = None
  CXXFLAGS_thumbv7m-none-eabi = None
  CXXFLAGS_thumbv7m_none_eabi = None
  TARGET_CXXFLAGS = None
  CXXFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("llvm14-builtins-abi,mclass,thumb-mode,thumb2,v5te,v6,v6k,v6t2,v7")
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/secp256k1/src/secp256k1.o" "-c" "depend/bitcoin/src/secp256k1/src/secp256k1.c"
  cargo:warning=depend/bitcoin/src/secp256k1/src/secp256k1.c:64:1: warning: missing initializer for member 'secp256k1_ecmult_gen_context::blind' [-Wmissing-field-initializers]
  cargo:warning=   64 | };
  cargo:warning=      | ^
  cargo:warning=depend/bitcoin/src/secp256k1/src/secp256k1.c:64:1: warning: missing initializer for member 'secp256k1_ecmult_gen_context::initial' [-Wmissing-field-initializers]
  cargo:warning=In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:15:
  cargo:warning=depend/bitcoin/src/secp256k1/src/ecmult_const_impl.h:120:13: warning: 'void secp256k1_ecmult_const(secp256k1_gej*, const secp256k1_ge*, const secp256k1_scalar*, int)' defined but not used [-Wunused-function]
  cargo:warning=  120 | static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *scalar, int size) {
  cargo:warning=      |             ^~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:14:
  cargo:warning=depend/bitcoin/src/secp256k1/src/ecmult_impl.h:1135:12: warning: 'int secp256k1_ecmult_multi_var(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, int (*)(secp256k1_scalar*, secp256k1_ge*, size_t, void*), void*, size_t)' defined but not used [-Wunused-function]
  cargo:warning= 1135 | static int secp256k1_ecmult_multi_var(const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) {
  cargo:warning=      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=depend/bitcoin/src/secp256k1/src/ecmult_impl.h:1042:12: warning: 'int secp256k1_ecmult_pippenger_batch_single(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, int (*)(secp256k1_scalar*, secp256k1_ge*, size_t, void*), void*, size_t)' defined but not used [-Wunused-function]
  cargo:warning= 1042 | static int secp256k1_ecmult_pippenger_batch_single(const secp256k1_ecmult_context *actx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) {
  cargo:warning=      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=depend/bitcoin/src/secp256k1/src/ecmult_impl.h:669:12: warning: 'int secp256k1_ecmult_strauss_batch_single(const secp256k1_ecmult_context*, secp256k1_scratch*, secp256k1_gej*, const secp256k1_scalar*, int (*)(secp256k1_scalar*, secp256k1_ge*, size_t, void*), void*, size_t)' defined but not used [-Wunused-function]
  cargo:warning=  669 | static int secp256k1_ecmult_strauss_batch_single(const secp256k1_ecmult_context *actx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) {
  cargo:warning=      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:13:
  cargo:warning=depend/bitcoin/src/secp256k1/src/group_impl.h:691:12: warning: 'int secp256k1_gej_has_quad_y_var(const secp256k1_gej*)' defined but not used [-Wunused-function]
  cargo:warning=  691 | static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) {
  cargo:warning=      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=depend/bitcoin/src/secp256k1/src/group_impl.h:272:12: warning: 'int secp256k1_gej_is_valid_var(const secp256k1_gej*)' defined but not used [-Wunused-function]
  cargo:warning=  272 | static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) {
  cargo:warning=      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=depend/bitcoin/src/secp256k1/src/group_impl.h:202:13: warning: 'void secp256k1_ge_set_infinity(secp256k1_ge*)' defined but not used [-Wunused-function]
  cargo:warning=  202 | static void secp256k1_ge_set_infinity(secp256k1_ge *r) {
  cargo:warning=      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=In file included from depend/bitcoin/src/secp256k1/src/secp256k1.c:11:
  cargo:warning=depend/bitcoin/src/secp256k1/src/field_impl.h:266:13: warning: 'void secp256k1_fe_inv_all_var(secp256k1_fe*, const secp256k1_fe*, size_t)' defined but not used [-Wunused-function]
  cargo:warning=  266 | static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len) {
  cargo:warning=      |             ^~~~~~~~~~~~~~~~~~~~~~~~
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/util/strencodings.o" "-c" "depend/bitcoin/src/util/strencodings.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/uint256.o" "-c" "depend/bitcoin/src/uint256.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/pubkey.o" "-c" "depend/bitcoin/src/pubkey.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/hash.o" "-c" "depend/bitcoin/src/hash.cpp"
  cargo:warning=depend/bitcoin/src/hash.cpp: In function 'unsigned int MurmurHash3(unsigned int, const std::vector<unsigned char>&)':
  cargo:warning=depend/bitcoin/src/hash.cpp:48:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
  cargo:warning=   48 |             k1 ^= tail[2] << 16;
  cargo:warning=      |             ~~~^~~~~~~~~~~~~~~~
  cargo:warning=depend/bitcoin/src/hash.cpp:49:9: note: here
  cargo:warning=   49 |         case 2:
  cargo:warning=      |         ^~~~
  cargo:warning=depend/bitcoin/src/hash.cpp:50:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
  cargo:warning=   50 |             k1 ^= tail[1] << 8;
  cargo:warning=      |             ~~~^~~~~~~~~~~~~~~
  cargo:warning=depend/bitcoin/src/hash.cpp:51:9: note: here
  cargo:warning=   51 |         case 1:
  cargo:warning=      |         ^~~~
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/primitives/transaction.o" "-c" "depend/bitcoin/src/primitives/transaction.cpp"
  cargo:warning=In file included from depend/bitcoin/src/primitives/transaction.h:11,
  cargo:warning=                 from depend/bitcoin/src/primitives/transaction.cpp:6:
  cargo:warning=depend/bitcoin/src/script/script.h: In member function 'CScript& CScript::operator<<(opcodetype)':
  cargo:warning=depend/bitcoin/src/script/script.h:449:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  cargo:warning=  449 |         if (opcode < 0 || opcode > 0xff)
  cargo:warning=      |             ~~~~~~~^~~
  cargo:warning=depend/bitcoin/src/script/script.h:449:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  cargo:warning=  449 |         if (opcode < 0 || opcode > 0xff)
  cargo:warning=      |                           ~~~~~~~^~~~~~
  cargo:warning=In file included from /usr/include/newlib/c++/10.3.1/vector:67,
  cargo:warning=                 from depend/bitcoin/src/serialize.h:22,
  cargo:warning=                 from depend/bitcoin/src/script/script.h:11,
  cargo:warning=                 from depend/bitcoin/src/primitives/transaction.h:11,
  cargo:warning=                 from depend/bitcoin/src/primitives/transaction.cpp:6:
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_vector.h: In copy constructor 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = CTxOut; _Alloc = std::allocator<CTxOut>]':
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_vector.h:558:31: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=  558 |    std::__uninitialized_copy_a(__x.begin(), __x.end(),
  cargo:warning=      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=  559 |           this->_M_impl._M_start,
  cargo:warning=      |           ~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=  560 |           _M_get_Tp_allocator());
  cargo:warning=      |           ~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=In file included from /usr/include/newlib/c++/10.3.1/memory:66,
  cargo:warning=                 from depend/bitcoin/src/serialize.h:16,
  cargo:warning=                 from depend/bitcoin/src/script/script.h:11,
  cargo:warning=                 from depend/bitcoin/src/primitives/transaction.h:11,
  cargo:warning=                 from depend/bitcoin/src/primitives/transaction.cpp:6:
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h: In function '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >; _ForwardIterator = CTxOut*; _Tp = CTxOut]':
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:323:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=  323 |     __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
  cargo:warning=      |     ^~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:323:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:325:37: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=  325 |     { return std::uninitialized_copy(__first, __last, __result); }
  cargo:warning=      |              ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h: In function '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >; _ForwardIterator = CTxOut*]':
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:125:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=  125 |     uninitialized_copy(_InputIterator __first, _InputIterator __last,
  cargo:warning=      |     ^~~~~~~~~~~~~~~~~~
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:125:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=  147 |       return std::__uninitialized_copy<__is_trivial(_ValueType1)
  cargo:warning=      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=  148 |            && __is_trivial(_ValueType2)
  cargo:warning=      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=  149 |            && __assignable>::
  cargo:warning=      |            ~~~~~~~~~~~~~~~~~~
  cargo:warning=  150 |  __uninit_copy(__first, __last, __result);
  cargo:warning=      |  ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >; _ForwardIterator = CTxOut*; bool _TrivialValueTypes = false]':
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=   84 |         __uninit_copy(_InputIterator __first, _InputIterator __last,
  cargo:warning=      |         ^~~~~~~~~~~~~
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/crypto/ripemd160.o" "-c" "depend/bitcoin/src/crypto/ripemd160.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/crypto/sha1.o" "-c" "depend/bitcoin/src/crypto/sha1.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/crypto/sha256.o" "-c" "depend/bitcoin/src/crypto/sha256.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/crypto/sha512.o" "-c" "depend/bitcoin/src/crypto/sha512.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/crypto/hmac_sha512.o" "-c" "depend/bitcoin/src/crypto/hmac_sha512.cpp"
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/script/bitcoinconsensus.o" "-c" "depend/bitcoin/src/script/bitcoinconsensus.cpp"
  cargo:warning=In file included from depend/bitcoin/src/primitives/transaction.h:11,
  cargo:warning=                 from depend/bitcoin/src/script/bitcoinconsensus.cpp:8:
  cargo:warning=depend/bitcoin/src/script/script.h: In member function 'CScript& CScript::operator<<(opcodetype)':
  cargo:warning=depend/bitcoin/src/script/script.h:449:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  cargo:warning=  449 |         if (opcode < 0 || opcode > 0xff)
  cargo:warning=      |             ~~~~~~~^~~
  cargo:warning=depend/bitcoin/src/script/script.h:449:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  cargo:warning=  449 |         if (opcode < 0 || opcode > 0xff)
  cargo:warning=      |                           ~~~~~~~^~~~~~
  cargo:warning=In file included from /usr/include/newlib/c++/10.3.1/vector:72,
  cargo:warning=                 from depend/bitcoin/src/serialize.h:22,
  cargo:warning=                 from depend/bitcoin/src/script/script.h:11,
  cargo:warning=                 from depend/bitcoin/src/primitives/transaction.h:11,
  cargo:warning=                 from depend/bitcoin/src/script/bitcoinconsensus.cpp:8:
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {}; _Tp = CTxOut; _Alloc = std::allocator<CTxOut>]':
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
  cargo:warning=  121 |    _M_realloc_insert(end(), std::forward<_Args>(__args)...);
  cargo:warning=      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {}; _Tp = CTxOut; _Alloc = std::allocator<CTxOut>]':
  cargo:warning=/usr/include/newlib/c++/10.3.1/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector<CTxOut>::iterator' changed in GCC 7.1
  cargo:warning=  426 |       vector<_Tp, _Alloc>::
  cargo:warning=      |       ^~~~~~~~~~~~~~~~~~~
  exit status: 0
  running: "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/script/interpreter.o" "-c" "depend/bitcoin/src/script/interpreter.cpp"
  cargo:warning=In file included from depend/bitcoin/src/primitives/transaction.h:11,
  cargo:warning=                 from depend/bitcoin/src/script/interpreter.h:10,
  cargo:warning=                 from depend/bitcoin/src/script/interpreter.cpp:6:
  cargo:warning=depend/bitcoin/src/script/script.h: In member function 'CScript& CScript::operator<<(opcodetype)':
  cargo:warning=depend/bitcoin/src/script/script.h:449:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  cargo:warning=  449 |         if (opcode < 0 || opcode > 0xff)
  cargo:warning=      |             ~~~~~~~^~~
  cargo:warning=depend/bitcoin/src/script/script.h:449:34: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  cargo:warning=  449 |         if (opcode < 0 || opcode > 0xff)
  cargo:warning=      |                           ~~~~~~~^~~~~~
  cargo:warning=depend/bitcoin/src/script/interpreter.cpp: In function 'bool EvalScript(std::vector<std::vector<unsigned char> >&, const CScript&, unsigned int, const BaseSignatureChecker&, SigVersion, ScriptError*)':
  cargo:warning=depend/bitcoin/src/script/interpreter.cpp:407:28: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  cargo:warning=  407 |             if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4) {
  cargo:warning=      |                          ~~^~~~~~~~~
  cargo:warning=In file included from depend/bitcoin/src/script/script.h:11,
  cargo:warning=                 from depend/bitcoin/src/primitives/transaction.h:11,
  cargo:warning=                 from depend/bitcoin/src/script/interpreter.h:10,
  cargo:warning=                 from depend/bitcoin/src/script/interpreter.cpp:6:
  cargo:warning=depend/bitcoin/src/serialize.h: In instantiation of 'void Serialize(Stream&, const T&) [with Stream = CHashWriter; T = int]':
  cargo:warning=depend/bitcoin/src/hash.h:154:20:   required from 'CHashWriter& CHashWriter::operator<<(const T&) [with T = int]'
  cargo:warning=depend/bitcoin/src/script/interpreter.cpp:1343:12:   required from 'uint256 SignatureHash(const CScript&, const T&, unsigned int, int, const CAmount&, SigVersion, const PrecomputedTransactionData*) [with T = CTransaction; CAmount = long long int]'
  cargo:warning=depend/bitcoin/src/script/interpreter.cpp:1385:36:   required from 'bool GenericTransactionSignatureChecker<T>::CheckSig(const std::vector<unsigned char>&, const std::vector<unsigned char>&, const CScript&, SigVersion) const [with T = CTransaction]'
  cargo:warning=depend/bitcoin/src/script/interpreter.cpp:1478:16:   required from here
  cargo:warning=depend/bitcoin/src/serialize.h:751:7: error: request for member 'Serialize' in 'a', which is of non-class type 'const int'
  cargo:warning=  751 |     a.Serialize(os);
  cargo:warning=      |     ~~^~~~~~~~~
  exit status: 1

  --- stderr


  error occurred: Command "arm-none-eabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7-m" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/src/secp256k1/include" "-I" "depend/bitcoin/src/secp256k1" "-Wall" "-Wextra" "-std=c++11" "-Wno-unused-parameter" "-D__STDC_FORMAT_MACROS" "-DSECP256K1_BUILD=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DENABLE_MODULE_RECOVERY=1" "-DUSE_FIELD_10X26=1" "-DUSE_SCALAR_8X32=1" "-o" "/home/tobin/.cache/cargo/thumbv7m-none-eabi/debug/build/bitcoinconsensus-22dedc9e7caf3beb/out/depend/bitcoin/src/script/interpreter.o" "-c" "depend/bitcoin/src/script/interpreter.cpp" with args "arm-none-eabi-g++" did not execute successfully (status code exit status: 1).

@tcharding
Copy link
Member Author

Rebased on master, no other changes.

@Kixunil
Copy link
Collaborator

Kixunil commented Oct 28, 2022

Then I guess it's a problem with the specific toolchain, not no_std. Perhaps x86_64-unknown-unknown would work.

But this message looks quite weird anyway:

depend/bitcoin/src/serialize.h:751:7: error: request for member 'Serialize' in 'a', which is of non-class type 'const int'

@Kixunil
Copy link
Collaborator

Kixunil commented Oct 28, 2022

My guess is that the g++ there is just too old and the code is using some magic C++ craziness that the old version can't handle. If you could compare the versions that'd help investigating. Also I think we should print them out in CI for quicker access.

@tcharding
Copy link
Member Author

Then I guess it's a problem with the specific toolchain, not no_std. Perhaps x86_64-unknown-unknown would work.

I think you could be right but without building with #![no_std] we cannot verify it works, right? And to do that we currently only have infrastructure that uses ARM builds. Should I perhaps add an embedded test that uses an x86 toolchain to rust-bitcoinconsensus then we can change this PR to "ARM build is currently broken for rust-bitcoinconsensus" instead of "no_std is currently broken"?

@Kixunil
Copy link
Collaborator

Kixunil commented Oct 28, 2022

If we can prove it then it's probably not even ARM build but specific version of GCC. If you have the tie to try out on your machine first that'd be great.

@tcharding
Copy link
Member Author

Cool, leave it with me.

@tcharding
Copy link
Member Author

Putting on ice till after release of 0.30.0

@tcharding tcharding marked this pull request as draft February 10, 2023 00:39
@tcharding
Copy link
Member Author

There is no "no-std" feature any more.

@tcharding tcharding closed this Dec 11, 2023
@Kixunil
Copy link
Collaborator

Kixunil commented Dec 11, 2023

There is a no-std build (by disabling default features). Does it no longer apply?

@tcharding
Copy link
Member Author

Gee wiz, I was on fire yesterday.

@tcharding
Copy link
Member Author

I don't have clock cycles to dig into this at the moment. We learned yesterday that LDK is using bitcoinconsensus as a dev dependency in their test suite but if that is currently working that means they are not testing no_std with bitcoinconsensus.

@tcharding tcharding marked this pull request as ready for review December 11, 2023 20:47
@tcharding
Copy link
Member Author

CI fail is unrelated to this PR.

@apoelstra
Copy link
Member

Can we fix it in this PR though? I think it's a pretty small fix, it's just that some import needs to be feature gated. I think it's a bad interaction between #1225 (units crate) and the PR that enabled nightly clippy.

@tcharding
Copy link
Member Author

Can we fix it in this PR though?

I was going to rebase everything when #2279 merges.

@tcharding
Copy link
Member Author

tcharding commented Dec 11, 2023

CI fail is unrelated to this PR.

Oh this was the first PR I did this morning before I tackled #2279. I just wrote that comment to save you clicking on the CI failing job and investigating for me.

The `rust-bitcoinconsensus` dependency is not able to be built with
`--thumbv7m-none-eabi`. This means, at least as far as verifying our
`no-std` build, `no-std` does not work when the `bitcoinconsensus`
dependency is enabled.

Instead of fixing the problem, document that it is broken.
@tcharding
Copy link
Member Author

Rebased to pick up #2279, no other changes.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9955756

bitcoinconsensus = { version = "0.20.2-0.5.0", default-features = false, optional = true }

# Please note, bitocinconsensus does not currently work with no-std.
bitcoinconsensus = { version = "0.20.2-0.5.0", optional = true }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not documenting anything and as I understand it, bitcoinconsensus may be able to compile on some no_std platforms but not all of them?

@tcharding
Copy link
Member Author

There are bigger fish to fry.

@tcharding tcharding closed this Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants