pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bootstrap failure with gcc53 for 2015Q4 on linux, aix



I'm getting a bootstrap failure with gcc53 on linux and aix for
2015Q4.  The failure is during the build of ksh.  Here's the error:

creating ./config.status
creating Makefile
creating config.h
./emacs-gen.sh ./emacs.c > tmpemacs.out
mv tmpemacs.out emacs.out
./mkman ksh ./ksh.Man > tmpksh.1
mv tmpksh.1 ksh.1
CONFIG_FILES="" CONFIG_HEADERS=config.h ./config.status
creating config.h
config.h is unchanged
date > stamp-h
./siglist.sh "gcc -E  -DHAVE_CONFIG_H -I. -I." < ./siglist.in > tmpsiglist.out
*** [siglist.out] Error code 1

bmake: stopped in /home/pkgsrc/test-pkgsrc-2015Q4/bootstrap/work/ksh
1 error

bmake: stopped in /home/pkgsrc/test-pkgsrc-2015Q4/bootstrap/work/ksh
===> exited with status 2
aborted.



The problem is that siglist.sh creates a tmpfile that contains the
output of gcc -E, and it expects to find lines that look like this:

 { QwErTy .signal =                    1                           ,
.name = "HUP", .mess = "Hangup" },
 { QwErTy .signal =                    2                           ,
.name = "INT", .mess = "Interrupt" },
 { QwErTy .signal =                    3                            ,
.name = "QUIT", .mess = "Quit" },
 { QwErTy .signal =                    4                           ,
.name = "ILL", .mess = "Illegal instruction" },
 { QwErTy .signal =                    5                            ,
.name = "TRAP", .mess = "Trace trap" },


But gcc53 puts some linebreaks in each entry.  For example, the HUP
line from above looks like this when gcc53 is used:

 { QwErTy .signal =
# 4 "tmpi9240728.c" 3 4
                   1
# 4 "tmpi9240728.c"
                          , .name = "HUP", .mess = "Hangup" },



I've attached a patch that adds a bit of awk to siglist.sh to put the
multiline gcc53 output back into a single line.  If the gcc output is
already a single line, like for gcc48, the result is the same as
before.
Index: siglist.sh
===================================================================
RCS file: /cvsroot/pkgsrc/shells/pdksh/files/siglist.sh,v
retrieving revision 1.3
diff -u -r1.3 siglist.sh
--- siglist.sh	23 Jan 2011 17:29:30 -0000	1.3
+++ siglist.sh	30 Jan 2016 03:28:15 -0000
@@ -23,7 +23,14 @@
 	{ QwErTy .signal = SIG\1 , .name = "\1", .mess = "\2" },\
 #endif/') > $in
 $CPP $in  > $out
-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k 5n -k 1n |
+awk '/{ QwErTy/ {
+        line = $0;
+        while (line !~ /}/) {
+                getline tmp;
+                if (tmp !~ "^#") line = (line tmp);
+        }
+        print line;
+}' < $out | sed -n 's/{ QwErTy/{/p' | awk '{print NR, $0}' | sort -k 5n -k 1n |
     sed 's/^[0-9]* //' |
     awk 'BEGIN { last=0; nsigs=0; }
 	{


Home | Main Index | Thread Index | Old Index