With GCC 6.1.0, "the default, if no C++ language dialect options are given, is -std=gnu++14"
C++ code in some packages is not C++14 compatible. Adding the option -std=gnu++03 to the CXXFLAGS environment variable lets almost everything compile fine, except the singular-3.1.7p1.p1 package. The relevant error message ist: g++ -LDownloads/tmp/sage-7.1/local/lib -Wl,-rpath,Downloads/tmp/sage-7.1/local/lib -march=native -O3 -g -pipe -fno-implicit-templates -I. -I.. -IDownloads/tmp/sage-7.1/local -IDownloads/tmp/sage-7.1/local/include -IDownloads/tmp/sage-7.1/local/include -IDownloads/tmp/sage-7.1/local/include -Dx86_64_Linux -DHAVE_CONFIG_H -DDL_TAIL=\"sog\" -c mod_raw.cc -o mod_raw.og mod_raw.cc: In function 'lib_types type_of_LIB(char*, char*)': mod_raw.cc:41:45: error: narrowing conversion of '254' from 'int' to 'char' inside { } [-Wnarrowing] const char mach_o[]={0xfe,0xed,0xfa,0xce,0}; ^ mod_raw.cc:41:45: error: narrowing conversion of '237' from 'int' to 'char' inside { } [-Wnarrowing] mod_raw.cc:41:45: error: narrowing conversion of '250' from 'int' to 'char' inside { } [-Wnarrowing] mod_raw.cc:41:45: error: narrowing conversion of '206' from 'int' to 'char' inside { } [-Wnarrowing] mod_raw.cc:42:52: error: narrowing conversion of '206' from 'int' to 'char' inside { } [-Wnarrowing] const char mach_o_module[]={0xce,0xfa,0xed,0xfe,0}; ^ mod_raw.cc:42:52: error: narrowing conversion of '250' from 'int' to 'char' inside { } [-Wnarrowing] mod_raw.cc:42:52: error: narrowing conversion of '237' from 'int' to 'char' inside { } [-Wnarrowing] mod_raw.cc:42:52: error: narrowing conversion of '254' from 'int' to 'char' inside { } [-Wnarrowing] Makefile:383: recipe for target 'mod_raw.og' failed So mod_raw.cc is falsely compiled as C++14. The Makefile for the singular package defines several variables containing flags: CXXFLAGS = -O2 -g -march=native -O3 -std=gnu++03 -fPIC ${PIPE} CXXFLAGSG = -g ${PIPE} CXXFLAGSP = -g -pg -O ${PIPE} The dialect option is not included in the CXXFLAGSG variable and apparently it's the one used for compilation. Setting export SAGE_DEBUG=no had no effect, still the debug version was compiled. The same CPPFLAGS variable is used for all targets, but setting it to '-std=gnu++03' caused configure to fail for that package. Adjusting the sage-7.1/local/var/tmp/sage/build/singular-3.1.7p1.p1/src/latest/kernel/Makefile.in" to be CXXFLAGSG = @CXXFLAGS@ -g ${PIPE} did not work, as this file too is being overwritten and patched and it's hard to see how it's done. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.