|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
Updated for version 3.19.1 of the OPeNDAP DAP2/4 library software.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
Installing the DAP2/4 library
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
---------------------------------------------------------------------------
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
BUILDING THE SOFTWARE
|
|
Packit |
a4aae4 |
REQUIREMENTS
|
|
Packit |
a4aae4 |
NOTES
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
---------------------------------------------------------------------------
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
BUILDING THE SOFTWARE
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
To build the OPeNDAP DAP2/4 library and the getdap client program, follow
|
|
Packit |
a4aae4 |
these steps:
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
0. Please skim REQUIREMENTS and NOTES sections of this file
|
|
Packit |
a4aae4 |
before reporting problems. Thanks.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
1. Type `./configure' at the system prompt. On some systems you may have
|
|
Packit |
a4aae4 |
to type `sh configure'. For people building from git, see below.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
2. Type `make' to build the library, `make check' to run the tests.
|
|
Packit |
a4aae4 |
You must have CppUnit to run `make check.' On a Mandrake/Mandriva
|
|
Packit |
a4aae4 |
system, you need to copy or link conf/config.guess into the
|
|
Packit |
a4aae4 |
'tests' directory and then run the tests.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
3. Type `make install' to install the library files. The libraries
|
|
Packit |
a4aae4 |
(libdap.a. libdapclient.a and libdapserver.a, etc.), their header
|
|
Packit |
a4aae4 |
files and the getdap and dap-config utilities install under
|
|
Packit |
a4aae4 |
/usr/local/ in lib, include/libdap and bin by default. Use the
|
|
Packit |
a4aae4 |
--prefix option to specify a different root directory. For
|
|
Packit |
a4aae4 |
example, './configure --prefix=/opt/opendap' would set the build
|
|
Packit |
a4aae4 |
so that the library was installed in /opt/opendap/lib, ...
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
Building from Our GIT Repository
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
A git clone of https://github.com/opendap/libdap4 will get you the
|
|
Packit |
a4aae4 |
newest code. You'll need the autotools toolchain. First, run
|
|
Packit |
a4aae4 |
autoreconf --force --install --verbose
|
|
Packit |
a4aae4 |
Then run ./configure, make and make check. Use --prefix with configure
|
|
Packit |
a4aae4 |
to set the installation to a location other than /usr/local. Use
|
|
Packit |
a4aae4 |
--enable-developer to turn on the library's asserts and build with
|
|
Packit |
a4aae4 |
debugging symbols. Use --jobs=N with make and make check to run those
|
|
Packit |
a4aae4 |
in parallel on multi core machines and add TESTSUITEFLAGS=-j9 to make
|
|
Packit |
a4aae4 |
check to run the regression tests in parallel.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
AFTER INSTALLING
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o Set the PATH environment variable to include the bin directory where
|
|
Packit |
a4aae4 |
libdap was installed. For example, if using the default installation
|
|
Packit |
a4aae4 |
directory, which is /usr/local, make sure that /usr/local/bin is on your
|
|
Packit |
a4aae4 |
path. This is important because often libdap is built so that some other
|
|
Packit |
a4aae4 |
software can then be built, but without setting PATH, those other
|
|
Packit |
a4aae4 |
packages might not detect the newly installed libdap.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o Set the LD_LIBRARY_PATH environment variable to include the lib directory
|
|
Packit |
a4aae4 |
where libdap was installed. For example, if using the default
|
|
Packit |
a4aae4 |
installation directory, which is /usr/local, make sure that
|
|
Packit |
a4aae4 |
/usr/local/lib is part of LD_LIBRARY_PATH. If you have set $prefix so
|
|
Packit |
a4aae4 |
that the libraries are installed in a directory that's included in
|
|
Packit |
a4aae4 |
ld.so.conf (on linux; other systems may use a slightly different name)
|
|
Packit |
a4aae4 |
you don't have to use LD_LIBRARY_PATH but, but if you don't use
|
|
Packit |
a4aae4 |
LD_LIBRARY_PATH, **make sure to re-run ldconfig**.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
REQUIREMENTS
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o To build from a fresh git clone, you'll need automake 1.11,
|
|
Packit |
a4aae4 |
autoconf 2.63 and libtool 2.2.6. Earlier versions may work, but
|
|
Packit |
a4aae4 |
may cause problems, particularly with the 'distcheck' target for
|
|
Packit |
a4aae4 |
make. Given those requirements, use 'autoreconf --force --install
|
|
Packit |
a4aae4 |
--verbose' and then build as described above. You also need bison 3
|
|
Packit |
a4aae4 |
and flex 2.5.35 or greater.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o The library uses libcurl, libxml2 and libuuid (the latter on linux
|
|
Packit |
a4aae4 |
but not OSX). You will need these libraries installed on your system
|
|
Packit |
a4aae4 |
to successfully run configure and build the library. You must have
|
|
Packit |
a4aae4 |
libcurl version 7.19.0 or newer and libxml2 2.7.0 or newer.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o If you are concerned about introducing problems with your OS's package
|
|
Packit |
a4aae4 |
system, build and install curl, etc., into a special directory (e.g.,
|
|
Packit |
a4aae4 |
/opt/opendap/) and then be sure to set PATH to include the curl-config
|
|
Packit |
a4aae4 |
and xml2-config scripts before running configure (e.g., run configure as
|
|
Packit |
a4aae4 |
'PATH="$PATH:/opt/opendap/bin';./configure'). You probably should install
|
|
Packit |
a4aae4 |
libdap.a under /opt/opendap as well, so set prefix to that path:
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
'PATH="$PATH:/opt/opendap/bin';./configure --prefix=/opt/opendap'
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o We build this using gcc 4.2.1 and clang 602.0.53
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
NOTES
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o Check for other INSTALL.* files to see if there's information specific to
|
|
Packit |
a4aae4 |
your OS (e.g., AIX).
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o If you are building on a new platform (one for which we don't supply
|
|
Packit |
a4aae4 |
binaries), please run the tests and tell us about any failures. To do a
|
|
Packit |
a4aae4 |
really complete job of this you'll need to get the GNU test system called
|
|
Packit |
a4aae4 |
DejaGNU and the CppUnit unit testing package. It is very simple to
|
|
Packit |
a4aae4 |
install these and we're very willing to help, so don't be shy!
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o If you are developing code that uses the DAP, get autoconf and subversion
|
|
Packit |
a4aae4 |
(SVN). We maintain a SVN-managed source tree that people outside the
|
|
Packit |
a4aae4 |
group may access. See http://scm.opendap.org/trac/
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o The gnulib software is used to provide replacement functions when
|
|
Packit |
a4aae4 |
autoconf detects that is necessary. To update the gnulib, check it out
|
|
Packit |
a4aae4 |
from CVS and run '$gnulib_home/gnulib-tool --lgpl --import' in this
|
|
Packit |
a4aae4 |
directory. Macros in configure.ac supply gnulib-tool with all the
|
|
Packit |
a4aae4 |
information it needs. Only developers working on libdap should ever have
|
|
Packit |
a4aae4 |
to do this.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o To build a rpm file for a source or binary distribution use 'make rpm' or
|
|
Packit |
a4aae4 |
'make srpm'. These targets should run 'make dist' to build the required
|
|
Packit |
a4aae4 |
tar.gz file first. You may need root privileges for these targets to work.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o To build a Mac OS/X package, use the 'pkg' target. Read over the target
|
|
Packit |
a4aae4 |
to get a feel for how it works. You will need PackageMaker, which should
|
|
Packit |
a4aae4 |
already be installed on your system, and you will need DropDMG, which
|
|
Packit |
a4aae4 |
can be obtained at http://c-command.com/dropdmg/. The target has been
|
|
Packit |
a4aae4 |
automated to generate a ReadMe.txt file, update the Info.plist file, run
|
|
Packit |
a4aae4 |
PackageMaker and DropDMG.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
o DEBUGGING AIDS
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
- The DAP API includes the following debugging aids that may be of help
|
|
Packit |
a4aae4 |
to you in developing new OPeNDAP applications.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
- DBG: simple program instrumentation -- see the file debug.h.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
- DBG2: more elaborate program instrumentation -- by convention this is
|
|
Packit |
a4aae4 |
used for output that is half a page or more, while DEBUG is used for
|
|
Packit |
a4aae4 |
single line output.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
- In the past we used efence and dbnew to help debug dynamic memory
|
|
Packit |
a4aae4 |
programming errors. We are now using valgrind and suggest you do the
|
|
Packit |
a4aae4 |
same. On some Linux platforms you should export MALLOC_CHECK_=0 in the
|
|
Packit |
a4aae4 |
shell before running valgrind. This is true for the unit tests and may
|
|
Packit |
a4aae4 |
be true for other code. You'll also notice that the Makefile contains
|
|
Packit |
a4aae4 |
CXX and C compile-time flags for debugging. These will greatly simplify
|
|
Packit |
a4aae4 |
using valgrind and/or a debugger. To use these, don't hack up the
|
|
Packit |
a4aae4 |
Makefile.am. Instead export CXXFLAGS with the values you want and then
|
|
Packit |
a4aae4 |
run configure. For example:
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
export CXXFLAGS="-g3 -O0 -Wall -fno-defer-pop"; ./configure
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
- To build with program instrumentation use `--enable-debug=<level>'
|
|
Packit |
a4aae4 |
where <level> is 1 or 2.
|