Errors building mozilla thunderbird 38.7.0 with gcc 6

Daniel Letai dani@letai.org.il
Thu May 5 09:04:00 GMT 2016


I could be wrong but it appears there are 2 distinct errors - in gcc6 
itself (specifically in header files) and in thunderbird (although this 
version does compile with gcc 4.8.2)

Background - rebuilding the thunderbird 38.7.0 rpm (from redhat) using 
gcc6 and binutild 2.26 in RHEL 6.7

I'm wandering if this is a result of moving to std-14 as default and 
thus not a bug, or if there is some issue with stdlib.h/cstdlib ?

================================================

c++ -o Unified_cpp_gfx_graphite2_src0.o -c -I../../../dist/stl_wrappers 
-I../../../dist/system_wrappers -include 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/config/gcc_hidden.h 
-DGRAPHITE2_STATIC -DPACKAGE_VERSION='"moz"' 
-DPACKAGE_BUGREPORT='"http://bugzilla.mozilla.org/"' 
-DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_NSEGCACHE 
-DGRAPHITE2_CUSTOM_HEADER='"MozGrMalloc.h"' -DMOZ_GLUE_IN_PROGRAM 
-DAB_CD=en-US -DNO_NSPR_10_SUPPORT 
-I/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src 
-I.  -I../../../dist/include   -I/usr/include/nspr4 
-I/usr/include/nss3       -fPIC   -DMOZILLA_CLIENT -include 
../../../mozilla-config.h -MD -MP -MF 
.deps/Unified_cpp_gfx_graphite2_src0.o.pp  -Wall -Wempty-body 
-Woverloaded-virtual -Wsign-compare -Wwrite-strings 
-Wno-invalid-offsetof -Wcast-align -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 
-mtune=generic -fpermissive -Wformat-security -Wformat 
-Werror=format-security -fno-strict-aliasing -fno-exceptions 
-fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections 
-fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DNDEBUG 
-DTRIMMED -g -freorder-blocks -Os -fomit-frame-pointer 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/objdir/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp
Unified_cpp_gfx_graphite2_src1.o
In file included from ../../../dist/system_wrappers/stdlib.h:3:0,
                  from ../../../dist/include/mozilla/mozalloc.h:15,
                  from ../../../dist/stl_wrappers/cstdlib:39,
                  from 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/Main.h:29,
                  from 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/CmapCache.cpp:28,
                  from 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/objdir/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp:11:
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:38:12: error: 'std::abort' 
has not been declared
  using std::abort;
             ^~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:39:12: error: 
'std::atexit' has not been declared
  using std::atexit;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:40:12: error: 'std::exit' 
has not been declared
  using std::exit;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:43:14: error: 
'std::at_quick_exit' has not been declared
    using std::at_quick_exit;
               ^~~~~~~~~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:46:14: error: 
'std::quick_exit' has not been declared
    using std::quick_exit;
               ^~~~~~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:51:12: error: 'std::div_t' 
has not been declared
  using std::div_t;
             ^~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:52:12: error: 
'std::ldiv_t' has not been declared
  using std::ldiv_t;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:54:12: error: 'std::abs' 
has not been declared
  using std::abs;
             ^~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:55:12: error: 'std::atof' 
has not been declared
  using std::atof;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:56:12: error: 'std::atoi' 
has not been declared
  using std::atoi;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:57:12: error: 'std::atol' 
has not been declared
  using std::atol;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:58:12: error: 
'std::bsearch' has not been declared
  using std::bsearch;
             ^~~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:59:12: error: 
'std::calloc' has not been declared
  using std::calloc;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:60:12: error: 'std::div' 
has not been declared
  using std::div;
             ^~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:61:12: error: 'std::free' 
has not been declared
  using std::free;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:62:12: error: 
'std::getenv' has not been declared
  using std::getenv;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:63:12: error: 'std::labs' 
has not been declared
  using std::labs;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:64:12: error: 'std::ldiv' 
has not been declared
  using std::ldiv;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:65:12: error: 
'std::malloc' has not been declared
  using std::malloc;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:67:12: error: 'std::mblen' 
has not been declared
  using std::mblen;
             ^~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:68:12: error: 
'std::mbstowcs' has not been declared
  using std::mbstowcs;
             ^~~~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:69:12: error: 
'std::mbtowc' has not been declared
  using std::mbtowc;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:71:12: error: 'std::qsort' 
has not been declared
  using std::qsort;
             ^~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:72:12: error: 'std::rand' 
has not been declared
  using std::rand;
             ^~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:73:12: error: 
'std::realloc' has not been declared
  using std::realloc;
             ^~~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:74:12: error: 'std::srand' 
has not been declared
  using std::srand;
             ^~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:75:12: error: 
'std::strtod' has not been declared
  using std::strtod;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:76:12: error: 
'std::strtol' has not been declared
  using std::strtol;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:77:12: error: 
'std::strtoul' has not been declared
  using std::strtoul;
             ^~~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:78:12: error: 
'std::system' has not been declared
  using std::system;
             ^~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:80:12: error: 
'std::wcstombs' has not been declared
  using std::wcstombs;
             ^~~~~~~~
/opt/gnu/gcc/6.1.1/include/c++/6.1.1/stdlib.h:81:12: error: 
'std::wctomb' has not been declared
  using std::wctomb;
             ^~~~~~
In file included from 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/objdir/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp:20:0:
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/Code.cpp:85:12: 
warning: 'graphite2::vm::Machine::Code::decoder::analysis' has a field 
'graphite2::vm::Machine::Code::decoder::analysis::contexts' whose type 
uses the anonymous namespace [-Wsubobject-linkage]
      struct analysis
             ^~~~~~~~
In file included from 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/NameTable.cpp:31:0,
                  from 
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/objdir/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp:119:
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h: 
In instantiation of 'graphite2::_utf_iterator<C>& 
graphite2::_utf_iterator<C>::operator++() [with C = const short unsigned 
int]':
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/NameTable.cpp:172:90: 
required from here
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h:182:46: 
error: invalid operands of types 'const short unsigned int*' and 
'__gnu_cxx::__enable_if<true, double>::__type {aka double}' to binary 
'operator+'
      _utf_iterator   & operator ++ ()    { cp += abs(sl); return *this; }
                                            ~~~^~~~~~~~~~
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h:182:46: 
error:   in evaluation of 'operator+=(const short unsigned int*, 
__gnu_cxx::__enable_if<true, double>::__type {aka double})'
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h: 
In instantiation of 'graphite2::_utf_iterator<C>& 
graphite2::_utf_iterator<C>::operator++() [with C = unsigned char]':
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/NameTable.cpp:172:95: 
required from here
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h:182:46: 
error: invalid operands of types 'unsigned char*' and 
'__gnu_cxx::__enable_if<true, double>::__type {aka double}' to binary 
'operator+'
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h:182:46: 
error:   in evaluation of 'operator+=(unsigned char*, 
__gnu_cxx::__enable_if<true, double>::__type {aka double})'
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h: 
In instantiation of 'graphite2::_utf_iterator<C>& 
graphite2::_utf_iterator<C>::operator++() [with C = unsigned int]':
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/NameTable.cpp:193:95: 
required from here
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h:182:46: 
error: invalid operands of types 'unsigned int*' and 
'__gnu_cxx::__enable_if<true, double>::__type {aka double}' to binary 
'operator+'
/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/mozilla/gfx/graphite2/src/inc/UtfCodec.h:182:46: 
error:   in evaluation of 'operator+=(unsigned int*, 
__gnu_cxx::__enable_if<true, double>::__type {aka double})'
make[4]: *** [Unified_cpp_gfx_graphite2_src0.o] Error 1
make[4]: Leaving directory 
`/home/il872011/rpmbuild/BUILD/thunderbird-38.7.0/comm-esr38/objdir/gfx/graphite2/src'
make[3]: *** [gfx/graphite2/src/target] Error 2



More information about the Gcc-help mailing list