Quick Start for CIT Users

From VrlWiki
Jump to navigation Jump to search

These are terse instructions for setting up a typical sandbox at Brown using Linux. Even if you intend to develop on a different platform such as Windows you should initially get set up on Linux. If you need more explicit instructions or you want a more complex setup then revert back to the full instructions.

Create your Sandbox

Create a user directory for yourself in the groups work area. Be sure to use your login name as the directory name. Before you do anything double check to see that your primary group is graphics. If it is not ask tStaff (mail problem@cs.brown.edu) to change it for you.

> groups
graphics  grad  guest               # The first item must be graphics.
> mkdir  /research/graphics/users/$USER

Set Environment Variables

Setup your environment variables in the login script for your shell. If you are using Windows you will also want to set these variables on your Windows system as well.

               Linux                             Windows

 CVSROOT   /research/graphics/cvsroot        Y:\research\graphics\cvsroot
 GROOT     /research/graphics                Y:\research\graphics
 G         /research/graphics/users/$USER    Y:\research\graphics\users\<User ID>
 GTO       /research/graphics/users/$USER    Y:\research\graphics\users\<User ID>
 GARCH     linux                             WIN32


The G_COMPILER variable is set to the compiler you want to work with. This may change depending on project requirements. Most projects will build if you set it to gcc4 on Linux and cl9 on Windows. Note that at Brown gcc version 3.4 is no longer supported on Debian. Current settings are:


       Linux                          Windows                                    OSX

 gcc2 - gcc version 2.95     cl6 - Microsoft Studio version 6            gcc4 - gcc version 4.2
 gcc3 - gcc version 3.4      cl8 - Microsoft Studio version 8 (2005)
 gcc4 - gcc version 4.1      cl9 - Microsoft Studio version 9 (2008)


Also on Linux set your umask in your login shell to: 002

umask  002


Note that imported software packages may require additional environment variable settings when your project uses them. You will need to read the documentation for each package to see how it is set up.

The NAG library is supported by tStaff for Linux. If you use the NAG library you will need to set:

LM_LICENSE_FILE  /cfarm/nag/license.dat:/com/nag/license.dat
NAG_KUSARI_FILE  /com/nag/kusari.dat

Get the Build System

The common/ directory has the build make files and shared programs and libraries written at Brown. You only need the common/build/ directory to develop programs, but since you probably will eventually want other common code just check the whole directory out.

> cd  /research/graphics/users/$USER
> cvs co common


When software is installed (via the "make install" command) it is copied to the install directory. There is an install directory for each platform. Create install directories for Linux and Windows with:

> mkdir  /research/graphics/users/$USER/install_linux
> mkdir  /research/graphics/users/$USER/install_WIN32


The install directories are populated by a "make install" command and are organized like this:

install_linux/lib/<Project Name>/lib*.a
install_linux/bin/<Project Name>/<Program>
install_linux/include/<Project Name>/*.h


Try a simple build to see that everything is properly set up.

> cd  /research/graphics/users/$USER/common/utility
> make  all                       # Build the utilities.
> make install                    # Install the utilities.

Here is a transcript for Building and Installing Common Components.

This should populate the install directory. Take a look with:

> ls  /research/graphics/users/$USER/install_linux/*/*

Get Project Code

Project code is kept in CVS under the project/ directory. Note that inside your sandbox project code can be kept in any directory and you can have multiple versions of projects in different directories. If you want to work with a project already in CVS then you can check it out now.

> cd  /research/graphics/users/$USER
> cvs  co  project/<Project Name>


If you want to create a new project then make a new directory for it in your sandbox.

> mkdir  -p  /research/graphics/users/$USER/project/<Project Name>


You are free to organize your project within the new directory as you see fit. For instructions on writing make files visit:

https://sourceforge.net/apps/mediawiki/vrg3d/index.php?title=Writing_Make_Files

Get Third Party Software

Many projects depend on downloaded software. Create the import/ directory in your sandbox where downloaded software is installed.

> mkdir  /research/graphics/users/$USER/import


The packages you need are determined by the projects you are working on. Project documentation is the first place to check for required software. Copies of some packages are installed in a shared public area, however the public area may not have the versions your projects require and the installations may change over time without notice. The only sure fire method is to download and install the software.

To see how the import/ directory is organized and what packages are installed browse the public installations:

/research/graphics/tools/linux/import/...


If there is a copy there that looks like one you need you can first try it and if it doesn't work then download and install your own copy. Copy the packages you need from the public area to your own:

> copy  -R  /research/graphics/tools/linux/import/<Package>  /research/graphics/users/$USER/import

Build a Project on Windows

Windows users need a few Unix utilities installed to build projects. You can check these out of cvs on a Linux computer with:

> cd   /research/graphics/users/$USER         
> cvs  co  import/make             # Check out the utilities on a Linux computer.
            :
> ls /research/graphics/users/$USER/import/make/g.utility_1.0/
CVS/         cp.exe*    echo.exe*   libiconv2.dll  make.exe*   mkdir_gnu.exe*
READ_ME.txt  diff.exe*  false.exe*  libintl3.dll   mkdir.exe*  rm.exe*

Now switch to the Windows computer. You will need to add the path to g.utility_1.0\ to the front of your Windows PATH environment variable. On Windows the path is "Y:\research\graphics\users\<User ID>\import\make\g.utility_1.0" After it is set verify that you can run these utilities from the command shell of your choosing. The native Windows command shell is cmd.exe.

If you've not already done so, set your Windows environment variables according to the section "Setting Environment Variables". To see if you can build software run the 'cmd.exe' shell and try:

> cd/d  Y:\research\graphics\users\<User ID>\common\utility
> make  all                                         # Build utilities on Windows.
> make  install                                     # Install them to:  install_WIN32/

Finally inspect Y:\research\graphics\users\<User ID>\install_WIN32 to ensure it was properly populated.