|
CVS is a way of storing and tracking changes in the code between releases. It
always has the latest code and bug fixes, which is why you should preferably use
CVS. Here's step-by-step instructions for how to check out (get) source code
and build OpenVL from
CVS. Before you begin, make sure you have installed the development packages (gcc,
automake, autoconf, libtool etc.). You also need cvs installed (version 1.11 or greater).
Step 1. Check out the source code
Run the following commands in a directory that you have write access to (such
as your home directory):
cvs -d:pserver:anonymous@cvs.openvl.sourceforge.net:/cvsroot/openvl login
Just hit enter for the password.
cvs -z3 -d:pserver:anonymous@cvs.openvl.sourceforge.net:/cvsroot/openvl co -P openvl
You should see it listing all the source files. Once this is done, you will
have all the source files in the directory "openvl".
Step 2. Build OpenVL
Once you've checked out OpenVL from CVS, run the follwing commands:
cd openvl
./autogen.sh
./configure --enable-plugins
If you see any errors here, you probably do not have all the needed software installed on your system. Carefully
read the error message and install the required software. If you are unable to
figure out the problem after really trying hard, then post your problem on the
openvl-devel mailing list and someone will answer. If the configuration
ran without any errors, then run the following:
make
If you get any errors, try to find out the reason. If you cannot, then
post the output to the mailing list.
Step 3. Install OpenVL
System-wide install : Login as root and run the following command:
make install
This will install OpenVL into /usr.
User-level install : If you do not have root access, or if you want to install this library
only for yourself, then you may want to follow these instructions. First, decide where you want to install
the library. I would suggest you install in openvl directory under your home directory. Create this
directory using the following command :
mkdir ~/openvl
Now you need to re-run the configure script to setup your new installation directory. Use these commands:
./configure --prefix=$HOME/openvl
If you prefer to install somewhere else, then simply replace $HOME with another location. $HOME by default
points to your home directory. Now you are ready to install in this location that you selected. Run the following
command to install:
make install
This will install the library in $HOME/openvl/lib and include files will go in $HOME/openvl/include. To use
these include files and library, you need to setup some configuration variables. To use the library
files of OpenVL installed in this directory when you run a program based on OpenVL, you need to make sure
that the environment variable LD_LIBRARY_PATH points to the library directory where the library files
reside (in this case, $HOME/openvl/lib). To do this, run:
export LD_LIBRARY_PATH="$HOME/openvl/lib;$LD_LIBRARY_PATH"
Now if you run echo $LD_LIBRARY_PATH , you should see the library directory listed. Before
you run any program that uses OpenVL you need to make sure that you set the value of this variable. If you
do not, then the program will by default use the library installed in your system - if any. If you
want to make this setup permanent, then you need to set the variable in the init scripts of the shell
you are using (~/.bashrc for bash shell, ~/.cshrc for tcsh or csh shells). But be careful - any OpenVL
based program you run will always use your locally installed OpenVL library.
NOTE : You can check which library a program will use when you run it by running ldd
. If you have correctly setup, then you should see that the
OpenVL library used points to the library you installed above.
During compiling a program which uses OpenVL, you need to make sure that you are passing
-I$HOME/openvl/include and -L$HOME/openvl/lib to the compiler. You can
do this by modifying your makefiles (if you are compiling on the command line), or through the
IDE that you are using to develop your code (like KDevelop, SlickEdit etc.).
Step 4. Update OpenVL
When there are changes to OpenVL's code, you'll want to update your local copy.
You don't have to remove the entire directory that you checked out and redo
the whole thing; instead, from inside the directory, run:
cvs update -d
make
If you did a system-wide install in Step 3, then login as root before you run the following command. Else, simply run
the following command:
make install
The update will merge all the changes into the current files, and then
make will rebuild OpenVL.
And that should be everything. Please note you need to use gmake on BSD platforms.
|