From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9652ed5beed36a777942ad150ca54db7@quanstro.net> From: erik quanstrom Date: Mon, 3 Mar 2008 09:10:51 -0500 To: lists@morris-clan.net, 9fans@cse.psu.edu Subject: Re: [9fans] plan9port build failure on Linux (debian) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: Topicbox-Message-UUID: 6d751130-ead3-11e9-9d60-3106f5b1d025 > install.log was no help, the message I quoted was everything > relevant. > > I took a stab at running gdb through yacc, but the compiler > optimized the code to the point finding the problem was > nearly impossible.....best I can say is its somewhere in the > dofmt() function (lib9/fmt/dofmt.c) or something it calls. i trust you ran yacc under gdb not gdb through yacc. :-) the problem is unlikely to be with the print. it likely occurred in argument parsing. one thing that should be fixed in p9p is the ARGF() calls should be replaced with EARGF(usage()) in setup(). the definition of usage should be void usage(void) { fprint(2, "usage: yacc [-Dn] [-vdS] [-o outputfile] [-s stem] grammar\n"); exits("usage"); } once that is fixed, it would be interesting to see if yacc prints a usage statement instead of printing the garbage. assuming that things are still broken, i would suggest adding fprint(2, "...") statements in setup to understand where things are going wrong. - erik