0

当我尝试构建 google-breakpad 时遇到问题。我正在使用 Centos 7(内核:Linux 3.10.0-1160.45.1.el7.x86_64)。我不能做..你能帮帮我吗?(在日志下方... make 2>&1 | tee make.txt)。我不知道如何解决这些错误,我相信我的 gcc 太旧了(可能是 ? gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44))。谢谢 :)

。/配置

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-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... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking a.out.h usability... yes
checking a.out.h presence... yes
checking for a.out.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/random.h usability... no
checking sys/random.h presence... no
checking for sys/random.h... no
checking for arc4random... no
checking for getcontext... yes
checking for getrandom... no
checking for memfd_create... no
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking whether C++ compiler accepts -Werror=unknown-warning-option... no
checking whether C++ compiler accepts -Wmissing-braces... yes
checking whether C++ compiler accepts -Wnon-virtual-dtor... yes
checking whether C++ compiler accepts -Woverloaded-virtual... yes
checking whether C++ compiler accepts -Wreorder... yes
checking whether C++ compiler accepts -Wsign-compare... yes
checking whether C++ compiler accepts -Wunused-local-typedefs... yes
checking whether C++ compiler accepts -Wunused-variable... yes
checking whether C++ compiler accepts -Wvla... yes
checking for O_CLOEXEC defined in fcntl.h... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating breakpad.pc
config.status: creating breakpad-client.pc
config.status: creating Makefile
config.status: creating src/config.h
config.status: executing depfiles commands

使-j4

depbase=`echo src/processor/microdump_stackwalk.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -Wmissing-braces -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-compare -Wunused-local-typedefs -Wunused-variable -Wvla -Werror -fPIC -g -O2 -std=c++11 -MT src/processor/microdump_stackwalk.o -MD -MP -MF $depbase.Tpo -c -o src/processor/microdump_stackwalk.o src/processor/microdump_stackwalk.cc &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/common/path_helper.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -Wmissing-braces -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-compare -Wunused-local-typedefs -Wunused-variable -Wvla -Werror -fPIC -g -O2 -std=c++11 -MT src/common/path_helper.o -MD -MP -MF $depbase.Tpo -c -o src/common/path_helper.o src/common/path_helper.cc &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/processor/basic_code_modules.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -Wmissing-braces -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-compare -Wunused-local-typedefs -Wunused-variable -Wvla -Werror -fPIC -g -O2 -std=c++11 -MT src/processor/basic_code_modules.o -MD -MP -MF $depbase.Tpo -c -o src/processor/basic_code_modules.o src/processor/basic_code_modules.cc &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/processor/basic_source_line_resolver.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -Wmissing-braces -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-compare -Wunused-local-typedefs -Wunused-variable -Wvla -Werror -fPIC -g -O2 -std=c++11 -MT src/processor/basic_source_line_resolver.o -MD -MP -MF $depbase.Tpo -c -o src/processor/basic_source_line_resolver.o src/processor/basic_source_line_resolver.cc &&\
mv -f $depbase.Tpo $depbase.Po
src/processor/basic_source_line_resolver.cc: In member function ‘bool google_breakpad::BasicSourceLineResolver::Module::ParseInlineOrigin(char*)’:
src/processor/basic_source_line_resolver.cc:427:79: error: no matching function for call to ‘std::map<int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> >::insert(std::pair<long int, google_breakpad::SourceLineResolverBase::InlineOrigin*>)’
     inline_origins_.insert(make_pair(origin_id, new InlineOrigin(origin_name)));
                                                                               ^
src/processor/basic_source_line_resolver.cc:427:79: note: candidates are:
In file included from /usr/include/c++/4.8.2/map:61:0,
                 from src/processor/basic_source_line_resolver.cc:42:
/usr/include/c++/4.8.2/bits/stl_map.h:594:7: note: std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Tp = google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree_iterator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> >]
       insert(const value_type& __x)
       ^
/usr/include/c++/4.8.2/bits/stl_map.h:594:7: note:   no known conversion for argument 1 from ‘std::pair<long int, google_breakpad::SourceLineResolverBase::InlineOrigin*>’ to ‘const value_type& {aka const std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> >&}’
/usr/include/c++/4.8.2/bits/stl_map.h:602:9: note: template<class _Pair, class> std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(_Pair&&) [with _Pair = _Pair; <template-parameter-2-2> = <template-parameter-1-2>; _Key = int; _Tp = google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >]
         insert(_Pair&& __x)
         ^
/usr/include/c++/4.8.2/bits/stl_map.h:602:9: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8.2/bits/stl_map.h:598:32: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
       template<typename _Pair, typename = typename
                                ^
/usr/include/c++/4.8.2/bits/stl_map.h:615:7: note: void std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::initializer_list<std::pair<const _Key, _Tp> >) [with _Key = int; _Tp = google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >]
       insert(std::initializer_list<value_type> __list)
       ^
/usr/include/c++/4.8.2/bits/stl_map.h:615:7: note:   no known conversion for argument 1 from ‘std::pair<long int, google_breakpad::SourceLineResolverBase::InlineOrigin*>’ to ‘std::initializer_list<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >’
/usr/include/c++/4.8.2/bits/stl_map.h:644:7: note: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = int; _Tp = google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> >]
       insert(const_iterator __position, const value_type& __x)
       ^
/usr/include/c++/4.8.2/bits/stl_map.h:644:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/4.8.2/bits/stl_map.h:655:9: note: template<class _Pair, class> std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, _Pair&&) [with _Pair = _Pair; <template-parameter-2-2> = <template-parameter-1-2>; _Key = int; _Tp = google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >]
         insert(const_iterator __position, _Pair&& __x)
         ^
/usr/include/c++/4.8.2/bits/stl_map.h:655:9: note:   template argument deduction/substitution failed:
src/processor/basic_source_line_resolver.cc:427:79: note:   cannot convert ‘std::make_pair<long int&, google_breakpad::SourceLineResolverBase::InlineOrigin*>((* & origin_id), (* &((* & std::basic_string<char>(((const char*)origin_name), (*(const std::allocator<char>*)(& std::allocator<char>())))), (operator new(8ul), (<statement>, ((google_breakpad::SourceLineResolverBase::InlineOrigin*)<anonymous>))))))’ (type ‘std::pair<long int, google_breakpad::SourceLineResolverBase::InlineOrigin*>’) to type ‘std::map<int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >}’
     inline_origins_.insert(make_pair(origin_id, new InlineOrigin(origin_name)));
                                                                               ^
In file included from /usr/include/c++/4.8.2/map:61:0,
                 from src/processor/basic_source_line_resolver.cc:42:
/usr/include/c++/4.8.2/bits/stl_map.h:670:9: note: template<class _InputIterator> void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Tp = google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, google_breakpad::linked_ptr<google_breakpad::SourceLineResolverBase::InlineOrigin> > >]
         insert(_InputIterator __first, _InputIterator __last)
         ^
/usr/include/c++/4.8.2/bits/stl_map.h:670:9: note:   template argument deduction/substitution failed:
src/processor/basic_source_line_resolver.cc:427:79: note:   candidate expects 2 arguments, 1 provided
     inline_origins_.insert(make_pair(origin_id, new InlineOrigin(origin_name)));
                                                                               ^
make: *** [src/processor/basic_source_line_resolver.o] Errore 1
4

0 回答 0