Skip to content

Build Instructions

zmoratto edited this page Sep 14, 2010 · 1 revision

Building Vision Workbench

As you are now aware, Vision Workbench has left the realm of SVN and switched over to using Git on Github . This provides us more publicity and for a growing future where Vision Workbench can be developed by attractive people outside of NASA. If you have no prior knowledge of Git, you should read a wonderful free book called Pro Git . The first two chapters of “Pro Git” will do a fine job of explaining the idea behind distributed version control and the basics of Git.

So you need to ask yourself a question. Do you want to become a developer or do you want to just be able to checkout the latest version of the code? If you only want to use the latest code then you’ll be fine with read-only permission, so follow the Non-Developer approach. The rest of you; you’re with me in the Developer approach.

Getting VW via Non-Developer Approach

This section show how to checkout with read only access from github without requiring a user account. The first step is downloading the code from github. This can be achieved through:

git clone http://github.com/visionworkbench/visionworkbench.git VisionWorkbench

Now follow configuration and building below.

Getting VW via Developer Approach

To become a developer of Vision Workbench, it is required of you to have a github account. Please get yourself an account now! You’ll want to setup your internet presence as now the world can mock your silly commits. Be sure to follow Github’s instructions for setting up ssh-keys on your system. If you did everything fine with setting up your github account then you should be able to do the following:

ssh git@github.com

If it worked the response will be:

ERROR: Hi [redacted]! You've successfully authenticated, but GitHub does not provide shell access
                                                                                        Connection to github.com closed.

Now is a good time to double check that you did in fact read “Pro Git”. Perform the following check:

git config --list

You should at least have the name and email fields filled out. An example of output is:

bash$ git config --list
user.name=[redacted] [redacted]
user.email=[redacted].[redacted]@nasa.gov

Great! Now you’ll want to follow GitHub’s directions for forking your own copy of Vision Workbench’s repository . In the future when you’ve made a bunch of changes and would like to submit to the actual Vision Workbench, you should follow the pull request directions .

Configuration and Building

The build system for Vision Workbench is based on the GNU autoconf and automake tools. Site specific paths can be specified in a config.options file in the top level Vision Workbench directory. Specify the base paths for packages that are not in standard locations (e.g., /usr or /usr/local) by setting the PKG_PATHS variable in the config.options file. In most cases the package will have a standard internal layout and you won’t have to do anything more. If not, you can specify the include and lib sub-paths. An example file is provided, config.options.example, that can be used as a template for creating the config.options file. For systems that mount the IRG filesystem, simply copy the provided config.options.irg file to config.options. To configure for building, run:

./autogen
./configure

This rebuilds all of the automake systems for your system. Configure has specific options for this package as well as a general syntax for modifying compiler flags and various build directories. Type ’./configure —help for a summary.

Once you have run autogen and configure simply execute:

make install

Each of the Vision Workbench modules has its own set of external library dependencies. Most of them only rely on Boost. However, some modules require extensive OpenGL related libraries. Some libraries are required and some are optional. For example, if the build system can successfully locate the OpenEXR library, the Core module will be built with support for this high dynamic range file format. If a required library is not found (either the paths were incorrect or it is not present) then the module will be disabled for building. Modules can be explicitly turned on or off at the command line or in the config.options file. Run ./configure again when paths or options are changed.

We provide fine granularity for library sub-dependencies such as libpng, libtiff, etc. These are typically installed in Linux distributions. If you do have problems finding them, it is easy to setup the paths and identify any errors by watching the configure output. OpenEXR is now an optional library, and all of the GL and Cg libraries are only required by GPU related modules.

By default, “make install” will create a directory VisionWorkbench/build/$ARCH/{include,lib} into which it copies includes and libraries.

Something went wrong with that request. Please try again.