Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sed or gcc problem on Mac OS X

0 views
Skip to first unread message

Jim Meyering

unread,
Oct 17, 2009, 4:22:07 AM10/17/09
to bug-gn...@gnu.org
Hello,

I've traced a coreutils ls/abmon-align test failure
on powerpc Mac OS X (9.8.0 Darwin Kernel) to a failure of sed.

It's due to a problem with the installed /usr/local/bin/sed.
If I use /usr/bin/sed instead, it works fine.

Also, making this change to the coreutils test script,
tests/ls/abmon-align,

- LC_ALL=C sed '1d; s/.\{15\}\(.*\) ...ts$/\1/; s/ /./g' |
+ LC_ALL=C sed 's/.\{15\}//;s/ ..\.ts$//;s/ /./g' |

that test succeeds even when using /usr/local/bin/sed.

Here's a pared-down test case:
The sed-4.2.1 used here was just built from upstream
source using "gcc version 4.3.0 20070817 (experimental)"
so maybe it was miscompiled by that 2+-year-old version of gcc.

$ sed --version|sed 1q
GNU sed version 4.2.1

This shows the malfunction with 4.2.1:

$ printf 'd\303\251\n'|sed 's/\(.\).*/\1/'

It works with vendor sed:

$ printf 'd\303\251\n'|/usr/bin/sed 's/\(.\).*/\1/'
d

I also built sed on ppc/linux with a recent gcc, and there
it had no problem.


Paolo Bonzini

unread,
Oct 17, 2009, 4:30:38 AM10/17/09
to Jim Meyering, bug-gn...@gnu.org

> I also built sed on ppc/linux with a recent gcc, and there
> it had no problem.

Hi Jim,

you didn't say whether you used --with-included-regex, but I tried it on
i686-linux and didn't have the problem. I'll dust up my PPC Mac; I
don't remember offhand what GCC version I have there.

Paolo


Jim Meyering

unread,
Oct 17, 2009, 4:37:36 AM10/17/09
to Paolo Bonzini, bug-gn...@gnu.org

Hi Paolo,

I didn't specify that option, but it did compile and use lib/regex.o.


Paolo Bonzini

unread,
Oct 17, 2009, 4:38:10 AM10/17/09
to Jim Meyering, bug-gn...@gnu.org
On 10/17/2009 10:37 AM, Jim Meyering wrote:
> I didn't specify that option, but it did compile and use lib/regex.o.

I meant on Linux. :-)

Paolo


Jim Meyering

unread,
Oct 17, 2009, 4:42:17 AM10/17/09
to Paolo Bonzini, bug-gn...@gnu.org

I've confirmed that there is no problem on ppc/linux
also when configured/built --with-included-regex.


0 new messages