Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65668 - gcc 2.95.3 compilation fails with up-to-date coreutils
Summary: gcc 2.95.3 compilation fails with up-to-date coreutils
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: John Mylchreest (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-28 05:46 UTC by Harald van Dijk (RETIRED)
Modified: 2005-01-24 06:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gcc-2.95.3-posixtail.patch (gcc-2.95.3-posixtail.patch,2.20 KB, patch)
2004-09-28 05:47 UTC, Harald van Dijk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2004-09-28 05:46:31 UTC
It complains about not being able to find a file +16c. tail +16c should be changed to tail -c +16, because tail no longer recognises all of the old options. And while it still recognises -1, it does this with a warning that this option will be removed in the future, so I changed that too.

Reproducible: Always
Steps to Reproduce:
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2004-09-28 05:47:41 UTC
Created attachment 40607 [details, diff]
gcc-2.95.3-posixtail.patch
Comment 2 SpanKY gentoo-dev 2004-12-06 20:24:03 UTC
fixed in cvs, thanks
Comment 3 Harald van Dijk (RETIRED) gentoo-dev 2004-12-07 14:49:47 UTC
Hi, sorry to reopen this, but the current fix doesn't really work that well. It does install (thanks!), but very basic checks that gcc was compiled correctly are disabled now because tail fails differently (if I understand correctly), and a lot of error messages (all the same) are shown:

tail: +16c: invalid number of lines

The fixheadtails eclass only correctly changes [-+]# to -n [-+]#; it doesn't change [-+]#c to -c [-+]#. That means it changes +16c to -n +16c instead of -c +16. Could you replace

-e 's/tail \([-+]\)\(.*\)/tail -n \1\2/'

with

-e 's/tail \([-+][0-9]\+\)c\(.*\)/tail -c \1\2/' \
-e 's/tail \([-+][0-9]\+\)\(.*\)/tail -n \1\2/'

? (The eclass may have similar problems with head, but I don't know if anything uses #c with head (assuming that was ever valid) - I know this version of gcc doesn't.)
Comment 4 John Mylchreest (RETIRED) gentoo-dev 2004-12-10 15:17:24 UTC
this should now be fixed in cvs.
please check.
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2004-12-10 17:39:12 UTC
Sorry, but it's still not working. Now the error message is

tail: c: invalid number of lines

The reason for that is that the first replacement changes tail +16c to tail -c +16, and the second then changes that to tail -n -c +16. That's also the reason I added [0-9] in my last comment.

Also, the current solution 's/tail \([-+]\)\(.*\)c/tail -c \1\2/' causes errors whenever a filename following tail -# contains a c. tail -1 c-example is changed to tail -n -c 1 -example, for example, instead of tail -n -1 c-example.
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2005-01-24 06:26:21 UTC
The current eclass works. Thanks!