I am trying to build the breakpad libraries based on the documentation from https://chromium.googlesource.com/breakpad/breakpad/ but when I execute ./configure && make,I get an error when checking for c++11, even though I am currently able to compile with c++11.

Here is the output from ./configure:

checking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... nochecking for mawk... mawkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking whether UID '0' is supported by ustar format... yeschecking whether GID '0' is supported by ustar format... yeschecking how to create a ustar tar archive... gnutarchecking whether to enable maintainer-specific portions of Makefiles... nochecking for style of include used by make... GNUchecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking whether gcc understands -c and -o together... yeschecking dependency style of gcc... gcc3checking for ar... archecking the archiver (ar) interface... archecking dependency style of gcc... gcc3checking for gcc... (cached) gccchecking whether we are using the GNU C compiler... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking for gcc option to accept ISO C89... (cached) none neededchecking whether gcc understands -c and -o together... (cached) yeschecking dependency style of gcc... (cached) gcc3checking how to run the C preprocessor... gcc -Echecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking dependency style of g++... gcc3checking for ranlib... ranlibchecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for special C compiler options needed for large files... nochecking for _FILE_OFFSET_BITS value needed for large files... nochecking for the pthreads library -lpthreads... nochecking whether pthreads work without any flags... nochecking whether pthreads work with -Kthread... nochecking whether pthreads work with -kthread... nochecking for the pthreads library -llthread... nochecking whether pthreads work with -pthread... yeschecking for joinable pthread attribute... PTHREAD_CREATE_JOINABLEchecking if more special flags are required for pthreads... nochecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking a.out.h usability... yeschecking a.out.h presence... yeschecking for a.out.h... yeschecking whether g++ supports C++11 features by default... nochecking whether g++ supports C++11 features with -std=c++11... nochecking whether g++ supports C++11 features with -std=c++0x... nochecking whether g++ supports C++11 features with +std=c++11... nochecking whether g++ supports C++11 features with -h std=c++11... noconfigure: error: *** A compiler with support for C++11 language features is required.

Here is the output from g++ --version:

g++ (Debian 4.7.2-5) 4.7.2Copyright (C) 2012 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And here is a sample application compiling with c++11:

g++ -std=c++11 -g -c -pedantic -Wall -Wextra -I../boost_1_57_0 -L../boost_1_57_0/stage/lib UtilsText.cpp -o UtilsText.og++ -std=c++11 -g -c -pedantic -Wall -Wextra -I../boost_1_57_0 -L../boost_1_57_0/stage/lib UtilsWeb.cpp -o UtilsWeb.og++ -std=c++11 -g -c -pedantic -Wall -Wextra -I../boost_1_57_0 -L../boost_1_57_0/stage/lib WorkElement.cpp -o WorkElement.o

I don't know why breakpad is complaining about my g++ not having support for c++11, or if there is a way I can override or add extra parameters so that it correctly detects my compiler.

Any hints on what I might be missing or doing wrong? Is breakpad using another gcc that might be installed in my system?

Here is the config.log file: http://pastebin.com/TuHrmiLv

3

Best Answer


maybe you need this,work for me

yum install gcc-c++

While GCC 4.7 does have some C++11 capabilities, it is severely lacking most of the features needed. So while the configure script uses the correct option to enable C++11, the compiler can't actually handle the test-program because it uses features not available in the old GCC 4.7 version you have.

If you want to use Breakpad you need either an older version of Breakpad that supports your old compiler, or you need to update your compiler to a more recent release. The 5 series should have full support for C++11.

For Fedora use:

sudo dnf install gcc-c++