Document Type | Technical Information
Category | Interface/Integration
Document Number | TIITI034
Overview
iODBC is a module that must be installed to provide ODBC interface in UNIX-based environments.
This article explains the process of downloading the iODBC installation file, extracting it, compiling, and installing.
Method
Downloading Installation File and Extracting
The iODBC installation file (.tar.gz) can be downloaded from http://iodbc.org.
Upload the downloaded file to the desired path on the server where it will be installed.
Extraction is performed in the order of gunzip โ tar -xvf.
If the gunzip command does not work, you can extract the archive using the tar -xvzf option.
$ gunzip libiodbc-3.52.8.tar.gz $ tar -xvf libiodbc-3.52.8.tar $ mv libiodbc-3.52.8 iodbc_install -- Rename folder (optional)
Compiling and Installing
iODBC is basically compiled as 32bit regardless of the Tibero installation version and bit.
Therefore, if Tibero is running on a 64bit machine, compilation options must be specified.
1. Compilation Options
Option |
Description |
Remarks |
|---|---|---|
CC |
Compiler setting parameter to use |
|
CFLAGS |
Compilation bit setting parameter |
Applied in 64bit environments |
CC Options by Compiler
$ export CC=cc or export CC=gcc
CFLAGS Options by Operating System
Category |
CC |
gcc |
|---|---|---|
HP-UX |
+DD64(IA64) or +DA2.OW |
-mlp64 |
AIX |
-q64 |
-maix64 |
SunOS |
-xarch=v9 |
-m64 |
- IA-64: Intelโs Itanium-based 64bit architecture announced in 2001
2. Example of Parameter Application in 64 bit Environment
Linux or SunOS
$ export CC=gcc $ export CFLAGS=-m64
AIX
$ export CC=gcc $ export CFLAGS=-maix64
HP (IA64)
$ export CC=gcc $ export CFLAGS=-mlp64
3. Running Compilation (Execution Path: $HOME/iodbc_install)
-prefix and --sysconfdir options default to /usr/local and /etc if not specified.
Option |
Description |
Default |
|---|---|---|
--prefix |
Directory where iODBC related files will be installed after compilation |
/usr/local |
--sysconfdir |
Directory path for configuration files |
/etc |
--with-iodbc-inidir |
Path for ini files |
/etc |
--disable-gui |
Exclude GUI interface |
Linux
$ ./configure --prefix=$HOME/iodbc --sysconfdir=$HOME/iodbc/etc --with-iodbc- inidir=$HOME/iodbc/etc --disable-gui
AIX
$ ./configure --prefix=$HOME/iodbc --with-iodbc-inidir=$HOME/iodbc/etc --disable-gui
Common
$ make $ make install
Installation Verification
Execution path: $HOME/iodbc/bin
Verify that the bit version of the installed iODBC matches the server environment.
If the ODBC Manager and server bit versions differ, you must run make clean followed by recompiling and reinstalling.
$ cd $Home/iodbc/bin $ file iodbctest iodbctest: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=073cf6ec1a8e2002fe4c98c334e65ff14e24298c, not stripped