Skip to content

build: error when building for test coverage #32571

Closed

Description

@brunoerg

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

When trying to compile it for test coverage, I'm getting the following error:

genhtml: ERROR: cannot read /Users/brunogarcia/projects/bitcoin-core-dev/build_cov/src/CMakeFiles/bitcoin-cli.dir/span.h
Processing file CMakeFiles/bitcoin-cli.dir/span.h
CMake Error at build_cov/Coverage.cmake:46 (execute_process):
  execute_process failed command indexes:

    1: "Child return code: 2"

Expected behaviour

Successful build for test coverage

Steps to reproduce

cmake -B build_cov -DCMAKE_BUILD_TYPE=Coverage 
cmake --build build_cov
cmake -P build_cov/Coverage.cmake

Same from developer-notes.md

Relevant log output

...
Finished .info-file creation
Deleting all .da files in src and subdirectories
Done.
Combining tracefiles.
Reading tracefile test_bitcoin_filtered.info
Writing data to test_bitcoin_filtered.info
Summary coverage rate:
  lines......: 63.7% (98724 of 155052 lines)
  functions..: 61.0% (107273 of 175800 functions)
  branches...: no data found
Combining tracefiles.
Reading tracefile baseline_filtered.info
Reading tracefile test_bitcoin_filtered.info
Writing data to test_bitcoin_coverage.info
Summary coverage rate:
  lines......: 61.3% (98724 of 160966 lines)
  functions..: 59.5% (107273 of 180241 functions)
  branches...: no data found
Reading data file test_bitcoin_coverage.info
Found 2062 entries.
Found common filename prefix "/Users/brunogarcia/projects/bitcoin-core-dev/build_cov/src"
Writing .css and .png files.
Generating output.
genhtml: ERROR: cannot read /Users/brunogarcia/projects/bitcoin-core-dev/build_cov/src/CMakeFiles/bitcoin-cli.dir/span.h
Processing file CMakeFiles/bitcoin-cli.dir/span.h
CMake Error at build_cov/Coverage.cmake:46 (execute_process):
  execute_process failed command indexes:

    1: "Child return code: 2"

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

master@0f9baba0fb6e55612f0b4b8d36f6deebe35b8a5f

Operating system and version

MacOS Sonoma 14.3

Machine specifications

Homebrew clang version 18.1.8
Target: arm64-apple-darwin23.3.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm@18/bin

Activity

  1. brunoerg commented on May 20, 2025

    @brunoerg
    ContributorAuthor

    It worked, sorry, missed that. Thank you.

  2. locked and limited conversation to collaborators on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions