This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/37019] New: [4.2 Regression] Inconsistent gcc-4.2.3/libjava/configure uses "grep" and "egrep" and "grep -E" and "$EGGREP" but not ggrep -- sed also is trouble
- From: "rob1weld at aol dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 4 Aug 2008 05:26:15 -0000
- Subject: [Bug libgcj/37019] New: [4.2 Regression] Inconsistent gcc-4.2.3/libjava/configure uses "grep" and "egrep" and "grep -E" and "$EGGREP" but not ggrep -- sed also is trouble
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The gcc-4.2.3/libjava/configure uses "grep" and "egrep" and "grep -E" and
"$EGGREP" (but not "ggrep") in a non-portable and inconsistent manner.
Examples:
1. Lines 5224, 5254, 5295, 5298, etc... use "egrep" but "EGREP" is not tested
for (to decide if we will use "grep -E" or "egrep") until line 7315 and not set
until line 7322.
Correct usage would be to check if we need to use "ggrep" since on Solaris
"grep" is NOT the GNU grep, instead "ggrep" is the GNU grep. A few simple
commands in Solaris's "grep" _are_ compatable with GNU's "grep" but most
commands are not.
Solaris also has "egrep" and "fgrep" but those are also both Non-GNU programs.
To use "egrep" or "fgrep" (in Solaris) you must use "ggrep -E" or "ggrep -F".
---
The other problem is that Solaris (I have the newest version) does not have a
GNU sed program. Worse news. It _does_ have a "sed" program, but there is no
command to obtain a version number. Looking at the "man sed" command says that
the man page is dated "23 Jul 1998". In a "normal" installation of Solaris
there is no "gsed" command.
The GNU "sed" command can be tested by running "sed --version" and it will
reply "GNU sed version x.y.z". The Solaris "sed" command has no means to check
it's version (that I am aware of -- you might ggrep the binary ;) ).
If someone wants a "gsed" command for Solaris they must either compile "sed"
themselves or type this (see this URL: http://www.blastwave.org/howto.html):
# pkgadd -d http://www.blastwave.org/pkg_get.pkg
# /opt/csw/bin/pkg-get -U
# /opt/csw/bin/pkg-get -i wget
# /opt/csw/bin/pkg-get -i gsed
That provides a "GNU sed" as "/opt/csw/bin/gsed". It is version 4.1.4
Elsewhere in gcc I have noticed that other configure scripts do not have this
problem, they do check for the "g"-prefixed commands. The (correct) configury
uses tests to set environment variables that are used for the program's name
throughout the rest of the script.
--
Summary: [4.2 Regression] Inconsistent gcc-
4.2.3/libjava/configure uses "grep" and "egrep" and
"grep -E" and "$EGGREP" but not ggrep -- sed also is
trouble
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rob1weld at aol dot com
GCC build triplet: i386-pc-solaris2.11
GCC host triplet: i386-pc-solaris2.11
GCC target triplet: i386-pc-solaris2.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37019