Working with the vision lab library source code

If you are building on a computer not on the CS network, you will need to make sure that your system has these two programs:

    tcsh
    makedepend
    vim

Important notes:

  • The library is for personal educational/research.
  • The entire package takes 330 MB of disk space, but I have provided an optional "lite" version which is about 30 MB.
  • When you build things for the first time, there is a significant overhead while the build system builds the makefiles and all supporting components. However, once this is done, subsequent building should not take too long unless the build system detects major configuration changes.
  • I have provided a read-only mirror of our repository. If anyone wants to add/or modify the library, let me know, and I will provide access to the main repository. We are always eager to have help!

    The repository URL is either (local, remote):

        (local)    file:///home/kobus/svn/src
        (remote)   svn+ssh://lectura.arizona.edu/home/kobus/svn/src
    
    Remote access works best if you use SSH keys, otherwise you will type your password a lot.

    Assuming that you are already in a directory where you want src code, and are on a machine in the CS network, then to get the library code using SVN, you can do the following,

        svn co file:///home/kobus/svn/src/Make/trunk Make 
        svn co file:///home/kobus/svn/src/examples/trunk examples 
    
        # Lite version. Sufficient for homeworks. 
        svn co file:///home/kobus/svn/src/lib/EXPORT/lib.lite lib 
    
        # The whole library. 
        svn co file:///home/kobus/svn/src/lib/trunk lib 
        
        # Optional. Only needed if you use C++ modules (try without first).
        svn co file:///home/kobus/svn/include_after/trunk include_after
    
    For remote access, replace the local URL with the remote one. IE:
        svn co svn+ssh://lectura.cs.arizona.edu/home/kobus/svn/src/Make/trunk Make 
        svn co svn+ssh://lectura.cs.arizona.edu/home/kobus/svn/src/examples/trunk examples 
    
        # Lite version. Sufficient for homeworks. 
        svn co svn+ssh://lectura.cs.arizona.edu/home/kobus/svn/src/lib/EXPORT/lib.lite lib 
    
        # The whole library. 
        svn co svn+ssh://lectura.cs.arizona.edu/home/kobus/svn/src/lib/trunk lib 
        
        # Optional. Only needed if you use C++ modules (try without first).
        svn co svn+ssh://lectura.cs.arizona.edu/home/kobus/svn/include_after/trunk include_after
    

    Getting started

    The following assumes that you are in the directory where you checked out the source. In particular, there should be a sub-dir "Make". The directory where you checked out the source code does not need to have a particular name, but a common choice is "src". I will refer to it as ${SRC_DIR}.

    A few scripts referred to below (e.g., kjb_add_makefiles and kjb_create_program) are in ${SRC_DIR}/Make/scripts, and to use them you should either put that dir in your path or provide the full path.

    Perhaps the easiest way to get started is to check that you can build the programs in

        examples/kjb
    
    by typing "make". You can also look at the template programs in:
        examples/templates
    
    To set up the build system to an existing program, you can copy a directory with the code into ${SRC_DIR}. Alternatively, if you are starting from scratch, create such a directory, cd into it, and type in some code. In either case, to create needed Makefiles, enter
        kjb_add_makefiles    (or ${SRC_DIR}/Make/scripts/kjb_add_makefiles for the full path.)
    
    To create a program using one of the templates you could try
        create_program [name] [options]
    
    If you have set MANPATH to the right place, you would find that kjb_add_makefiles and create_program are documented. However, to make starting up easier, I have copied the man pages where the following two links can reach them.

          Man page for kjb_add_makefiles.
          Man page for create_program.

    Support libraries.

    Depending on what you doing, you will need to have a number of libraries where the build system can find them (it looks in common places). These potentially include:
         blas  lapack  slatec  fftw  tiff  jpeg  opengl  
    
    and many others. In most cases, we can compile without the libraries, but you will get an error message when you actually call a routine that needs them. Most of these support libraries are available by the usual means (e.g., yum, apt-get, MacPorts, and fink), but you can get source code and build scripts for some of the ones that are harder to come by from the svn repository. To find the ones that are there do:
        svn list file:///home/kobus/svn/src/shared 
    
    Note that to build some of these (e.g., lapack, blas, and slatec) you will need a fortran compiler installed.