0

When installing libbitcoin from here with $ ./install.sh --prefix=/home/me/myprefix --build-boost --disable-shared after most of the compilation is done there seem to be checks of the sourcecode with warnings like thise one:

In file included from ./include/bitcoin/bitcoin/machine/operation.hpp:159:0,
                 from ./include/bitcoin/bitcoin/chain/script.hpp:31,
                 from ./include/bitcoin/bitcoin/chain/output.hpp:28,
                 from ./include/bitcoin/bitcoin/chain/output_point.hpp:25,
                 from ./include/bitcoin/bitcoin/chain/input.hpp:27,
                 from ./include/bitcoin/bitcoin/chain/transaction.hpp:30,
                 from ./include/bitcoin/bitcoin/chain/block.hpp:31,
                 from ./include/bitcoin/bitcoin.hpp:24,
                 from test/chain/transaction.cpp:20:
./include/bitcoin/bitcoin/impl/machine/operation.ipp:136:15: warning: ‘size_t libbitcoin::machine::variable_uint_size(uint64_t)’ defined but not used [-Wunused-function]
 static size_t variable_uint_size(uint64_t value)
               ^~~~~~~~~~~~~~~~~~

On my Raspberry Pi 2B this goes on for several hours now. Can someone explain why such a huge amount of tests would be usefull?

bomben
  • 498
  • 2
  • 4
  • 11

2 Answers2

2

These are not tests. They are simply warnings generated by the compiler indicating there may be an issue with the code being compiled.

Most likely, it's just being overzealous and the developers are aware of this.

Jonathan Cross
  • 1,410
  • 10
  • 30
Pieter Wuille
  • 98,249
  • 9
  • 183
  • 287
1

That message mentions -Wunused-function which is a compiler flag that invokes testing for useless functions that are defined in the source code but not used anywhere in the project. See stackoverflow

It may be that large numbers of these warnings arise for the ARM hardware architecture but not for x86 or x86-64 hardware architectures because of conditional compilation directives or for some similar reason.

You could probably disable -Wunused-function in the configuration file.

RedGrittyBrick
  • 24,039
  • 3
  • 23
  • 47