Quick Start for CIT Users: Difference between revisions
| (28 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
== Create your Sandbox == | == 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. | 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 == | == Set Environment Variables == | ||
| Line 12: | Line 13: | ||
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. | 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. | ||
<pre> | |||
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 | |||
</pre> | |||
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: | |||
<pre> | |||
cl8 | Linux Windows OSX | ||
cl9 | |||
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) | |||
</pre> | |||
| Line 32: | Line 39: | ||
umask 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 == | == Get the Build System == | ||
| Line 37: | Line 52: | ||
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. | 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 / | > cd /research/graphics/users/$USER | ||
> cvs co common | > cvs co common | ||
| Line 43: | Line 58: | ||
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: | 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 / | > mkdir /research/graphics/users/$USER/install_linux | ||
> mkdir / | > mkdir /research/graphics/users/$USER/install_WIN32 | ||
| Line 56: | Line 71: | ||
Try a simple build to see that everything is properly set up. | Try a simple build to see that everything is properly set up. | ||
> cd / | > cd /research/graphics/users/$USER/common/utility | ||
> make all # Build the utilities. | > make all # Build the utilities. | ||
> make install # Install 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: | This should populate the install directory. Take a look with: | ||
> ls / | > ls /research/graphics/users/$USER/install_linux/*/* | ||
== Get Project Code == | == Get Project Code == | ||
| Line 69: | Line 85: | ||
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. | 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 / | > cd /research/graphics/users/$USER | ||
> cvs co project/<Project Name> | > cvs co project/<Project Name> | ||
| Line 75: | Line 91: | ||
If you want to create a new project then make a new directory for it in your sandbox. | If you want to create a new project then make a new directory for it in your sandbox. | ||
> mkdir -p / | > mkdir -p /research/graphics/users/$USER/project/<Project Name> | ||
You are free to organize your project within the new directory as you | 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 | https://sourceforge.net/apps/mediawiki/vrg3d/index.php?title=Writing_Make_Files | ||
| Line 84: | Line 100: | ||
== Get Third Party Software == | == Get Third Party Software == | ||
Many projects depend on downloaded software. Create the '''import''' directory in your sandbox where downloaded software is installed. | Many projects depend on downloaded software. Create the '''import/''' directory in your sandbox where downloaded software is installed. | ||
> mkdir / | > 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. | 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: | 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: | 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 / | > copy -R /research/graphics/tools/linux/import/<Package> /research/graphics/users/$USER/import | ||
Windows | == 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:\ | > cd/d Y:\research\graphics\users\<User ID>\common\utility | ||
> make all | > make all # Build utilities on Windows. | ||
> make install | > make install # Install them to: install_WIN32/ | ||
Finally inspect '''Y:\ | Finally inspect '''Y:\research\graphics\users\<User ID>\install_WIN32''' to ensure it was properly populated. | ||
Latest revision as of 18:27, 22 June 2011
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.