configure: *error: * A compiler with support for C++11 language features is required.*** #8630

issue CannotCompileBitcoinOnDebian opened this issue on August 31, 2016
  1. CannotCompileBitcoinOnDebian commented at 2:04 AM on August 31, 2016: none

    Hi!

    I am trying to compile bitcoin from scratch which for some reason does not work as well as it used to when I compiled v0.12 a few months ago. This whole Berkley compatible-thingy have always been a strange thing. I am not sure I even use the command. Would appreicate a lot if a solid guide would be put up online at Github or so, created by Linux pros :+1: :) It should be much easier than it is today to compile bitcoin from source.

    This is how it looks like.

    /home/bitcoin-0.13# ./configure --enable-hardening CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... yes checking whether make supports nested variables... yes checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking for g++... g++ checking whether we are using the GNU Objective C++ compiler... no checking whether g++ accepts -g... no checking whether g++ supports C++11 features by default... no checking whether g++ supports C++11 features with -std=c++11... no checking whether g++ supports C++11 features with -std=c++0x... no checking whether g++ supports C++11 features with +std=c++11... no checking whether g++ supports C++11 features with -h std=c++11... no configure: error: *** A compiler with support for C++11 language features is required. /home/bitcoin-0.13#

    gcc --version gcc (Debian 4.7.2-5) 4.7.2 Copyright (C) 2012 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.

    g++ --version g++ (Debian 4.7.2-5) 4.7.2 Copyright (C) 2012 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.

    How do I solve this?! Thanks a ton in advance.

  2. CannotCompileBitcoinOnDebian commented at 7:41 AM on August 31, 2016: none

    Compiling v0.12 works without this error message. But would love to try 0.13 out. Anyone has aaany idea how to bypass this?

  3. jonasschnelli commented at 7:55 AM on August 31, 2016: contributor

    0.13 requires C++11 (where 0.12 does not). It looks like, that you gcc does not support it (although I thought 4.7 supports C++11). You should probably try to upgrade gcc.

  4. jonasschnelli added the label Build system on Aug 31, 2016
  5. laanwj commented at 1:31 PM on September 1, 2016: member

    Your compiler doesn't support C++11. C++11 support is a requirement since version 0.13, quoting the release notes:

    Various code modernizations have been done. The Bitcoin Core code base has started using C++11. This means that a C++11-capable compiler is now needed for building. Effectively this means GCC 4.7 or higher, or Clang 3.3 or higher.

    When cross-compiling for a target that doesn't have C++11 libraries, configure with ./configure --enable-glibc-back-compat ... LDFLAGS=-static-libstdc++.

    The suggestion would be to use the executables from bitcoin.org, or upgrade your compiler, or cross-compile on another machine with a newer compiler.

  6. laanwj closed this on Sep 1, 2016

  7. jcomeauictx commented at 3:38 AM on January 23, 2018: none

    "Effectively this means GCC 4.7 or higher"... the OP stated he's using 4.7.2, as am I. so what version really is good enough?

  8. fanquake commented at 3:41 AM on January 23, 2018: member

    The current minimum required version of GCC is 4.8. See dependencies.

  9. jcomeauictx commented at 3:45 AM on January 23, 2018: none

    thanks, man!

  10. fanquake locked this on Jan 23, 2018

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-05-01 15:15 UTC

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