<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
<!-- Describe the issue -->
<!--- What behavior did you expect? -->
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
When attempting to generate coverage information with make cov after configuring and building with clang, lcov/gcov (for the versions I'm using) are unable to parse the generated gcda files:
/home/james/tmp/bitcoin/src/libbitcoin_server_a-miner.gcno:version '402*', prefer 'A72*'
geninfo: ERROR: GCOV failed for /home/james/tmp/bitcoin/src/libbitcoin_server_a-miner.gcda!
Makefile:1269: recipe for target 'test_bitcoin.info' failed
We may need to special-case the effects of --enable-lcov when building with clang to use flags and commands mentioned here.
Configure output
Options used to compile and link:
with wallet = yes
with gui / qt = yes
qt version = 5
with qr = auto
with zmq = yes
with test = yes
with bench = yes
with upnp = auto
use asm = yes
debug enabled = no
werror = no
target os = linux
build os =
CC = /usr/bin/clang-4.0
CFLAGS = -g -O2
CPPFLAGS = -I/home/james/tmp/bitcoin/db4/include/ -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
CXX = /usr/bin/clang++-4.0 -std=c++11
CXXFLAGS = -std=c++11 -std=c++11 --coverage -Og
LDFLAGS = -L/home/james/tmp/bitcoin/db4/lib/ --coverage
ARFLAGS = cr
Versions
$ clang++-4.0 --version
clang version 4.0.1-6 (tags/RELEASE_401/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ lcov --version
lcov: LCOV version 1.13
$ gcov --version
gcov (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
make cov failure
$ make cov
...
/usr/bin/lcov --gcov-tool=/usr/bin/gcov -c -d /home/james/tmp/bitcoin/src -t test_bitcoin -o test_bitcoin.info
Capturing coverage data from /home/james/tmp/bitcoin/src
Found gcov version: 7.2.0
Scanning /home/james/tmp/bitcoin/src for .gcda files ...
Found 290 data files in /home/james/tmp/bitcoin/src
Processing src/libbitcoin_server_a-miner.gcda
/home/james/tmp/bitcoin/src/libbitcoin_server_a-miner.gcno:version '402*', prefer 'A72*'
geninfo: ERROR: GCOV failed for /home/james/tmp/bitcoin/src/libbitcoin_server_a-miner.gcda!
Makefile:1269: recipe for target 'test_bitcoin.info' failed
make: *** [test_bitcoin.info] Error 29
rm test_bitcoin.info baseline_filtered.info baseline.info