SGI: Development

Installing GCC

Hello all-
I have tried to follow the instructions for installing gcc on my O2 running Irix 6.5 with 384mb RAM from here
http://www.nekochan.net/wiki/Installing_and_Using_GCC


1.) The link for GCC 3.4.6 from http://nekoware.dustytech.net/index.php?path=current/ appears broken (downloads as 0 bytes), when I try to get 3.4.6 from the German ftp mirror it seems to hang after downloading 153mb.
2.) When I installed GCC 4.7.1 from the main site (nekoware.dustytech.net) and tried to compile the program, gcc complains that there is no getopt.h, and indeed the /usr/nekoware/gcc-4.7/include only includes a "c++" folder, and no pure c files. When I check the tardist, I note it does not have a "neko_gcc.opt.src " - do I need to include another file. I tried using a getopt.h from the main GCC 4.7.1 repository but I get a segmentation fault with program collect 2.
3.) I thought my system has the Irix Development Libraries and Irix Development Foundation installed - but I think those were from older disks (the release notes mention MIPSpro 7.2.1, and I know that is not the current version). How can I check that I have the correct files?

any suggestions appreciated.
irix has no getopt.h and no long options either.
the normal getopt is in unistd.h
r-a-c.de
So why do I get an error requesting this file when I compile the simple C program described on the nekochan web page (see below). By the way, I can comment out the "#include <stdio.h>" and then I get the segmentation error shown next.

gcc test.c
In file included from /usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/include/stdio.h:18,
from test.c:1:
/usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/include/internal/stdio_core.h:424:20: getopt.h: No such file or directory
o2 8# gcc simple.c
In file included from /usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/include/stdio.h:18,
from simple.c:1:
/usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/include/internal/stdio_core.h:424:20: getopt.h: No such file or directory
o2 9# gcc simple.c
gcc: Internal error: Segmentation fault (program collect2)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
please paste your test program in [ code ] tags. and welcome here btw :-)
that aside, which irix version are you running?
r-a-c.de
foetz wrote: irix has no getopt.h and no long options either.

Odd. My IRIX boxes all have getopt.h in /usr/include. You're quite right about the lack of long options, though. (I can't count the number of times I've fought with autoconf finding getopt.h and assuming the presence of getopt_long()! That's one of my biggest pet peeves.)

Edit: according to 'showfiles -- /usr/include/getopt.h' it comes from the irix_dev.sw.headers package, which is on the "Development Libraries" CD in the IRIX media set.

ChrisR wrote: When I installed GCC 4.7.1 from the main site (nekoware.dustytech.net) and tried to compile the program, gcc complains that there is no getopt.h, and indeed the /usr/nekoware/gcc-4.7/include only includes a "c++" folder, and no pure c files.

Do you have /usr/include/getopt.h? If so, then you've got a problem with GCC's include path. If not, then you're missing some/all of the IRIX development headers. AFAICT, getopt.h is not supposed to be part of the GCC package.

Also note there's an older thread about Dustytech mirror being out of sync . I'm not sure if that's been cleared up, or perhaps worsened over time. Maybe try a different mirror to see if there's an updated GCC package.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
then getopt.h is there after all. as you said it looks like at least some of the general dev stuff is missing.
i guess the key point here is, you need the stuff from the 2 dev cds even if you're not going to use mipspro
r-a-c.de
foetz wrote: ... the key point here is, you need the stuff from the 2 dev cds even if you're not going to use mipspro

... and if you're going to all the trouble to find the dev CD's, then why not walk the extra foot and get MIPSPro ? gcc is a linux thing. Why put a Chebby six-cylinder in your Jag ?
Juliet ! the dice were loaded from the start ...
hamei wrote: Why put a Chebby six-cylinder in your Jag ?

You know better, hamei - you do that because you want it to run reliably... /me runs


(A common jibe/complaint/swap in the States, at least; perhaps limited to the British Leyland era cars of the 70s and early 80s.)
Then? :IRIS3130: ... Now? :O3x02L: :A3504L: - :A3502L: :1600SW: +MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: ... Other: DEC :BA213: :BA123: Sun , DG AViiON , NeXT :Cube:
smj wrote: You know better, hamei - you do that because you want it to run reliably... /me runs

But if you want something reliable, you don't get an English car in the first place ... gcc in Irix is like plastic tits - looks good from across the street but when ya get around to driving it, it's just not right.

If you don't get stranded at least once in a while, it's not a Jag :P
Juliet ! the dice were loaded from the start ...
hamei wrote: But if you want something reliable, you don't get an English car in the first place ...


There are no British cars left...
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Octane2: :Octane2: :O2: :Indy: loft => :Indigo: :540: :Octane: :Octane: :Indy:
There is no file
/usr/include/getopt.h
on my system, which "name -a" says is "IRIX O2 6.5 07202013 IP32"

When I try to install the package /CDROM/dist:IRIX development headers... :D evelopment Environment Headers I get the conflict

"irix_dev.sw.headers (Development Environment Headers) (1274627335) is incompatible with doe.sw.base (IRIX Base Execution Environment) (1289662620).

Does this mean I have to rebuild a hard drive and install the development components before the overlays?

Thanks for your rapid feedback.

foetz wrote: please paste your test program in [ code ] tags. and welcome here btw :-)
that aside, which irix version are you running?

The problem was with the "A Painfully Simple Test Program" hello world example from the nekochan web page "Installing and Using GCC". uname -R reports 6.5.30f. In another session I was able to get gcc 3.4.6 downloaded from the German ftp site, though it also complains about missing headers. If I remove the "include <stdio.h>" from the file I get a complaint that crtn.o and crt1.o are not found in /usr/lib32/mips3, which is odd as I thought it would build for mips4. Maybe some of the experts here could tune the nekochan "Installing and Using GCC" web page to tune the "Setting Up The Environment" section. In other words, can you provide suggestions to new users if they only want to build for later SGI hardware (O2/Octane or later).
ChrisR wrote: "irix_dev.sw.headers (Development Environment Headers) (1274627335) is incompatible with doe.sw.base (IRIX Base Execution Environment) (1289662620).

Does this mean I have to rebuild a hard drive and install the development components before the overlays?

No. You need compatible versions of irix_dev.sw.headers and eoe.sw.base. That's the base 6.5 dev subsystem, while you appear to be running 6.5.30.

Evidently, I provided bad information earlier in the thread. Taking a more detailed look at my CD sets, it seems that instead of the previously mentioned irix_dev on the Development Libraries CD (in the base set) you need irix_dev_6530m from the 6.5.30 overlays (probably on Disc 1 of that set) instead.

Sorry for the confusion.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
Thanks for all your responses. The knowledge and passion of this forum is great.