A short guide to compiling Qt apps and iCE in the MVCL (EBW 350)
Rich Tollerton <tollert@meru>
Version < 1
5 Feb 2001
Q: How do I compile Qt apps on the SGIs?
Short answer: (explorer only please, configuration differs depending on
app to be compiled, YMMV)
setenv QTDIR /usr/apps/qt-2.2.1
setenv PATH $PATH:$QTDIR/bin
setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):$QTDIR/lib
env 'CC=cc -64' 'CXX=CC -64' ./configure
make
Long answer:
Qt 2.2.1 is installed at /usr/apps/qt-2.2.1, and most QT programs use
QTDIR as the environment path indicating where it is installed. Therefore
QTDIR=/usr/apps/qt-2.2.1. However, at present when Qt is upgraded you
will have to update your QTDIR to reflect the new directory. Eventually
you'll use /usr/apps/qt as a symlink to the latest distribution and you
won't have to worry about this anymore.
To make use of Qt you'll at least need to add $QTDIR/bin to your path
to gain access to its various binaries (designer, moc, etc) and
$QTDIR/lib to your library path so your apps can see the libraries when
you run them. You may also want to add $QTDIR/doc/man to MANPATH to
gain access to its man pages, but Qt also includes extensive HTML
documentation at $QTDIR/doc/html and that's what I normally use.
Qt (and all applications compiled for Qt) is currently only supported
on explorer. The libs at $QTDIR/lib are compiled 64-bit on MIPSPro 7.3,
which only explorer has right now. Therefore you'll need to coerce
all your apps to compile 64-bit. You can either change the Makefiles
yourself or set your environment variables accordingly. CC is the canonical
enviroment variable for the C compiler, but there are different vars
used for the C++ compiler - I've seen both CXX and CPP.
N32 and g++ libraries aren't compiled yet, but when they are, please keep
in mind that they are NOT compatible due to different name-mangling
semantics. What will probably happen is you'll have to hand-modify
your Makefiles and/or LD_LIBRARY_PATH to switch between the two binary
formats. It bites but there really isn't any other way around it.
Also note that MIPSPro is much less forgiving about bad code than gcc is,
and warning-free compilation on all GCC versions (even the buggy new one
in Red Hat 7) is no indicator that your code will even compile here.
Q: How do I compile iCE?
WARNING: iCE is currently in a very pre-alpha state. Don't expect
many things (if anything) to work.
Short answer:
setenv CVSROOT /usr/mvl1/mvl-SW/cvsroot
cvs checkout ice
setenv PATH $PATH:/usr/mvl1/tollert/tmake-1.4/bin
setenv TMAKEPATH /usr/mvl1/tollert/tmake-1.4/lib/irix-64-7.3
cd ice/src
tmake -o Makefile iCE.pro
make
Long answer:
iCE is stored in a CVS repository on meru, with a module name of "ice"
(caps important). Please don't copy out of my personal directory as it
may be even more unstable than the code in the tree (amazing though that
sounds).
iCE currently uses tmake, a very simple application compilation tool
available from ftp://ftp.trolltech.com/pub/freebies/tmake
. It's extremely limited though and we'll move away from it in the future.
In the meantime, some changes were necessary to get it working on
MIPSPro 7.3, so for now it's best to use the version that's installed
in my home directory, at /usr/mvl1/tollert/tmake-1.4 .
tmake is composed of a perl script (tmake-1.4/bin/tmake) and
rules that describe compilation for each platform (tmake/lib).
Make sure that tmake is in your path, and that it can locate the proper
rules for this platform by setting
TMAKEPATH=/usr/mvl1/tollert/tmake-1.4/lib/irix-64-7.3 .
Once tmake is set up, build the Makefile from the iCE rule file by
running "tmake -o Makefile iCE.pro" and type make. If nothing else is
running on explorer you can probably speed up compilation quite a bit
by compiling in parallel; "gmake -j3" is probably the best bet.
Planned Changes to this Procedure:
- ln -s /usr/apps/qt-2.2.1 /usr/apps/qt
- Install tmake globally, ln -s /usr/apps/tmake-1.7 /usr/apps/tmake,
submit new rules to TrollTech
- Move ice compilation to autoconf. This exchanges one set of problems
(simplistic platform assumptions, complex configuration) for another
(very difficult to add compilation options and platform rules).
- Upgrade qt/renew license.