unrecognized command line option '-std=c++20' #30297

issue techy2 opened this issue on June 18, 2024
  1. techy2 commented at 1:28 AM on June 18, 2024: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    building depends qt Project ERROR: Cannot run target compiler 'g++ -m64'. Output:

    Using built-in specs. COLLECT_GCC=g++ OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'? Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~18

    Expected behaviour

    expect it to build without errors Looks like a typo in the build script???

    Steps to reproduce

    git clone https://github.com/bitcoin/bitcoin cd bitcoin git tag git checkout v27.1 cd depends make -j10

    Relevant log output

    Project ERROR: Cannot run target compiler 'g++ -m64'. Output:

    Using built-in specs. COLLECT_GCC=g++ OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'? Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~18

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    v27.1

    Operating system and version

    ubuntu 18.04

    Machine specifications

    gcc 9.40 hp proliant server 24 cores 3.6ghz, 192 gig memory 2 T disk

  2. sipa commented at 1:34 AM on June 18, 2024: member

    You need a C++20 compiler to build Bitcoin Core 27.x. In particular, GCC 10.1 or Clang 14 are supported (see https://github.com/bitcoin/bitcoin/blob/v27.1/doc/dependencies.md).

  3. techy2 commented at 2:22 AM on June 18, 2024: none

    Ok

  4. techy2 closed this on Jun 18, 2024

  5. techy2 commented at 3:09 AM on June 18, 2024: none

    upgraded to gcc 10.3, all works now

  6. bitcoin locked this on Jun 18, 2025
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me