Re: help compiling psqldobc-08.03.0400

From: "Kulik, Scott" <SKulik(at)severstalna(dot)com>
To: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "Alex Goncharov" <alex-goncharov(at)comcast(dot)net>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: help compiling psqldobc-08.03.0400
Date: 2009-07-15 14:05:23
Message-ID: 367B33A3B0BA27429CC76B74A71EECC4502CCA@snaex01.ms.severstalna.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Thanks for the replies. For some reason my emails have been taking a
couple days to go through on the mailing list. I ended up commenting
out some of the ifdef statements to get it to compile:

In odbcapi.c:

#ifdef WITH_UNIXODBC
SQLROWSETSIZE *pcrow,
#else
SQLULEN *pcrow,
#endif /* WITH_UNIXODBC */

I changed to:

SQLULEN *pcrow,

In odbcapi30.c

#if defined(_WIN64)
SQLLEN *NumericAttribute
#elif defined(WITH_UNIXODBC) || defined(WIN32)
SQLPOINTER NumericAttribute
#else
SQLLEN *NumericAttribute
#endif

I changed to:

SQLLEN *NumericAttribute

And in odbcapi30w.c

#if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64))
SQLPOINTER pNumAttr
#else
SQLLEN *pNumAttr
#endif

I changed to:

SQLLEN *pNumAttr

For some reason even though I have unixODBC installed it didn't like
those values it was defining. I was able to setup a database link
through oracle and everything seems to be working properly. Hopefully,
this won't cause any issues down the road. I would assume anyone else
trying to compile on redhat 64-bit would have the same issues.

Scott k.

-----Original Message-----
From: Albe Laurenz [mailto:laurenz(dot)albe(at)wien(dot)gv(dot)at]
Sent: Wednesday, July 15, 2009 3:35 AM
To: Kulik, Scott; pgsql-odbc(at)postgresql(dot)org
Subject: RE: [ODBC] help compiling psqldobc-08.03.0400

Scott Kulik wrote:
> Has anyone had any success compiling psqlodbc on Redhat Linux (I'm
using
> RHEL AS4). I have pretty much tried compiling with with every
> combination of odbc and postgres versions but never had any luck.
>
> I've been trying to figure this out for a few weeks but I think we may
> just have to end up paying the $500/server for the openlink
> driver/support.
>
> Anyone have any suggestions that might save us a few thousand dollars?

I never had any problems with it.
This is my log of a session where I installed 08.02.0500 on a 32-bit
RHEL4 machine:

Prerequisites:
(The first two packages are our own RPMs for PostgreSQL, you can use the
standard "libs" and "devel" packages)

# rpm -U adv-postgres-8.2.5-libs-1-1.i386.rpm
# rpm -U adv-postgres-8.2.5-devel-1-1.i386.rpm
# yum install unixODBC unixODBC-devel

Unpack and compile the software:
(Our packages install PostgreSQL into /magwien/postgres-8.2.5, so you
can just omit these settings with the standard RPMs)

$ cd /home/laurenz
$ export PATH=/magwien/postgres-8.2.5/bin:$PATH
$ tar -xzvf psqlodbc-08.02.0500.tar.gz
$ cd psqlodbc-08.02.0500
$ LDFLAGS=-Wl,-rpath,/magwien/postgres-8.2.5/lib ./configure
--prefix=/magwien/postgres-8.2.5
$ make

Install:

# cd /home/laurenz/psqlodbc-08.02.0500
# make install

You wrote that you encountered problems, but did not describe them.

Yours,
Laurenz Albe

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Lothar Behrens 2009-07-18 12:58:22 SQLForeignKey does not work
Previous Message Alex Goncharov 2009-07-15 12:28:29 Re: help compiling psqldobc-08.03.0400