From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13879 invoked by alias); 26 Feb 2009 06:32:46 -0000 Received: (qmail 13863 invoked by uid 22791); 26 Feb 2009 06:32:42 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_93,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f179.google.com (HELO mail-ew0-f179.google.com) (209.85.219.179) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Feb 2009 06:32:35 +0000 Received: by ewy27 with SMTP id 27so454207ewy.24 for ; Wed, 25 Feb 2009 22:32:32 -0800 (PST) Received: by 10.210.82.2 with SMTP id f2mr229742ebb.37.1235629952128; Wed, 25 Feb 2009 22:32:32 -0800 (PST) Received: from ?82.6.108.62? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id f8sm14966547nfh.2.2009.02.25.22.32.31 (version=SSLv3 cipher=RC4-MD5); Wed, 25 Feb 2009 22:32:31 -0800 (PST) Message-ID: <49A639A6.2070703@gmail.com> Date: Thu, 26 Feb 2009 06:32:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: binutils@sourceware.org Subject: "tail +140" no longer works. Content-Type: multipart/mixed; boundary="------------060509010707020302060602" X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00337.txt.bz2 This is a multi-part message in MIME format. --------------060509010707020302060602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 2472 Hello all, I got a nasty error running make check (on cygwin 1.7: Running /usr/build/src-binutils/ld/testsuite/ld-bootstrap/bootstrap.exp ... ERROR: tcl error sourcing /usr/build/src-binutils/ld/testsuite/ld-bootstrap/bootstrap.exp. ERROR: tail: cannot open `+140' for reading: No such file or directory while executing "exec tail +140 tmpdir/ld2 >tmpdir/ld2tail" ("foreach" body line 117) invoked from within "foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory" "--relax"} { set do_strip "no" if {"$flags" == "strip"}..." (file "/usr/build/src-binutils/ld/testsuite/ld-bootstrap/bootstrap.exp" line 38) invoked from within "source /usr/build/src-binutils/ld/testsuite/ld-bootstrap/bootstrap.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source /usr/build/src-binutils/ld/testsuite/ld-bootstrap/bootstrap.exp" invoked from within "catch "uplevel #0 source $test_file_name"" Running /usr/build/src-binutils/ld/testsuite/ld-cdtest/cdtest.exp ... $ tail --version tail (GNU coreutils) 7.0 Turns out that the official syntax for tail is changed, and the unadorned "+N" format is no longer allowed. See, e.g. https://bugzilla.redhat.com/show_bug.cgi?id=175907 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471264 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=339085 and for the official word from the Gnu's mouth: http://www.gnu.org/software/coreutils/faq/#Old-tail-plus-N-syntax-now-fails The attached patch takes the simplest option of adding an explicit '-n' single-letter option, and I need a portability expert to review and comment on whether that form is accepted everywhere, or whether to use sed or an autoconf test. Tested with no regressions natively on i686-pc-cygwin (platform affected by bug) and i686-pc-linux-gnu (older coreutils accepting old syntax). On cygwin: === ld Summary === -# of expected passes 64 -# of unexpected failures 7 +# of expected passes 69 +# of unexpected failures 8 # of expected failures 3 # of unresolved testcases 1 # of unsupported tests 2 -/usr/build/obj-binutils/ld/ld-new 2.19.51.20090226 +/usr/build/obj-binutils-autoimportpatched/ld/ld-new 2.19.51.20090226 Ok for HEAD? Or not owing to portability issues? ld/testsuite/ChangeLog * ld-bootstrap/bootstrap.exp: Replace obsolete "tail" usage. cheers, DaveK --------------060509010707020302060602 Content-Type: text/plain; name="ld-bootstrap-tail-usage-patch.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ld-bootstrap-tail-usage-patch.diff" Content-length: 1001 Index: ld/testsuite/ld-bootstrap/bootstrap.exp =================================================================== RCS file: /cvs/src/src/ld/testsuite/ld-bootstrap/bootstrap.exp,v retrieving revision 1.15 diff -u -p -r1.15 bootstrap.exp --- ld/testsuite/ld-bootstrap/bootstrap.exp 6 Jul 2007 14:09:42 -0000 1.15 +++ ld/testsuite/ld-bootstrap/bootstrap.exp 26 Feb 2009 04:44:23 -0000 @@ -152,8 +152,8 @@ foreach flags {"" "strip" "--static" "-- # Although this works, a way to set the date would be better. # Removing or zeroing the date stamp in the binary produced by # the linker is not possible as it is required by the target OS. - exec tail +140 tmpdir/ld2 >tmpdir/ld2tail - exec tail +140 tmpdir/ld3 >tmpdir/ld3tail + exec tail -n +140 tmpdir/ld2 >tmpdir/ld2tail + exec tail -n +140 tmpdir/ld3 >tmpdir/ld3tail catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output exec rm tmpdir/ld2tail tmpdir/ld3tail } else { --------------060509010707020302060602--