This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Critical Aix bootstrap error...


   Hi!

I have noticed a critical problem during bootstrapping and installing egcs
on almost any Aix machine. I am not quite sure wether it is still present
in the upcoming 1.1 release, but it has been there in the egcs 1.0.2 series,
as well as gcc-2.7.x.x.

--- Problem description:

You are using an egrep call in fixincludes. Without a correct run of
fixincludes, the compiler will not bootstrap correctly and thus fail
to build.

The egrep shipped with my Aix version (4.2) as well as the egrep shipped
with Aix version 4.1 (and most likely a lot of others), are not?/sometimes
not? able to perform the thing you'd like it to do:

Calling

echo nix | egrep '//|[  _]_IO|CTRL|^#define.NULL|^#e[nl][ds][ief]*[     ]+[!-.0-~]|^#[el]*if.*[^a-zA-Z0-9_][_a-ce-km-zA-Z][a-zA-Z0-9]'

on an Aix machine like that will result in an error message. The thing that
is strange is that I only get error messages when I have set the locale
to german (as I usually do) [LANG=de_DE].

You then get the message:

  Ungültiger Bereich innerhalb eines Ausdrucks zwischen [].

I am unsure wether compiling goes well when the LANG variable is en_EN,
since I have not tried to do a complete build unter these circumstances.

--- Suggested fix:

Include a small test on the start of fixincludes, which echoes a pattern
that absolutely should match through egrep, and one pattern that should
not match.

Observe the result.

When you see something suspicous, make sure that the building process
stops and tells the users to try to

- either set their LANG variable to en_EN
- or get a GNU version of egrep and install it, and make sure that this
    gets called instead of the native grep. A working version is in
    the grep-2.1.tar.gz package available at ftp.gnu.org.

As an alternative, you could try to automatically set the LANG variable
when your test fails the first time, and then retry.

---

I spent quite some time figuring out what was going on with my compiler,
until I found this.

I hope this helps.

   Cu... Stefan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]