Subject: Update for RedHat 7.1

From: "H . J . Lu" <[email-masked]>
Date: Fri, 7 Sep 2001 23:00:09 -0700

I updated a few packages, fixed a linker bug and rebuilt everything.

H.J.
----
My mini-port of RedHat 7.1 is at

ftp://oss.sgi.com/pub/linux/mips/redhat/7.1/

you should be able to put a small RedHat 7.1 on the mips/mipsel box and
compile the rest of RedHat 7.1 yourselves.

Here are something you should know:

1. The cross compiler hosted on RedHat 7.1/ia32 is provided as a
toolchain rpm. The binary rpms for the mips and mipsel cross compilers
are included. You will need glibc 2.2.3-11 or above to use those
rpms. The glibc x86 binary rpms under RPMS/i386 should be ok.
2. You have to find a way to put those rpms on your machine. I use
network boot and NFS root to do it.
3. install.tar.bz2 has some scripts to prepare NFS root and install
RedHat 7.1 on a hard drive.
4. baseline.tar.bz2 contains the cross build tree.

Thanks.

H.J.

---

From: Carsten Langgaard <[email-masked]>
Date: Wed, 12 Sep 2001 10:50:17 +0200

I have installed your new set of RedHat7.1 RPMs, and tried to build Perl
natively.
But it fails with the following message:

`sh  cflags libperl.a toke.o`  toke.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include
-O2

Cannot allocate 2676168 bytes after allocating 3899765696 bytes
make: *** [toke.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.43439 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.43439 (%build)

I have build perl natively with your pervious set of RedHat7.1 RPMs,
without any problems.

/Carsten

--
_    _ ____  ___   Carsten Langgaard   Mailto:[email-masked]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com

---

From: Carsten Langgaard <[email-masked]>
Date: Wed, 12 Sep 2001 11:57:47 +0200

>     Bad exit status from /var/tmp/rpm-tmp.43439 (%build)

I tried to build perl again an now I get this message:

`sh  cflags libperl.a toke.o`  toke.c
          CCCMD =  gcc -DPERL_CORE -c -fno-strict-aliasing
-I/usr/local/include -O2
gcc: Internal error: Terminated (program cc1)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make: *** [toke.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.53242 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.53242 (%build)

---

From: "H . J . Lu" <[email-masked]>
Date: Wed, 12 Sep 2001 09:48:22 -0700

>     Bad exit status from /var/tmp/rpm-tmp.53242 (%build)

It may be a kernel/hardware bug. I have no problem building perl
natively.

H.J.

---

From: Pete Popov <[email-masked]>
Date: Wed, 12 Sep 2001 09:59:53 -0700

> It may be a kernel/hardware bug. I have no problem building perl

Carsten, what board/cpu are you using?

Pete

---

From: Carsten Langgaard <[email-masked]>
Date: Wed, 12 Sep 2001 21:51:15 +0200

> Carsten, what board/cpu are you using?

On a Atlas board with a QED RM5261 CPU (little-endian).
The kernel is based on 2.4.3.

---

From: Pete Popov <[email-masked]>
Date: Wed, 12 Sep 2001 12:56:52 -0700

> The kernel is based on 2.4.3.

I would try the exact same userland and kernel version on a different board, 
preferably with a different cpu.  Rebuild perl natively 10 times. If it works on 
the other board, there is a very good chance that this is a board or CPU 
problem. Native compiles seem to be very good for stressing the hardware.

Pete

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 13 Sep 2001 01:28:32 +0200

On Wed, Sep 12, 2001 at 12:56:52PM -0700, Pete Popov wrote:

> preferably with a different cpu.  Rebuild perl natively 10 times. If it
> works on the other board, there is a very good chance that this is a board
> or CPU problem. Native compiles seem to be very good for stressing the
> hardware.

And software.  You have little chance to find all the little details that
need to be tweaked with crossbuilds.

  Ralf

---

From: Carsten Langgaard <[email-masked]>
Date: Thu, 13 Sep 2001 14:41:46 +0200

> problem. Native compiles seem to be very good for stressing the hardware.

Ok, I found the problem, it turn out that I only had 128K swap space, it should
have been 128M.
So after increasing my swap space, I was able to compile perl.

Thanks a lot.
/Carsten

---

From: Carsten Langgaard <[email-masked]>
Date: Thu, 13 Sep 2001 17:06:53 +0200

I now tried to installing the bigendian RedHat7.1 RPMs and I noticed the
following.

/etc/localtime is lacking in glibc-2.2.4-11.2.mips.rpm (but it's contain
in the little endian version).
All the timezone information is lacking under /usr/share/zoneinfo in
glibc-common-2.2.4-11.2 (but it's in the little endian version).

I can't changes the root password, I get the following:
# passwd root
Changing password for user root
New UNIX password:
/usr/lib/cracklib_dict: magic mismatch
PWOpen: Success

/Carsten

---

From: "H . J . Lu" <[email-masked]>
Date: Thu, 13 Sep 2001 08:14:50 -0700

> glibc-common-2.2.4-11.2 (but it's in the little endian version).

Everything is cross compiled. Since x86 is little endian, I don't
cross compile big endian data files, like locale and timezone. You
can rebuild glibc natively to get all those data files.

> /usr/lib/cracklib_dict: magic mismatch

It may be the endian issue. Please recompile cracklib natively and let
me know if it fixes the problem for you.

H.J.

---

From: Carsten Langgaard <[email-masked]>
Date: Fri, 14 Sep 2001 09:52:39 +0200

> me know if it fixes the problem for you.

I recompiled cracklib natively and yes it works, thanks a lot.
Do you want the RPM binaries for your distribution ?

---

From: "H . J . Lu" <[email-masked]>
Date: Fri, 14 Sep 2001 08:24:41 -0700

> Do you want the RPM binaries for your distribution ?

I updated README. I will just tell big endian people to recompile those
rpms natively.

Thanks.

H.J.
----

1. The cross compiler hosted on RedHat 7.1/ia32 is provided as a
toolchain rpm. The binary rpms for the mips and mipsel cross compilers
are included. You will need glibc 2.2.3-11 or above to use those
rpms. The glibc x86 binary rpms under RPMS/i386 should be ok.
2. You have to find a way to put those rpms on your machine. I use
network boot and NFS root to do it.
3. install.tar.bz2 has some scripts to prepare NFS root and install
RedHat 7.1 on a hard drive.
4. baseline.tar.bz2 contains the cross build tree.
5. Since everything is cross compiled from x86, which is little endian,
many data files for mips, which is big endian, are either missing or
wrong. To get those data files for mips, you have to rebuild/install
the folowing rpms:

cracklib
glibc

natively on Linux/mips.

Thanks.

H.J.