CS426 account setup

This page documents everything you need to tweak in your user account to make all the demos and CS426 programs work properly.

Tcl/Tk

Tcl is an embedable interpreter and Tk is a widget system for X. If you're not already familiar with these, we'll be spending one of the early precepts getting you up to speed, so don't stress about it.

Some CS426 projects will use Tcl/Tk, and we'll be using newer versions than the ones in /usr/princeton. We're also using shared libraries to keep the disk space under control. This will require the following line in your .cshrc:

setenv LD_LIBRARY_PATH /usr/lib:/u/cs426/lib
To make sure you got it right, try this:
% cd /u/cs426/Examples/Tcl+OpenGL
% ./polyfill
If you get an error message like the one below, you need to fix your LD_LIBRARY_PATH.
28625:tclsh7.4: rld: Warning: version search suppressed because object libtcl.so in liblist has non-sgi interface version (7.4)
28625:tclsh7.4: rld: Fatal Error: cannot map soname 'libtcl.so' using any of the filenames /usr/lib/libtcl.so:/lib/libtcl.so:/lib/cmplrs/cc/libtcl.so:/usr/lib/cmplrs/cc/libtcl.so: -- either the file does not exist or the file is not mappable (with reason indicated in previous msg)
Likewise, you want to properly set up your MANPATH to see the newer Tcl/Tk man pages. If you already have this variable, put /u/cs426/man before /usr/princeton/man. If you don't, try a line like the one below:
setenv MANPATH /usr/catman:/usr/man:/u/cs426/man:/usr/princeton/man

Other useful tidbits

Various binaries you'll be needing, such as the submit program, are in /u/cs426/bin. Make sure it's somewhere in your search path. If you're taking other CS classes which use their own submit programs, you can also refer to the CS426 ones as 426submit and 426unsubmit. It's simple enough to use. You may find yourself typing something like this for assignment 2:
% submit 2 README Makefile *.c *.h *.sh

Also, somebody always forgets this, but here goes: please don't submit .o and executable files! You consume tons of disk space, and we recompile everything, anyway. Cool idea: add a rule to your Makefile so you can type make submit and the right thing happens.

When one of your programs linked with a million shared libraries dumps core, you might get a very large core file, and your SGI will appear to wedge for the several seconds it takes to write 20 megabytes to disk. Given the sad state of debugging on SGI, those core files aren't terribly useful, either. I recommend either putting

limit coredumpsize 0
somewhere in your .cshrc or just creating a directory named "core" in your development directory. Unix then won't delete the directory and it won't write a core dump. Of course, if you actually want the core dump, remove the directory.

Compiling things

Generally, you want to use SGI's cc and CC compilers (CC is the C++ compiler). In your Makefile, you're going to want to pull your include files from /u/cs426/include and your libraries from /u/cs426/lib. When you grab the sample code for the first assignment, you'll see a complete Makefile which you should feel encouraged to modify for further assignments.

If you submit a project without a functional Makefile, your grade will suffer! Your graders appreciate being able to type make and having everything build properly.


CS 426 (Computer Graphics), CS Department, Princeton University
Last modified: Sat Sep 16 01:30:43 1995