Compiling & installing ODBSequoia

Buildchain

As a build chain you need GNU make and a recent C++ compiler and STL. We make intensive use of features added by the C++98 standard, as well as of C99 integer types (uint32_t etc.), so you also need some <stdint.h/cstdint> C99 header file.

We develop using g++ version 4, but with extra care not to rely on any non-standard extensions (please report any to the mailing list).

Operating System

ODBSequoia and Carob have unfortunately been tested only on linux so far, but with standards always in mind, so porting them to other unices is hopefully the matter of minutes.

Windows systems will probably require a bit more work. The only problematic, low level code should lie in the following files:

Carob has been successfully compiled on Windows XP using MinGW and STL-port, check CAROB-87

Libraries

Carob is the workhorse of the driver, which links statically to it. So the very first step is to get Carob source and compile it ("download" link on the right). While you are here, get odbsequoia source as well. Here is the (odbsequoia x carob) release compatibility "matrix":

Or you can use the latest CVS HEAD for both since they are almost always in sync. CVS module names are "carob" and "odbsequoia" respectively.

Most of libraries and headers listed below should be available as precompiled and packaged for your platform by your favorite free software distributor.

Carob dependencies

The most noticeable dependency of Carob is GMP

Another library used by Carob is log4cxx, but it's optional; if you do not link Carob against it (by default) logs will go to stderr.

The test suite shipped with Carob needs CppUnit. In case of unidentified problems with the driver, the first thing to do is to run Carob's test-suite.

Check Carob documentation for more details.

ODBSequoia

The only additional dependency of ODBSequoia compared to Carob is (quite obviously) an ODBC driver manager. You need an Unicode Driver Manager, check the UNICODE file about this. ODBSequoia has been developed using unixODBC 2.2.11. Hopefully using alternatives should not be an issue (did I already ask to report any success to the mailing list?).

Compilation

Go into carob's main directory and type

make libcarob.a

This will create the only file needed to compile ODBSequoia. Then go into odbsequoia "src" directory. You may need to fix the CAROB_PATH=../../ at the beginning of GNUmakefile so it can find libcarob.a. Now type:

make libodbsequoia.so

Installation

Congratulations, this library file you just made is the driver. If you did this on a yet unsupported platform, please proudly report this to the mailing list. Now you can either:

Configuration

Edit the sample odbinst.ini (driver) and odbc.ini (datasource) files provided according to your particular configuration, and install them according to the documentation of your ODBC driver manager (typically using some ODBCConfig, gODBCConfig or odbcinst configuration panel). Do not change the "Sequoia" driver section name used in both files.

The optional LogLevel setting in the odbcinst.ini file is based on log4cxx. If you compile carob without log4cxx the logs will go to stderr instead.

In the configuration of your ODBC client application, replace the ODBC Data Source Name of your database by the DSN of the sequoia virtualdatabase you just configured in your odbc.ini file ("seqsource" for instance in the sample file provided).

Run your application, and please report what went right or wrong!


$Date: 2006/05/30 08:18:43 $ $Revision: 1.6 $