Warner Technology Consulting Logo

Development with gcc under SGI's IRIX 6.2
Hardware and Software Tips

Does it seem like everyone else who has an SGI computer (formerly Silicon Graphics, Inc.) also has the venerable SGI MipsPro compiler, but you can’t spare the $600? Fortunately, you can use the famous gcc compiler for most things, although you have to work at it. Below I present a few things I’ve discovered living with an Indigo 2 and gcc. More advanced users will no doubt find some of my stumblings amusing, just as I do in retrospect. Maybe you can learn from my mistakes.

Hardware TipsSoftware Tips


Hardware Tips

There are a lot of misconceptions about what will and won’t work with SGI hardware. I have a refurbed Exabyte model 8700 8mm external tape drive connected and it works without any trouble. Most SCSI devices work better than some would have you believe. I recently installed a Plextor UltraPlex 40max SCSI CD-ROM drive on an Indigo 2. This works nicely because it is a much less expensive ($88 just recently) than an SGI-branded unit. One place to find the latest pricing for these drives is at http://www.deal-mac.com. There's nothing wrong with SGI-branded units; I really believe that you get what you pay for. But if you don’t need/can’t afford SGI peripherals, this is a great alternative. DISCLAIMER: always try before you buy, if at all possible. Additional info on CD drives for SGI equipment can be found at the MIT site or the Texas A&M site Some of the problems I encountered with the CD drive and their solutions:

Problem
System log says, “Too much data requested (probable SCSI bus cabling problem). Resetting SCSI bus.”
Solution
It is not a cabling problem. Patch 3445 solves this problem: it’s a SCSI rollup. Get it from http://support.sgi.com

Problem
“mediad: mount error: mountcd: Unknown CD-ROM type (PLEXTOR CD-ROM PX-40TS...,” or ISO9660 discs won't mount, even though others formats will.
Solution
Patches 3190 and 3192 make this one go away. Get it at http://support.sgi.com

Generally speaking, if you're having trouble, check to see if a patch exists. SGI's site makes it very easy to check which patches you already have installed and which ones you may still need to install.

Who sells used SGI hardware? A list of used equipment resellers can be seen at http://www.remarketing.com/html/specialt/sgi.htm.


Software Tips

Where to get gcc for SGI
SGI has kindly provided a precompiled binary for gcc 2.8.1 at their freeware web site. You can use it to compile the source code for gcc 2.95.2, although this process took several hours on a 200MHz R4400 Indigo 2. A precompiled version would be about 30MB, so I don't provide one here. Maybe once I have something faster than a dialup...

Apache 1.3.12 and the inet_ntoa problem
To get Apache 1.3.12 compiled under IRIX 6.2 with gcc, I had to do the following from the C Shell
1. setenv CC gcc
2. setenv OPTIM "-O2"
3. setenv LD_SHLIB "gcc"
4. setenv LDFLAGS "-L/usr/local/bind/lib"
5. setenv LIBS "-lbind"
6. ./configure --enable-shared=max --enable-module=so
Steps 4 and 5 reflect a solution to dealing with the documented inet_ntoa problem. I compiled the Bind source code using gcc, which provides an inet_ntoa that works with other gcc-compiled applications.

Apache JSSI Configuration
./configure --with-java-platform=2 --with-JSDK=/usr/java/lib/ext/jsdk.jar --with-jdk-home=/usr/java

BZIP versus GZIP
Use the BZIP2 software instead of GZIP, especially when rotating logfiles, which can grow faster than a rabbit farm. An uncompressed SYSLOG file (plain text) went from 6,324,216 bytes to 545,080 with GZIP (v1.2.4, default compression), but 379,731 with BZIP (v0.9.5d, about 70% the size of the GZIP file). What’s the tradeoff? The BZIP2 file took a lot longer (86 seconds versus 6 seconds), although it did not seem to tax the machine in any way.

Compiling x48
The X48 software (please let me know if you find a home page) does not compile cleanly “out of the box” with the gcc compiler. Please note that you must have your own HP48 from which to extract the ROM necessary for this emulator, plus a cable to connect the HP to a computer. Steps to get the ROM are included with the source code. Here’s the steps to get the code to compile.
1. Edit the config.h file. Uncomment line 35.
2. Type xmkmf to generate the Makefile.
3. On my machine, domainname doesn’t work, so edit src/Makefile line 635. Throw out the macro and just type in your email address like this: *COMPILE_BY=\"you@domain.com\";"
4. Remove the `-nostdlib` part on line 156 of the same src/Makefile.
5. Use the SGI make (not gnumake) to compile (e.g. type 'make'). Ignore the volumes of warnings that come up during compilation. If all goes well, the results will be in the bin directory.


Back to the Warner Technology Home Page

Page created by: matt@warnertechnology.com

PGP Encryption Available for secured messages. Public key is available at MIT's site or here.

Business Text
Automotive Text
Computers Text
Site Search
Made with Macintosh!
Site by Warner Technology Consulting. All material is copyright 1999. If you reference material on this site, you are expected to annotate the source from which it came. That is, you may use information on this site, but you must clearly state from where you obtained it.
Page last updated on Sun, Jul 15, 2001

Text Links: BusinessAutomotiveComputerSGI
Mac OS X ServerMacintosh • Matt's Hack TV
Software • PS on Non-PS Printers • Porsche

R E A D E R • C O M M E N T S
Add a Comment