Installing GCC

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
ChrisR
Posts: 5
Joined: Sat Aug 15, 2015 11:28 am

Installing GCC

Unread postby ChrisR » Sat Aug 15, 2015 12:04 pm

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.

User avatar
foetz
Moderator
Moderator
Posts: 6543
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: Installing GCC

Unread postby foetz » Sat Aug 15, 2015 1:29 pm

irix has no getopt.h and no long options either.
the normal getopt is in unistd.h

ChrisR
Posts: 5
Joined: Sat Aug 15, 2015 11:28 am

Re: Installing GCC

Unread postby ChrisR » Sat Aug 15, 2015 1:54 pm

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.

User avatar
foetz
Moderator
Moderator
Posts: 6543
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: Installing GCC

Unread postby foetz » Sat Aug 15, 2015 2:07 pm

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

jpstewart
Donor
Donor
Posts: 429
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Installing GCC

Unread postby jpstewart » Sat Aug 15, 2015 3:37 pm

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, T5240
HP C8000

User avatar
foetz
Moderator
Moderator
Posts: 6543
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: Installing GCC

Unread postby foetz » Sat Aug 15, 2015 6:23 pm

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

User avatar
hamei
Posts: 10433
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: Installing GCC

Unread postby hamei » Sat Aug 15, 2015 6:32 pm

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 ?
I spent a fortune on booze, birds, and fast cars ... the rest I just squandered

User avatar
smj
Donor
Donor
Posts: 1661
Joined: Mon Nov 12, 2007 7:54 pm
Location: Berkeley, CA, USA, NA, Earth, Sol
Contact:

Re: Installing GCC

Unread postby smj » Sat Aug 15, 2015 6:58 pm

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: :Indy: ... Other: DEC :BA213: :BA123: Sun, DG AViiON, NeXT :Cube:

User avatar
hamei
Posts: 10433
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: Installing GCC

Unread postby hamei » Sat Aug 15, 2015 7:15 pm

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
I spent a fortune on booze, birds, and fast cars ... the rest I just squandered

User avatar
uunix
Donor
Donor
Posts: 1795
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

Re: Installing GCC

Unread postby uunix » Sun Aug 16, 2015 2:53 am

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: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------

ChrisR
Posts: 5
Joined: Sat Aug 15, 2015 11:28 am

Re: Installing GCC

Unread postby ChrisR » Sun Aug 16, 2015 3:08 am

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...:Development 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).
Last edited by foetz on Sun Aug 16, 2015 4:19 pm, edited 1 time in total.
Reason: merged

jpstewart
Donor
Donor
Posts: 429
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Installing GCC

Unread postby jpstewart » Sun Aug 16, 2015 10:51 am

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, T5240
HP C8000

ChrisR
Posts: 5
Joined: Sat Aug 15, 2015 11:28 am

Re: Installing GCC

Unread postby ChrisR » Sun Aug 23, 2015 3:51 pm

Thanks for all your responses. The knowledge and passion of this forum is great.


Return to “SGI: Development”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests