-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Mon, 11 Jan 2016, Jonathan Wakely wrote: > Why 5.2.1 and not the 5.3 release? Project requirement. Same gcc on linux && aix. Since we use devtoolset 4 (gcc 5.2.1) on RHEL 6 we have to run the same version on AIX too. > Don't build in the source directory. I don't. There is a separate directory from where we run configure: tar -xjf gcc-5.2.1-20151104.tar.bz2 mkdir gcc-build-5.2.1 cd gcc-build-5.2.1 ../gcc-5.2.1-20151104/configure .... gmake ... > It shouldn't be necessary, but you might be able to work around this > by changing the #include at gcc/system.h:201 to > > #ifdef __cplusplus > extern "C++" { > # include <string> > } > #endif Works for gengenrtl.c but fail for genmodes.c. And this time is weird since system.h is already patched: /home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/./prev-gcc/xg++ - -B/home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/./prev-gcc/ - -B/opt/freeware/powerpc-ibm-aix7.1.0.0/bin/ -nostdinc++ -B/home/ gabriel/work/rpm/BUILD/gcc-build-5.2.1/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/src/.libs - -B/home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/libsup c++/.libs -isystem /home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/include/powerpc-ibm-aix7.1.0.0 - -isystem /home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/include -isystem /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/libsupc++ - -L/home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/src/.libs - -L/home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/libsupc++/.libs - -c -O2 -I/opt/freeware/include -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W - -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual - -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings - -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-5.2.1-20151104/gcc -I../../gcc-5.2.1-20151104/gcc/build - -I../../gcc-5.2.1-20151104/gcc/../include - -I../../gcc-5.2.1-20151104/gcc/../libcpp/include \ -o build/genmodes.o ../../gcc-5.2.1-20151104/gcc/genmodes.c In file included from /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stringfwd.h:40:0, from /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/std/string:39, from ../../gcc-5.2.1-20151104/gcc/system.h:202, from ../../gcc-5.2.1-20151104/gcc/genmddeps.c:19: /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/memoryfwd.h:63:3: error: template with C linkage template<typename> ^ /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/memoryfwd.h:66:3: error: template specialization with C linkage template<> ^ /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/memoryfwd.h:70:3: error: template with C linkage template<typename, typename> ^ In file included from /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/std/string:39:0, from ../../gcc-5.2.1-20151104/gcc/system.h:202, from ../../gcc-5.2.1-20151104/gcc/genmddeps.c:19: /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stringfwd.h:52:3: error: template with C linkage template<class _CharT> ^ /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stringfwd.h:55:3: error: template specialization with C linkage template<> struct char_traits<char>; ^ /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stringfwd.h:58:3: error: template specialization with C linkage template<> struct char_traits<wchar_t>; ^ /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stringfwd.h:69:3: error: template with C linkage template<typename _CharT, typename _Traits = char_traits<_CharT>, .... Thank you for your help. Sincerely, Gabriel - -- // Gabriel VLASIU // // OpenGPG-KeyID : 44952F15 // OpenGPG-Fingerprint: 4AC5 7C26 2FE9 02DA 4906 24B2 D32B 7ED7 4495 2F15 // OpenGPG-URL : http://www.vlasiu.net/public.key -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJWk8G1AAoJENMrftdElS8VHwEQAJAYWTJec/CdUOCn11LebLsa 9xB5M9ltg67og1o5d6ey+Xr5AixRI3Djqujwpftg1aRD57tbKRphpasog/PtwFZz TiyOkmXrpuqFxd91mLmU5HMPL5l5q/IL2FVWmATcgIv4vJyz+y1cd2ynWEr+wrBR XckIYdch5FMVLNhNib5r6YWafW/GmYz2+XMFgGGqSmjVQIfnEbSWRaBN6Pfs4wP/ PrtvOHGGxFu9jFMJrPgk/lAl9G2dgPur03Xvg/v40KTp8HUdrJPX+LBkg66TXPoX bAhLoLKBe9q06yg413cicbVGVFArrkcHPA+K75oVta8Jyl2twOyhmdhDXDXr7DE0 qq/ES5yfgmdzwN9JAfGcizyKeJJRRj6Xm/rfIugcw/nA18Fe1siDwGPqd9DR+bsZ 48/PPLyi9ZaE6VSk7ZWnllZCyXgg6O+GK1lz1aG3J7g1Up6TmceHlvHr0JIi4GEh QgU6lLBxp+JmlG85ev2/UoLuEWJOCLLBCozLk2sm/h8+gemuXB2Le3CwFcKHSan8 /xCwHYkqYDRAIlIyDKO25jkVD7CfeAjNgVh3PCPfw5YYqHmw4/SqUpDcXD76hpY5 +uzq9kYFHu6nZzkScz9tKnb1DsetzzwC+bmfxxcdkebMGrD8SjxcSIKr42FBn5ZN HDDWpRhyaqbwg4ClZW4v =OGbw -----END PGP SIGNATURE-----