Quick Start for Linux in CIT

From VrlWiki
Jump to navigation Jump to search

These are terse instructions for setting up a typical Linux sandbox at Brown. 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.

> mkdir  /map/gfx0/users/$USER


Environment Variables

Setup your environment variables in the login script for your shell.

CVSROOT   /map/gfx0/cvsroot
GROOT     /map/gfx0
G         /map/gfx0/users/$USER
GTO       /map/gfx0/users/$USER
GARCH     linux


Also set your umask in your login shell to 002:

umask  002

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  /map/gfx0/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 the install directory for Linux with:

> mkdir  /map/gfx0/users/$USER/install_linux

The install directories 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  /map/gfx0/users/$USER/common/utility
> make  all                       # 
> make install


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

> ls  /map/gfx0/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  /map/gfx0/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  /map/gfx0/users/$USER/project/<Project Name>


You are free to organize your project within the new directory as you wish. 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  /map/gfx0/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:

/map/gfx0/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  /map/gfx0/tools/linux/import/<Package>  /map/gfx0/users/$USER/import