libggi port to SGI IRIX(tm) - update - november 24, 1997 :

by Emmanuel Marty <core@ggi-project.org>


I have successfully compiled libggi X, memory and multi targets on a
Silicon Graphics O2 workstation, running IRIX 6.3 in 32 bits. Vince
Weaver <weave@eng.umd.edu> has added directives for IRIX 5.3 and
successfully compiled the library under that environment.

In order to compile the library :

a) you need the following software :

   - IRIX IDO and c compiler (cc).

     gcc doesn't work very well with IRIX and doesn't optimize well for
     mips architecture (yet), while SGI's cc does. So I had a living
     hell porting things to cc, but it does work now.

     you need to buy cc from Silicon Graphics if you don't have it. or you
     can get binaries of the libraries from my ftp server (see below), and
     use gcc to compile your applications, if you really want to.

   - GNU Make

     SGI's make is broken and lacks many features. You need to have GNU
     make installed in the path as gmake for the library to compile. If you
     don't have it installed already, you can get it at prep.ai.mit.edu, in    
     /pub/gnu. It compiles with SGI's cc just fine.

   - SGI, ANSI and X11 headers in /usr/include

     obviously, you need that too. they are on development CDs from SGI.

b) change to ggi/lib/libggi

c) if you have a 64-bit architecture (and you are running IRIX 6.0 or
   above), edit rules/IRIX, comment out the lines for 32-bit build, and
   uncomment the ones for 64-bit build.

   i can't test the library on a 64-bit SGI, but it should work. if you
   have that kind of architecture, please try to compile, and report me
   how it goes. it will be very appreciated.

d) do gmake config

This will not bring menus, but define the right things for compiling
under IRIX at the moment.

e) do "gmake", wait patiently.

   libggi will now compile in -Ofast and -IPA if you're running IRIX 6.x
   (only -IPA with IRIX 5.x). You shouldn't see any warning.. If you do, or
   see anything abnormal/unusual, please report that to me.

f) do gmake install

   unless you changed configuration (look at README.INSTALL in the ggi
   root dir about that), this will install libggi in /usr/local/lib/ggi, and
   create symlinks to it in /usr/lib32, or /usr/lib64 if compiling for 64
   bits, so that ld.so will find the libraries when needed. it will install
   libggi includes in /usr/local/include/ggi, too.

   if you didn't change the configuration and are installing in /usr/local,
   you need to have root privileges, of course.


If you are running IRIX 6.3 on an SGI O2, you are sure of that, don't want to
have the latest latest lib, and don't want to bother compiling the library,
you can get binaries at :

ftp://fire.greyfox.org/pub/ggi/IRIX-libggi-971124-bin32.tar.gz

to install, do :

cd /
gzip -d /wherever/it/is/IRIX-libggi-bin32.tar.gz
tar xf /wherever/it/is/IRIX-libggi-bin32.tar
ln -s /usr/local/lib/ggi /usr/lib32/ggi
ln -s /usr/local/lib/libggi.so.3.0 /usr/local/lib/libggi.so
ln -s /usr/local/lib/libggi.so.3.0 /usr/local/lib/libggi.so.1
ln -s /usr/local/lib/libggi.so.3.0 /usr/lib32/libggi.so
ln -s /usr/local/lib/libggi.so.3.0 /usr/lib32/libggi.so.1
ln -s /usr/local/lib/libggi.so.3.0 /usr/lib32/libggi.so.3.0

Of course replace /wherever/it/is by the appropriate path (duh).

You need to be root to do that.

This will install libggi in /usr/local/lib (as on any other platform)
and create symlinks in /usr/lib32 to the right location, for ld.so to
find the libraries. Note that you still need the include files modified
for IRIX, for compiling the demos and your applications. If they aren't in the repository when you read this, just ask me by e-mail.


Note that IRIX cc, and probably Solaris and many others, don't support
macros with a variable number of arguments, and don't support inlining
either (as I've been pointed out, this isn't standard C). When compiling
on the SGI, inlined functions in events.h and debug.h are actually
compiled in respectively events.c and debug.c - application writers, if
you can avoid inlined functions in the future, that would be nice.
 
Please report _any_ problem to me, with as many details as possible about
what is wrong.

Many thanks to Ian Van Der Neut (Aiel), Pim (xL), and Raj Mathur (OldMonk)
of Silicon Graphics Inc., for their support and invaluable help.
