$ configure --enable-languages=c,c++ --with-ld=/bin/ld --with-as=/bin/as $ make leads to: In file included from .../obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/include/cctype:50, from .../gcc-4.2.0/libstdc++-v3/include/precompiled/stdc++.h:38: .../obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/include/powerpc-ibm-aix5.2.0.0/bits/c++config.h:1087:2: error: #endif without #if While doing: make[4]: Entering directory `/pdv/.ws/jrichter/gcc420/obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/include' sed: 0602-429 No editing script was provided. Usage: sed [-n] Script [File ...] sed [-n] [-e Script] ... [-f Script_file] ... [File ...] if [ ! -d "./powerpc-ibm-aix5.2.0.0/bits/stdc++.h.gch" ]; then \ mkdir -p ./powerpc-ibm-aix5.2.0.0/bits/stdc++.h.gch; \ fi; \ /ws/jrichter/gcc420/obj/./gcc/xgcc -shared-libgcc -B/ws/jrichter/gcc420/obj/./gcc -nostdinc++ -L/ws/jrichter/gcc420/obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/src -L/ws/jrichter/gcc420/obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/src/.libs -B/usr/local/powerpc-ibm-aix5.2.0.0/bin/ -B/usr/local/powerpc-ibm-aix5.2.0.0/lib/ -isystem /usr/local/powerpc-ibm-aix5.2.0.0/include -isystem /usr/local/powerpc-ibm-aix5.2.0.0/sys-include -Winvalid-pch -Wno-deprecated -x c++-header -g -O2 -I/ws/jrichter/gcc420/obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/include/powerpc-ibm-aix5.2.0.0 -I/ws/jrichter/gcc420/obj/powerpc-ibm-aix5.2.0.0/libstdc++-v3/include -I/ws/jrichter/gcc420/gcc-4.2.0/libstdc++-v3/libsupc++ -O0 -g /ws/jrichter/gcc420/gcc-4.2.0/libstdc++-v3/include/precompiled/stdc++.h -o powerpc-ibm-aix5.2.0.0/bits/stdc++.h.gch/O0g.gch the file .../powerpc-ibm-aix5.2.0.0/libstdc++-v3/include/powerpc-ibm-aix5.2.0.0/bits/c++config.h has as the last line: #endif // _CXXCONFIG_ but no corresponding #ifndef/#define lines of his header guard
AIX/sed doesn't allow sed -e ''. Can't currently attach patches. Here is it inline: --- libstdc++-v3/include/Makefile.in.old 2007-05-30 10:03:19.000000000 +0200 +++ libstdc++-v3/include/Makefile.in 2007-05-30 10:06:03.000000000 +0200 @@ -1372,7 +1372,7 @@ @date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\ nsa_version=`cat stamp-namespace-version` ;\ visibility=`cat stamp-visibility` ;\ - ldbl_compat='' ;\ + ldbl_compat='s,g,g,g' ;\ grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \ ${CONFIG_HEADER} > /dev/null 2>&1 \ && ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\
How is it that this tester can build on this target, and not you? http://gcc.gnu.org/ml/gcc-testresults/2007-06/msg00309.html I don't see a mention of AIX limitations for sed here: http://gcc.gnu.org/install/specific.html#x-ibm-aix -benjamin
Well, $ which sed /usr/bin/sed $ /usr/bin/sed -e '' sed: 0602-429 No editing script was provided. Usage: sed [-n] Script [File ...] sed [-n] [-e Script] ... [-f Script_file] ... [File ...] Can it be that everyone else is using GNU-sed?
Any chance that this gets fixed with 4.2.1? This is the only thing on AIX that prevents an unpatched bootstrap. Or perhaps its only missing documentation that GNU sed must be used.
David, can you have a quick look at this issue? Thanks.
I use GNU Sed. If we need to add that as a requirement, so be it.
Using "s,g,g," or "s,^,," or even "b" as the default sed command doesn't seem to bad to me.
Thanks David and Paolo. Ok, I'm sanity checking 's,g,g,' on linux...
I think the last g in 's,g,g,g' is the important one.
It isn't, as explained by Paolo off-line (by the way Paolo maintains GNU sed), essentially the same string is used in other projects to work around that AIX problem.
Actually any no-op command would do, I think even "b" would be ok unless it triggers other bugs. In particular, replacing one g with a g, or all g's with g's, should not matter. :-)
Of course, you are right. :) Just want to confirm, that all "s,g,g," and "s,^,," and "b" seem to work fine with AIX-sed.
Subject: Bug 31957 Author: paolo Date: Thu Jul 5 11:45:24 2007 New Revision: 126362 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126362 Log: 2007-07-05 Joerg Richter <joerg.richter@pdv-fs.de> PR libstdc++/31957 * include/Makefile.am: Work around an AIX sed oddity. * include/Makefile.in: Regenerate. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/Makefile.am trunk/libstdc++-v3/include/Makefile.in
Subject: Bug 31957 Author: paolo Date: Thu Jul 5 11:46:00 2007 New Revision: 126363 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126363 Log: 2007-07-05 Joerg Richter <joerg.richter@pdv-fs.de> PR libstdc++/31957 * include/Makefile.am: Work around an AIX sed oddity. * include/Makefile.in: Regenerate. Modified: branches/gcc-4_2-branch/libstdc++-v3/ChangeLog branches/gcc-4_2-branch/libstdc++-v3/include/Makefile.am branches/gcc-4_2-branch/libstdc++-v3/include/Makefile.in
Fixed for 4.2.1.