[R] unixODBC, RODBC, and DB2

John B. Cole, Ph.D jcole at aipl.arsusda.gov
Mon Jun 13 17:15:01 CEST 2005


All-

Does anyone on the list have experience with building RODBC from source 
on a Linux box for use with DB2?

I am using (all from source):
R 2.0.1
unixODBC 2.2.9
RODBC 1.1-3

For example:

[jcole]$ R CMD INSTALL RODBC_1.1-3.tar.gz 2> rodbc.log
* Installing *source* package 'RODBC' ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for library containing SQLTables... -lodbc
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -I/home/jcole/lib/R/include  -I/usr/local/include   -fPIC  -g -O2 -c 
RODBC.c -o RODBC.o
** Removing '/home/jcole/lib/R/library/RODBC'
** Restoring previous '/home/jcole/lib/R/library/RODBC'

 From rodbc.log it seems that the problem may be with an IBM-supplied 
header file:

In file included from RODBC.c:24:
/home/db2inst1/sqllib/include/sqlext.h:1681: error: parse error before 
"SQL_API"
/home/db2inst1/sqllib/include/sqlext.h:1682: error: parse error before 
"hdbc"
<More gory details available upon request.>

Any thoughts would be very much appreciated.  I have verified that my 
unixODBC installation is good by connecting to a datasource and making 
some successful queries against my DB2 installation.

John.
-- 
Dr. John B. Cole, Research Geneticist
Animal Improvement Programs Laboratory
10300 Baltimore Avenue
BARC-West, Building 005, Room 306
Beltsville, Maryland 20705-2350

Telephone: (301) 504-8665
FAX: (301) 504-8092
E-mail: jcole at aipl.arsusda.gov




More information about the R-help mailing list