|
Introduction
This guide shows you how to build the networking libraries in
the QUANTA distribution using configure
You can also install the CAVERNsoft modules which use
the networking modules.
Table of Contents
- System Requirements
- Building and installing
the QUANTA libraries
- Building your own application
- Support
- Appendix A: Directory Structure
- Appendix B : Configuring the QUANTA libraries
with other options
- Appendix C: Building and installing Quanta libraries from the source
rpm.
System Requirements
The networking modules of QUANTA were tested on the
platforms listed below.
| Platform |
Version
|
| SGI Irix |
6.5 |
| Linux |
32 bit - Red Hat 8.0 & 7.3
64bit HP Itanium - Redhat 8.0
64bit Opteron - Suse Linux 9.0
|
| Free BSD |
4.3 |
| Mac OSX |
10.2.4 |
| Cygwin under Windows |
1.5.5-1 |
Building and installing the QUANTA libraries
The process has 4 main steps.
1. Downloading the distribution into a working directory
a. Download the QUANTA_xxx.tar.gz file to a working directory(
where xxx is the version number).
b. Uncompress the distribution by using the command:
gunzip QUANTA_xxx.tar.gz
Untar the distribution with the command :
tar -xvf QUANTA_xxx.tar
The entire distribution will be placed in your working directory under
the sub directory
QUANTA_xxx.
If your working directory is
/usr/tmp/QUANTA
then you will see the distribution in
/usr/tmp/QUANTA/QUANTA_xxx
(where xxx is the version number of the distribution).
Note: A brief description of the directories in the distribution is
available in Appendix A
2. Building the QUANTA libraries
a.
configure command will run the configure script and will set up the makefiles for
your platform automatically.
The configure command is platform dependent. Here is the list for
various platforms. Use the command corresponding to your platform.
| Platform |
configure Command |
| Linux (32 bit & 64 bit Itanium
systems) |
./configure |
| Free BSD |
./configure CXX=g++
CXXFLAGS=-pthread |
| Cygwin under Windows |
./bootstrap
./configure
|
| SGI Irix |
32 |
configure --enable-bin-type=32
CXX='CC -32 -exceptions' CC='CC -32 -exceptions' LD='CC -32
-exceptions' |
| n32 |
./configure --enable-bin-type=n32 CXX=CC CXXFLAGS=-n32 LD=CC |
| 64 |
./configure --enable-bin-type=64 CC=CC CFLAGS=-64 CXX=CC CXXFLAGS=-64 LD=CC |
The --enable-bin-type option can
be 32, n32 or 64. By default, configure builds Quanta for n32 bit binary
type on IRIX, 32 bit binary type on Linux, Darwin, Free BSD and Cygwin
and 64 bit binary type on Itanium and Opteron systems. The CXX
option allows you to specify the compiler name. It is recommended to
use CC on the SGI and g++ on Linux, Darwin or Cygwin.
Additional Options available with the configure command
The following are few additional options that you can use with the
configure command:
1) --prefix=<install directory
path> to
install QUANTA in a directory of your choice. If you do not use this
option, then 'make install' will install QUANTA in the /usr/local
directory
2) --enable-shared=yes/no, --enable-static=yes/no
option with configure command to build
dynamic or static Quanta library. By default, configure
builds both static and dynamic libraries.
Type 'configure --help' to find out what options you can use with the
configure script and to use the variables to override the choices made
by configure.
see Appendix B for more options on using the configure command.
b. The table below lists the default compilers used to build the libraries.
| Platform |
Default
Compiler |
| SGI Irix |
CC |
| Linux |
g++ |
| Fre BSD |
g++ |
| Mac OSX |
g++ |
| Cywgin under Windows |
g++ |
c. Type
make
This command will build the QUANTA libraries as per the option given
with the configure command. The networking libraries are now ready for
use.
The build environment will recursively build starting in the current
directory ( i.e. the directory in which the make command is given).
If the make command is given in the
top directory QUANTA_XXX, the entire
package will be built including the libraries, demos and tools. To build
an individual component of the QUANTA_XXX
distribution, an isolated demo binary for example, change to the directory
that contains the file to compile, then
type make
3. Installing QUANTA in the deployment directory
If you need to make the QUANTA networking APIs available to other users,
you should install QUANTA in a deployment directory. This deployment
directory is specified using the --prefix option when you run configure.
Type
make install
to install QUANTA in the deployment directory.
4. Demo programs
The demo programs are a set of sample programs located in the 'demos'
sub directory of the distribution. These demo programs are strictly
for QUANTA networking APIs. The demo programs exist in four directories
under the demos sub directory (db, network, misc, threads). A 'README'
file in each directory (located in the 'docs' sub directory) describes
the demo programs.
Configure builds the demo programs automatically during make.
Look into each directory and use the docs/README.html file to understand
how the demos should be run.
Building your own application
You are now ready to write your own applications with QUANTA. Click
here to see a Sample Makefile. It demonstrates
how you can compile and link a program 'test.cxx' with QUANTA. Type
make to build your program.
Right click to download a copy
of the sample makefile
Support
Please post your questions, comments on the Quanta
forum
Appendix A
: Directory Structure
The QUANTA distribution is organized into several sub directories.
Each sub directory is described below.
| Directory |
Description
|
| demos |
contains sample programs that use the QUANTA
networking APIs. |
| include |
contains header files for QUANTA |
| tools |
contains performance monitoring daemon
server and a simple performance monitoring client. |
| src |
contains source code for QUANTA |
| WIN32 |
contains workspace, projects of QUANTA for WIn32 and
pthreads library |
| stlce |
contains the Standard Template library
for WIN CE |
| wince |
contains workspace, projects of QUANTA
for WIN CE distribution |
Appendix B
: Configuring the QUANTA libraries with other options
You can configure the libraries for different binary types (32 bit,
64 bit or n32 bits). These options are not available for all platforms.
The table below specifies the command to be used to configure QUANTA
for a certain type of library and also indicates whether a certain library
type is available/relevant to that platform.
(Y indicates that you can use the command for that platform, N implies
that you cannot)
|
Set of Libraries
|
Commands to use
|
SGI-IRIX
|
Linux |
Free BSD
|
Mac OSX
|
Cygwin |
| 32 bit QUANTA library |
configure --enable-bin-type=32 |
Y
|
Y
|
Y
|
Y
|
Y
|
| 64 bit QUANTA libary |
configure --enable-bin-type=64 |
Y
|
Y
|
N
|
N
|
N
|
| New 32 bit QUANTA library |
configure --enable-bin-type=n32 |
Y
|
N
|
N
|
N
|
N
|
Appendix C: Building
and installing Quanta library from source rpm
Use the following instructions to build and install Quanta libraries if you have downloaded
the source rpm. You will need to have root permissions to install Quanta.
- Download the QUANTA-x.x.x-src-rpm
- Type rpmbuild --rebuild QUANTA-x.x.x-src-rpm.
This command builds and creates the binary rpm under rpm/RPMS directory.
- Once you build the binary rpm, you can install Quanta using the
command rpm -ivh QUANTA-x.x.x-i386.rpm
(for 32 bit machine) or rpm -ivh QUANTA-x.x.x-x86_64.rpm
(for 64 bit machine).
|