Compilers like the in-the-box SGI IRIX c compiler can be highly annoying giving various cryptic warnings during compiling and regular wordy messages about getting the registering key for the c compiler that came with the Operating system - despite having paid $X,000 through the nose for the workstation in the first place. (Gripes about the SGI OS setup and implementation are scattered throughout the CCP14 admin area). However, for some programs (secure shell, apache) it can be advisable to use the SGI cc compiler for the moment due to some nuances with gcc 2.8.1 and some libraries related to handling IP addresses.
The present generation of GCC programs can be quite problematic to compile on SGIs and thus the following summaries from the newsgroups are here as the tutorial I put together broke too easily on slightly different SGI systems.
To get things happy to compile programs such as Isearch, you have to do the following:
For SGI also refer:
There are also sites carrying binary GNU compilers for various operating systems and sites of interest for programmer resources. Refer: CCP14 Auto-Mirror
The version of gcc used at the time of writing was gcc-2.95.1 This was compiled on an SGI O2 running IRIX 6.5.6.
Download page is at http://www.gnu.org/order/ftp.html. There are a variety of mirrors around the place including a CCP14 auto-mirror at http://gnu.ccp14.ac.uk/order/ftp.html
You need:
Some of the Eurocentric FTP sites you can download the source code (presently 12.3 meg of tar.gz file)
From: Rado Faletic [[email protected]] Organization: Australian National University Newsgroups: comp.sys.sgi.admin Subject: Re: GCC 2.95.1 under 6.5.5? I compiled the following under IRIX 6.5.4 with the 7.2.1.3 compilers, without any hitches: gcc-2.95.1 gcc-chill-2.95.1 gcc-g++-2.95.1 gcc-g77-2.95.1 gcc-java-2.95.1 gcc-objc-2.95.1 I think I did something like $ bash $ CC="cc -n32 -mips4 -r5000" MAKE=gmake ./configure --prefix=/opt/gnu $ gmake bootstrap NOTE 1: the "bootstrap" makes the compiler the long way around - 1st it makes a simple GNU compiler. This simple GNU compiler then goes and compiles a full blown version of itself. This second compiler then compiles a third full blow compiler, then compilers 2 and 3 are checked against eachother for consistency. If eveything goes OK it should compile without too much fuss. NOTE 2: you MUST use the GNU make (gmake) program instead of the standard IRIX make, otherwise it won't compile. > Has anyone been able to compile gcc 2.95.1 under IRIX 6.5.5? I am tottaly > unable to do so. If anyone has been succesful, would you mind sharing your
Gregory P. Whalin [[email protected]] wrote: : Has anyone been able to compile gcc 2.95.1 under IRIX 6.5.5? I am tottaly : unable to do so. If anyone has been succesful, would you mind sharing your : secrets?! :) I got 2.95.2 to compile under 6.5.5 just recently with the following configure line: ./configure --with-gcc-version-trigger=/usr/local/src/gcc-2.95.2/gcc/version.c \ --host=mips-sgi-irix6.5 --prefix=/usr/local \ --enable-languages=c++,f77,java,objc --enable-cpp --enable-threads \ --disable-shared --norecursion Hope this helps. cheers, --ryan --------------------------------------------------------------------- Ryan Dooley [email protected] -o) 573/884/5154 (phone) 573/884/5158 (fax) /\\ EC DF 90 41 8D 64 D9 6D 3D 2A 30 14 F2 AB 6B E3 _\_v
To test out the compiled build a "Hello World" program and compile it to test things out.
#include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; }
Build it using the command gcc hello.c -o hello