In file included from util/strencodings.cpp:6:0: fatal error: charconv: No such file. #23158

issue AndreyNag opened this issue on October 1, 2021
  1. AndreyNag commented at 7:42 PM on October 1, 2021: none

    Hello. I have a trouble.

    make[3]: выход из каталога «/usr/local/src/wallets/bitcoin» CXX util/libbitcoinconsensus_la-strencodings.lo CXX bitcoind-bitcoind.o In file included from util/strencodings.cpp:6:0: ./util/strencodings.h:15:10: fatal error: charconv: Нет такого файла или каталога #include <charconv> ^~~~~~~~~~ compilation terminated. Makefile:11830: recipe for target 'util/libbitcoinconsensus_la-strencodings.lo' failed make[2]: *** [util/libbitcoinconsensus_la-strencodings.lo] Error 1 make[2]: *** Ожидание завершения заданий… In file included from ./netaddress.h:19:0, from ./chainparams.h:11, from bitcoind.cpp:10: ./util/strencodings.h:15:10: fatal error: charconv: Нет такого файла или каталога #include <charconv> ^~~~~~~~~~ compilation terminated. What i have to do?

    Ubuntu 18.04 x64 noGUI

  2. AndreyNag added the label Bug on Oct 1, 2021
  3. fanquake removed the label Bug on Oct 2, 2021
  4. fanquake commented at 2:55 AM on October 2, 2021: member

    Ubuntu 18.04 What i have to do?

    Use a newer compiler, as per https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md.

    I assume you're using the GCC shipped with Ubuntu Bionic, which is GCC 7. As of #23060, that is not new enough to build master, GCC 8.1+ is required. You can apt install gcc-8 and use that.

  5. MarcoFalke commented at 6:16 AM on October 2, 2021: member

    clang-10 should also work: https://packages.ubuntu.com/bionic/clang-10

  6. MarcoFalke added the label Build system on Oct 2, 2021
  7. MarcoFalke added the label Questions and Help on Oct 2, 2021
  8. MarcoFalke added this to the milestone 23.0 on Oct 2, 2021
  9. AndreyNag commented at 12:34 PM on October 3, 2021: none

    Ubuntu 18.04 What i have to do?

    Use a newer compiler, as per https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md.

    I assume you're using the GCC shipped with Ubuntu Bionic, which is GCC 7. As of #23060, that is not new enough to build master, GCC 8.1+ is required. You can apt install gcc-8 and use that.

    Now i have installed: /usr/local/src/wallets/bitcoin# gcc

    gcc            gcc-6          gcc-9          gcc-ar-5       gcc-ar-8       gcc-nm-10      gcc-nm-7       gcc-ranlib     gcc-ranlib-6   gcc-ranlib-9
    gcc-10         gcc-7          gcc-ar         gcc-ar-6       gcc-ar-9       gcc-nm-5       gcc-nm-8       gcc-ranlib-10  gcc-ranlib-7
    gcc-5          gcc-8          gcc-ar-10      gcc-ar-7       gcc-nm         gcc-nm-6       gcc-nm-9       gcc-ranlib-5   gcc-ranlib-8
    

    But /usr/local/src/wallets/bitcoin# gcc --version

    gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.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.
    

    I have installed clang 6.0, 9 and 10. What i have to do to switch compiler to 10. Which configure option i have to switch? I have been compiling bitcoind for many years with such options on Ubuntu 16.04. CFLAGS="-Ofast -march=native -mtune=native -pipe -fPIE" CXXFLAGS="-Ofast -march=native -mtune=native -pipe -fPIE" LDFLAGS="-Ofast -march=native -mtune=native -pipe -fPIE" ./configure --without-miniupnpc --with-incompatible-bdb --without-gui --disable-tests

    Thank you for attention.

  10. hebasto commented at 12:46 PM on October 3, 2021: member

    Which configure option i have to switch?

    For example:

    $ ./configure CC=gcc-9 CXX=g++-9
    $ make
    
  11. jonatack commented at 1:03 PM on October 3, 2021: member

    I have installed clang 6.0, 9 and 10. What i have to do to switch compiler to 10. Which configure option i have to switch?

    update-alternatives might be handy

    https://azrael.digipen.edu/~mmead/www/mg/update-compilers/index.html

  12. AndreyNag commented at 9:28 AM on October 5, 2021: none

    Which configure option i have to switch?

    For example:

    $ ./configure CC=gcc-9 CXX=g++-9
    $ make
    

    Unfortunately CC="gcc-9" CXX="g++-9 -stdlib=libc++ -std=c++17" CFLAGS="-Ofast -march=native -mtune=native -pipe -fPIE" CXXFLAGS="-Ofast -march=native -mtune=native -pipe -fPIE" LDFLAGS="-Ofast -march=native -mtune=native -pipe -fPIE" ./configure --without-miniupnpc --with-incompatible-bdb --without-gui --disable-tests not works.

  13. MarcoFalke commented at 9:30 AM on October 5, 2021: member

    You can't set libc++ for g++.

    Either:

    CC="gcc-9" CXX="g++-9", or CC="clang-10" CXX="clang++-10 -stdlib=libc++"

  14. AndreyNag commented at 9:32 AM on October 5, 2021: none

    I have installed clang 6.0, 9 and 10. What i have to do to switch compiler to 10. Which configure option i have to switch?

    update-alternatives might be handy

    https://azrael.digipen.edu/~mmead/www/mg/update-compilers/index.html

    Current status /etc/alternatives:

    lrwxrwxrwx   1 root root    19 окт  3 15:19 c++ -> /usr/bin/clang++-10*
    lrwxrwxrwx   1 root root    14 окт  1 11:24 g++ -> /usr/bin/g++-9*
    lrwxrwxrwx   1 root root    14 окт  1 11:24 gcc -> /usr/bin/gcc-9*
    
    
  15. AndreyNag commented at 9:36 AM on October 5, 2021: none

    CC="gcc-9" CXX="g++-9" It's help to continue compiling. Happy end. Thank you for attention and for help!

  16. AndreyNag closed this on Oct 5, 2021

  17. DrahtBot locked this on Oct 30, 2022

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-17 00:14 UTC

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