Re: [R] unixODBC, RODBC, and DB2

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 14 Jun 2005 - 02:38:39 EST

Can you fix your include paths? You want the sql.h and sqlext.h from unixODBC.

On Mon, 13 Jun 2005, John B. Cole, Ph.D wrote:

> 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@aipl.arsusda.gov
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jun 14 02:41:29 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:33 EST