public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS
@ 2023-12-02 19:06 Darcy Wilson
  2023-12-02 20:23 ` Dennis Clarke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Darcy Wilson @ 2023-12-02 19:06 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

Hi there,

First time messenger here, just wondering if anyone may be able to help me out with an issue I'm having.

I'm trying to compile GCC 4.5.4 for IRIX 5.3XFS (As based on the changelogs the 4.5.X branch is the last before IRIX support was removed completely).

I've downloaded the binaries built by Tgcware (https://jupiterrise.com/tgcware/irix5.3/stable/) for GCC, binutils, glibc, make, automake and so forth but I continue to have some issues when I start the ./configure stage of the process. I typically get an error from config.log which reads,

Object file format error in: /usr/tgcware/gcc45/lib/gcc/mips-sgi-irix5.3/4.5.3/irix-crti.o: bad symbolic header (magic number)
collect2: ld returned 1 exit status

It's calling ld from,

/usr/bin/../lib/ld

And then the build process stops, saying that the C Compiler cannot be found and that it cannot built executables. I've been able to build autoconf and automake without issue, so I'm wondering if anyone else may have some ideas as to what I could try? For some more info, my machine is an,

- SGI Indigo2
- IP22 Mainboard
- IRIX 5.3 XFS
- 256MB of RAM
- R4400 150MHz CPU
- 73GB HDD
- Extreme Graphics
- GCC 4.5.3, autoconf 2.68, automake 1.11.1, Bash 4.0.44, binutils 2.22, libgcc_s1 4.5.3, mpc 0.9, mpfr 3.1.0, make 3.82

Any help would be appreciated as I'm hoping to get as "modern" of a set of utilities on here as I can. I've had a similar issue building a few other GNU utilities so hopefully if we can sort this out, I'll be able to sort out the others too.

Thanks for taking my question!

Best regards,
Darcy L. C. Wilson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS
  2023-12-02 19:06 Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS Darcy Wilson
@ 2023-12-02 20:23 ` Dennis Clarke
  2023-12-03 16:33 ` Tom G. Christensen
  2023-12-05 21:39 ` Peter Bergner
  2 siblings, 0 replies; 4+ messages in thread
From: Dennis Clarke @ 2023-12-02 20:23 UTC (permalink / raw)
  To: gcc-help

On 12/2/23 14:06, Darcy Wilson via Gcc-help wrote:
> Hi there,
> 

This looks like a fun little project :)


> Object file format error in: /usr/tgcware/gcc45/lib/gcc/mips-sgi-irix5.3/4.5.3/irix-crti.o: bad symbolic header (magic number)
> collect2: ld returned 1 exit status
>

Yikes.

Can you dump out the first 16 bytes of that file please ?

Better yet can you compile a hello.c like so :

io$ cat hello.c
#define _XOPEN_SOURCE 500
#include <stdio.h>
int
main ( int argc, char **argv )
{
     printf("This is 32-bit armv7l.\n");
     return 42;
}

io$ $CC $CFLAGS $CPPFLAGS -c -o hello.o hello.c

io$ file hello.o
hello.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with 
debug_info, not stripped

io$ od -Ax -t x1 -v -N 32  hello.o
000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
000010 01 00 28 00 01 00 00 00 00 00 00 00 00 00 00 00
000020

My hope is that the first four bytes you see in irix-crti.o are just the
usual 0x7F 45 4C 46 for an ELF file.

The next three bytes on your machine may be interesting and I also hope
they are 01 01 01. I do not recall if the old MIPS R4400 was big endian
or not. So one of those bytes may be a 02. Then in offset 0x12 you
should have either :

#define EM_MIPS      8  /* MIPS R3000 big-endian */
#define EM_MIPS_RS3_LE  10  /* MIPS R3000 little-endian */

Regardless you have software that came from someone else and you really
do not know how it was built nor what hardware ( if any ) was used. So
it would be nice to know that the ELF files are actually reasonable on
the cool MIPS R4400 snazzy box you have there.


> It's calling ld from,
> 
> /usr/bin/../lib/ld
> 
> And then the build process stops, saying that the C Compiler cannot 

Yeah ... it would do that if the software really doesn't work on your
hardware.


> Any help would be appreciated 


Let's start by just seeing if you can run gcc --version and then gcc -v
with whatever you have there from the planet Jupiter.

Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS
  2023-12-02 19:06 Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS Darcy Wilson
  2023-12-02 20:23 ` Dennis Clarke
@ 2023-12-03 16:33 ` Tom G. Christensen
  2023-12-05 21:39 ` Peter Bergner
  2 siblings, 0 replies; 4+ messages in thread
From: Tom G. Christensen @ 2023-12-03 16:33 UTC (permalink / raw)
  To: Darcy Wilson, gcc-help

On 02/12/2023 20:06, Darcy Wilson via Gcc-help wrote:

> I've downloaded the binaries built by Tgcware (https://jupiterrise.com/tgcware/irix5.3/stable/) for GCC, binutils, glibc, make, automake and so forth but I continue to have some issues when I start the ./configure stage of the process. I typically get an error from config.log which reads,
> 
> Object file format error in: /usr/tgcware/gcc45/lib/gcc/mips-sgi-irix5.3/4.5.3/irix-crti.o: bad symbolic header (magic number)
> collect2: ld returned 1 exit status
> 
> It's calling ld from,
> 
> /usr/bin/../lib/ld
> 

This indicates you're missing the linker patch:
Patch SG0001068: Replacement for patch 410 new linker for 5.3

It is a pre-requisite for tgcware.

You can find links to IRIX 5.3 patch clusters which include the linker 
patch here:
https://forums.irixnet.org/thread-2038-post-13471.html#pid13471

-tgc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS
  2023-12-02 19:06 Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS Darcy Wilson
  2023-12-02 20:23 ` Dennis Clarke
  2023-12-03 16:33 ` Tom G. Christensen
@ 2023-12-05 21:39 ` Peter Bergner
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Bergner @ 2023-12-05 21:39 UTC (permalink / raw)
  To: Darcy Wilson, gcc-help

On 12/2/23 1:06 PM, Darcy Wilson via Gcc-help wrote:
> ...I continue to have some issues when I start the ./configure stage of the process.

GCC does not support building gcc within the GCC source directory.
Create an empty build directory (sibling directory to the src dir or ...)
and redo the configure and make from there.

Peter


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-05 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-02 19:06 Issues Building GNU GCC 4.5.4 - IRIX 5.3XFS Darcy Wilson
2023-12-02 20:23 ` Dennis Clarke
2023-12-03 16:33 ` Tom G. Christensen
2023-12-05 21:39 ` Peter Bergner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).