On Mon, Jan 11, 2016 at 6:48 AM, Gabriel VLASIU <gabriel@xxxxxxxxxx> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi. > > I'm trying to build gcc 5.2.1 on AIX (7.1). > > I manage to build gcc using ./configure .... && make. > > But I cannot build-it using --enable-bootstrap configure option and then > "make bootstrap-lean". The build process always stop with this kind of > errors (lots of them): > > /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/libsupc++/.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/gengenrtl.o ../../gcc-5.2.1-20151104/gcc/gengenrtl.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:201, > from ../../gcc-5.2.1-20151104/gcc/genconstants.c:28: > /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:201, > from ../../gcc-5.2.1-20151104/gcc/genconstants.c:28: > /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>; > > > <lots of "error: template with C linkage" errors here> > > /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stl_algo.h:5481:3: > error: template with C linkage > template<typename _ForwardIterator, typename _Compare> > ^ > Makefile:2429: recipe for target 'build/genconstants.o' failed > gmake[3]: *** [build/genconstants.o] Error 1 > /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stl_algo.h:5502:3: > error: template with C linkage > template<typename _ForwardIterator> > ^ > gmake[3]: *** Waiting for unfinished jobs.... > /home/gabriel/work/rpm/BUILD/gcc-5.2.1-20151104/libstdc++-v3/include/bits/stl_algo.h:5526:3: > error: template with C linkage > template<typename _ForwardIterator, typename _Compare> > ^ > Makefile:2429: recipe for target 'build/gengenrtl.o' failed > gmake[3]: *** [build/gengenrtl.o] Error 1 > /opt/freeware/bin/bash ../../gcc-5.2.1-20151104/gcc/../move-if-change tmp-optionlist optionlist > echo timestamp > s-options > rm cpp.pod gcov-tool.pod fsf-funding.pod gcc.pod gcov.pod gfortran.pod gfdl.pod > gmake[3]: Leaving directory '/home/gabriel/work/rpm/BUILD/gcc-build-5.2.1/gcc' > Makefile:4411: recipe for target 'all-stage2-gcc' failed > gmake[2]: *** [all-stage2-gcc] Error 2 > gmake[2]: Leaving directory '/home/gabriel/work/rpm/BUILD/gcc-build-5.2.1' > Makefile:18063: recipe for target 'stage2-bubble' failed > gmake[1]: *** [stage2-bubble] Error 2 > gmake[1]: Leaving directory '/home/gabriel/work/rpm/BUILD/gcc-build-5.2.1' > Makefile:18277: recipe for target 'bootstrap-lean' failed > gmake: *** [bootstrap-lean] Error 2 > > > The ./configure looks like this: > > cd gcc-build-%{version} > CC=gcc \ > CXX=g++ \ > BOOT_CFLAGS='-O2 -I/opt/freeware/include' \ > CFLAGS='-O2 -I/opt/freeware/include' \ > CXXFLAGS='-O2 -I/opt/freeware/include' \ > LIBCFLAGS='-O2 -I/opt/freeware/include' \ > LIBCXXFLAGS='-O2 -I/opt/freeware/include -fno-implicit-templates' \ > LDFLAGS="-L/opt/freeware/lib -Wl,-bbigtoc > - -Wl,-blibpath:/opt/freeware/lib/gcc/%{buildhost}/%{version}:/opt/freeware/lib:/usr/lib:/lib > - -Wl,-bmaxdata:0x80000000" \ > ../%{name}-%{version}-%{DATE}/configure \ > --with-as=/usr/bin/as \ > --with-ld=/usr/bin/ld \ > --enable-languages="c,c++,fortran" \ > --prefix=%{_prefix} \ > --mandir=%{_mandir} \ > --infodir=%{_infodir} \ > --enable-version-specific-runtime-libs \ > --disable-nls \ > --enable-decimal-float=dpd \ > --build=powerpc-ibm-aix7.2.0.0 \ > --enable-checking=release \ > --enable-bootstrap > > and "make" like this: > > gmake -j 4 \ > BOOT_CFLAGS='-O2 -I/opt/freeware/include' \ > CFLAGS='-O2 -I/opt/freeware/include' \ > CXXFLAGS='-O2 -I/opt/freeware/include' \ > LIBCFLAGS='-O2 -I/opt/freeware/include' \ > LIBCXXFLAGS='-O2 -I/opt/freeware/include -fno-implicit-templates' \ > LDFLAGS="-L/opt/freeware/lib -Wl,-bbigtoc -Wl,-blibpath:/opt/freeware/lib/gcc/%{buildhost}/%{version}:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" \ > bootstrap-lean > > So, can anyone help with the above errors? Thank you. > > > 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----- > > iQIcBAEBCgAGBQJWk6S2AAoJENMrftdElS8VYswP/2jdgV+wx+dRScbLC11CofxF > Yi800xb+NUXWCDV1QBkLF4KPHXIlGGi26T0av30FfC7OQKav1T3qKmTXTzKlpZs1 > J2Mlq9g0UrXwcORd1+8A8FRVo4+N7s21tYJ/mTZ6L7DhjPV6wHPtB6B6PMESWpWr > 9Epo0N7m3DrjCCggnzk5U6g4Kfi4UkbKiHSK7+1330glIw30AhLcxue7exkquEjd > z18S41lvb3TJz8FNIbxY6SJcdoz082iX8wHH/TQ+m7iRwiccSS7dKSzSQTcUbQ/C > OpwNZy/F//5fCmo7TLOu1dfMNDLXd0NrAPuJd9/M+dk637JYheFFOcZghQOEt47t > jGUBuiFEBst0zDFmR1o+VgUIVJtLtyIdRcNb1/AMjpahMMLYTfVbIfdVl/yCUDYN > r1dMSl0tvC/8hDt0bsw+pGbS+icOUO/HJ6ENVIRetjQ+cVDqq3gO18YgnPmV8MnB > iCAyDmQVWLxiuwIS60lys10vbtHIy5L0zbOjrJ+0SuyZYsE69iLLV2U8rt+UWqUa > SFcGzJQFwkjLyieYHjEiO2geuidDh3YG0qteW973CUJX3SJBlVvCaPwflqJXlrtV > qBvq11TEehzTAoXK2U1eNEOSrayTw67wOudllKxaIcPUdLJlCiu9a0s5q2XU9zIL > 2xFeCSd90KtWgLXcdPJ/ > =4XiP > -----END PGP SIGNATURE----- Hi have you try this one : http://wiki.osdev.org/Building_GCC Regards Victor Rodriguez