Using Public or Private Programs and Libraries

From VrlWiki
Revision as of 14:52, 5 May 2010 by Brad Berg (talk | contribs)
Jump to navigation Jump to search

Using Public or Private Programs and Libraries

You can have either private copies of libraries or you can use the shared copies. If you want to use private programs and libraries then you determine when they are updated and which ones you want to use. You also have to set them up yourself. You can also instead use public copies, however because they are public they can be changed by any member of the group. Usually people use caution when changes happen, but regardless any changes are likely to affect some users.

Libraries and programs from third parties are typically downloaded from the web. The public copies are installed in /map/gfx0/tools/linux/import/. The environment variable G_IMPORT controls where the the build system gets third party libraries when linking. If you want private copies, set up an import directory in your sandbox. You can install the latest versions them from scratch or copy select packages from the public imports.

The import/ directory has subdirectories for each package. The organization of each subdirectory is determined by the vendor and the person that set up the install.

Libraries and programs written by Brown students can be installed in /map/gfx0/tools/linux/install_linux/ or /map/gfx0/tools/linux/install_WIN32/ directories. Each has bin/, lib, and include/ subdirectories. When building with libraries the build system looks for an install directory in this order:

$GROOT/users/$USER/install_$GARCH/
$HOME/install_$GARCH/
$GROOT/tools/linux/install_$GARCH/
$G/install_$GARCH/


The $G variable is used to access installed projects as described and it is also used to access the make files in:

$G/common/build/make/


Using only Public Directories

With this setup you only need your project code and that can be in any directory you want.

G       /map/gfx0/tools/linux


If you want to install your project in the public area set:

GTO    /map/gfx0/tools/linux


Using only Private Directories at the Top of Your Work Area

This configuration allows you to decide when software is updated. Your work will not impacted by changes made to the public area.

Set G to: /map/gfx0/users/$USER
> cd  $G
> cvs co  common              # Populate the common directory.
> cvs co  project/...         # Populate the projects you want to work on.
> mkdir  $G/install_linux
> mkdir  $G/install_WIN32
Copy select imports from /map/gfx0/tools/linux/import/ to:  /map/gfx0/users/$USER/import/

Do not copy the entire import directory as it uses a lot of space. Only copy the packages you need. You can also install imports by downloading the latest package.

It's recommended that you build the Brown software rather than copy it from the public directory. This ensures that the versions you are working with correspond to the source code in your work area.

If you want to install your project in the private area set:

GTO    /map/gfx0/users/$USER


If you want to install your project in the public area set:

GTO    /map/gfx0/tools/linux


Using Public Third Party Packages and Private Brown Software.

It is less likely that changes to third party software will impact your work. If that is the case then with this configuration you will not have to copy over their software.

G          /map/gfx0/users/$USER
G_IMPORT   /map/gfx0/tools/linux
> cd  $G
> cvs co  common              # Populate the common directory.
> cvs co  project/...         # Populate the projects you want to work on.
> mkdir  $G/install_linux
> mkdir  $G/install_WIN32

It's recommended that you build the Brown software rather than copy it from the public directory. This ensures that the versions you are working with correspond to the source code in your work area.

If you want to install your project in the private area set:

GTO    /map/gfx0/users/$USER


If you want to install your project in the public area set:

GTO    /map/gfx0/tools/linux