help compiling psqldobc-08.03.0400
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?
The rest of my information is below. Let me know if there is anything
else I missed.
Thanks
Scott K.
-----Original Message-----
From: Kulik, Scott
Sent: Thursday, July 09, 2009 4:44 PM
To: pgsql-odbc [at] postgresql.org
Subject: RE: [ODBC] help compiling psqldobc-08.03.0400
I have installed unixODBC in /usr/local so I export then following:
export LD_LIBRARY_PATH=3D/usr/local/lib
export LDFLAGS=3D-L/usr/local/lib
export CPPFLAGS=3D-I/usr/local/include
I am not using any other configure options. I have tried
--with-unixodbc but I still get the same error message.
-----Original Message-----
From: Alex Goncharov [mailto:alex-goncharov [at] comcast.net]
Sent: Thursday, July 09, 2009 3:42 PM
To: Kulik, Scott
Cc: pgsql-odbc [at] postgresql.org
Subject: Re: [ODBC] help compiling psqldobc-08.03.0400
,--- You/Scott (Thu, 9 Jul 2009 15:07:07 -0400) ----*
| Here are my specs:
|
| unixODBC-2.2.14 (compiled from source)
| psqlodbc-08.03.0400 (attempting to compile from source)
Most important: what options do you call `configure' with when you are
trying to build PostgreSQL ODBC driver?
Most important in that: are you using --with-unixodbc?
-- Alex -- alex-goncharov [at] comcast.net --
/*
* Never let someone who says it cannot be done
* interrupt the person who is doing it.
*/
--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: help compiling psqldobc-08.03.0400
This is a multipart message in MIME format.
------=_NextPart_000_0099_01CA040B.28367790
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
hmm...looks like my original response didn't show up so i'm resending this.
I have installed unixODBC in /usr/local so I export then following:
export LD_LIBRARY_PATH=/usr/local/lib
export LDFLAGS=-L/usr/local/lib
export CPPFLAGS=-I/usr/local/include
I am not using any other configure options. I have tried --with-unixodbc
but I still get the same error message.
Scott K.
On 2009-07-09 19:42, Alex Goncharov wrote:
> ,--- You/Scott (Thu, 9 Jul 2009 15:07:07 -0400) ----*
> | Here are my specs:
> |
> | unixODBC-2.2.14 (compiled from source)
> | psqlodbc-08.03.0400 (attempting to compile from source)
>
> Most important: what options do you call `configure' with when you are
> trying to build PostgreSQL ODBC driver?
>
> Most important in that: are you using --with-unixodbc?
>
> -- Alex -- alex-goncharov [at] ??? --
>
> /*
> * Never let someone who says it cannot be done
> * interrupt the person who is doing it.
> */
>
>
Author: Kulik, Scott
Date: 2009-07-09 15:072009-07-09 19:07 -400UTC
To: pgsql-odbc
Subject: Re: [ODBC] help compiling psqldobc-08.03.0400
Anyone have any ideas on this? I've been playing around with some
different odbc and psqlodbc combinations with no luck so far.
I have tried all 8.0 versions of psqlodbc but they all get the same
errors running make as mentioned below. I was able to successfully
compile the latest version 7 but am having issues created a database
link from oracle 10g with this version so I'm trying to get the latest
8.0 working.
Thanks!
From: Kulik, Scott
Sent: Wednesday, June 24, 2009 3:34 PM
To: 'pgsql-odbc [at] ???'
Subject: help compiling psqldobc-08.03.0400
Hi,
Here are my specs:
Redhat Enterprise Linux AS4
unixODBC-2.2.14 (compiled from source)
psqlodbc-08.03.0400 (attempting to compile from source)
my postgresql rpm's:
[root [at] soo-srv-db4 psqlodbc-08.03.0400]# rpm -qa | grep postgres
postgresql-8.3.7-1PGDG.rhel4
postgresql-libs-8.3.7-1PGDG.rhel4
postgresql-devel-8.3.7-1PGDG.rhel4
....
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -Wall -g -O2 -MT
multibyte.lo -MD -MP -MF .deps/multibyte.Tpo -c multibyte.c -fPIC -DPIC
-o .libs/multibyte.o
if /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
-I. -I/usr/include -Wall -g -O2 -MT odbcapi.lo -MD -MP -MF
".deps/odbcapi.Tpo" -c -o odbcapi.lo odbcapi.c; \
then mv -f ".deps/odbcapi.Tpo" ".deps/odbcapi.Plo"; else rm -f
".deps/odbcapi.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -Wall -g -O2 -MT
odbcapi.lo -MD -MP -MF .deps/odbcapi.Tpo -c odbcapi.c -fPIC -DPIC -o
..libs/odbcapi.o
odbcapi.c:1115: error: syntax error before "SQLROWSETSIZE"
odbcapi.c: In function `SQLExtendedFetch':
odbcapi.c:1120: error: number of arguments doesn't match prototype
/usr/local/include/sqlext.h:1862: error: prototype declaration
odbcapi.c:1122: error: `hstmt' undeclared (first use in this function)
odbcapi.c:1122: error: (Each undeclared identifier is reported only once
odbcapi.c:1122: error: for each function it appears in.)
odbcapi.c:1132: error: `fFetchType' undeclared (first use in this
function)
odbcapi.c:1132: error: `irow' undeclared (first use in this function)
odbcapi.c:1132: error: `rgfRowStatus' undeclared (first use in this
function)
odbcapi.c:1133: error: `pcrow' undeclared (first use in this function)
make[1]: *** [odbcapi.lo] Error 1
make[1]: Leaving directory `/root/psqlodbc-08.03.0400'
make: *** [all] Error 2
Thanks
Scott K
------=_NextPart_000_0099_01CA040B.28367790
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
[at] font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:Consolas;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
..MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'>hmm...looks
like my original response didn't show up so i'm resending =
this.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'><o:p> </o:p></span><=
/p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'>I have
installed unixODBC in /usr/local so I export then =
following:<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'><o:p> </o:p></span><=
/p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'>export
LD_LIBRARY_PATH=3D/usr/local/lib<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'>export
LDFLAGS=3D-L/usr/local/lib<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'>export
CPPFLAGS=3D-I/usr/local/include<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'><o:p> </o:p></span><=
/p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'>I am not
using any other configure options. I have tried --with-unixodbc =
but I still
get the same error message.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'><o:p> </o:p></span><=
/p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.5pt;font-family:Consolas'>Scott =
K.<o:p></o:p></span></p>
<p><span style=3D'font-family:"Calibri","sans-serif"'>On 2009-07-09 =
19:42, Alex
Goncharov wrote:</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> ,--- You/Scott =
(Thu, 9
Jul 2009 15:07:07 -0400) ----*</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> | Here are my =
specs:</span>
<br>
<span style=3D'font-family:"Calibri","sans-serif"'>> | =
</span><br>
<span style=3D'font-family:"Calibri","sans-serif"'>> | =
unixODBC-2.2.14
(compiled from source)</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> | =
psqlodbc-08.03.0400
(attempting to compile from source)</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> </span><br>
<span style=3D'font-family:"Calibri","sans-serif"'>> Most important: =
what
options do you call `configure' with when you are</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> trying to build
PostgreSQL ODBC driver?</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> </span><br>
<span style=3D'font-family:"Calibri","sans-serif"'>> Most important =
in that:
are you using --with-unixodbc?</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> </span><br>
<span style=3D'font-family:"Calibri","sans-serif"'>> -- Alex --
alex-goncharov [at] ??? --</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> </span><br>
<span style=3D'font-family:"Calibri","sans-serif"'>> /*</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> * Never =
let someone
who says it cannot be done</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> * =
interrupt the
person who is doing it.</span> <br>
<span style=3D'font-family:"Calibri","sans-serif"'>> */</span> =
<br>
<span style=3D'font-family:"Calibri","sans-serif"'>> </span><br>
<span style=3D'font-family:"Calibri","sans-serif"'>> =
<o:p></o:p></span></p>
<p class=3DMsoNormal><b>Author: </b>Kulik, Scott<br>
<b>Date: </b>2009-07-09 15:072009-07-09 19:07 -400UTC<br>
<b>To: </b>pgsql-odbc<br>
<b>Subject: </b>Re: [ODBC] help compiling =
psqldobc-08.03.0400<o:p></o:p></p>
<p class=3DMsoNormal>Anyone have any ideas on this? I've been playing =
around with
some <br>
different odbc and psqlodbc combinations with no luck so far. <br>
<br>
<br>
<br>
I have tried all 8.0 versions of psqlodbc but they all get the same <br>
errors running make as mentioned below. I was able to successfully <br>
compile the latest version 7 but am having issues created a database =
<br>
link from oracle 10g with this version so I'm trying to get the latest =
<br>
8.0 working. <br>
<br>
<br>
<br>
Thanks! <br>
<br>
<br>
<br>
From: Kulik, Scott <br>
Sent: Wednesday, June 24, 2009 3:34 PM <br>
To: 'pgsql-odbc [at] ???' <br>
Subject: help compiling psqldobc-08.03.0400 <br>
<br>
<br>
<br>
Hi, <br>
<br>
<br>
<br>
Here are my specs: <br>
<br>
<br>
<br>
Redhat Enterprise Linux AS4 <br>
<br>
<br>
<br>
unixODBC-2.2.14 (compiled from source) <br>
<br>
psqlodbc-08.03.0400 (attempting to compile from source) <br>
<br>
<br>
<br>
my postgresql rpm's: <br>
<br>
[root [at] soo-srv-db4 psqlodbc-08.03.0400]# rpm -qa | grep postgres <br>
<br>
postgresql-8.3.7-1PGDG.rhel4 <br>
<br>
postgresql-libs-8.3.7-1PGDG.rhel4 <br>
<br>
postgresql-devel-8.3.7-1PGDG.rhel4 <br>
<br>
<br>
<br>
.... <br>
<br>
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -Wall -g -O2 -MT <br>
multibyte.lo -MD -MP -MF .deps/multibyte.Tpo -c multibyte.c -fPIC -DPIC =
<br>
-o .libs/multibyte.o <br>
<br>
if /bin/sh ./libtool --tag=3DCC --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. =
-I. <br>
-I. -I/usr/include -Wall -g -O2 -MT odbcapi.lo -MD -MP -MF <br>
".deps/odbcapi.Tpo" -c -o odbcapi.lo odbcapi.c; \ <br>
<br>
then mv -f ".deps/odbcapi.Tpo" ".deps/odbcapi.Plo"; =
else rm
-f <br>
".deps/odbcapi.Tpo"; exit 1; fi <br>
<br>
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -Wall -g -O2 -MT <br>
odbcapi.lo -MD -MP -MF .deps/odbcapi.Tpo -c odbcapi.c -fPIC -DPIC -o =
<br>
..libs/odbcapi.o <br>
<br>
odbcapi.c:1115: error: syntax error before "SQLROWSETSIZE" =
<br>
<br>
odbcapi.c: In function `SQLExtendedFetch': <br>
<br>
odbcapi.c:1120: error: number of arguments doesn't match prototype <br>
<br>
/usr/local/include/sqlext.h:1862: error: prototype declaration <br>
<br>
odbcapi.c:1122: error: `hstmt' undeclared (first use in this function) =
<br>
<br>
odbcapi.c:1122: error: (Each undeclared identifier is reported only once =
<br>
<br>
odbcapi.c:1122: error: for each function it appears in.) <br>
<br>
odbcapi.c:1132: error: `fFetchType' undeclared (first use in this <br>
function) <br>
<br>
odbcapi.c:1132: error: `irow' undeclared (first use in this function) =
<br>
<br>
odbcapi.c:1132: error: `rgfRowStatus' undeclared (first use in this <br>
function) <br>
<br>
odbcapi.c:1133: error: `pcrow' undeclared (first use in this function) =
<br>
<br>
make[1]: *** [odbcapi.lo] Error 1 <br>
<br>
make[1]: Leaving directory `/root/psqlodbc-08.03.0400' <br>
<br>
make: *** [all] Error 2 <br>
<br>
<br>
<br>
Thanks <br>
<br>
Scott K <o:p></o:p></p>
<p><o:p> </o:p></p>
</div>
</body>
</html>
------=_NextPart_000_0099_01CA040B.28367790--
Re: 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=3D/magwien/postgres-8.2.5/bin:$PATH
$ tar -xzvf psqlodbc-08.02.0500.tar.gz
$ cd psqlodbc-08.02.0500
$ LDFLAGS=3D-Wl,-rpath,/magwien/postgres-8.2.5/lib ./configure --prefix=3D/=
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
--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: help compiling psqldobc-08.03.0400
,--- You/Scott (Mon, 13 Jul 2009 15:29:35 -0400) ----*
| Has anyone had any success compiling psqlodbc on Redhat Linux (I'm using
| RHEL AS4).
Yes, of course, like a million times.
| The rest of my information is below. Let me know if there is
| anything else I missed.
You never sent out the full build log, starting with the `configure'
output.
-- Alex -- alex-goncharov [at] comcast.net --
--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: help compiling psqldobc-08.03.0400
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.albe [at] wien.gv.at]
Sent: Wednesday, July 15, 2009 3:35 AM
To: Kulik, Scott; pgsql-odbc [at] postgresql.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=3D/magwien/postgres-8.2.5/bin:$PATH
$ tar -xzvf psqlodbc-08.02.0500.tar.gz
$ cd psqlodbc-08.02.0500
$ LDFLAGS=3D-Wl,-rpath,/magwien/postgres-8.2.5/lib ./configure
--prefix=3D/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
--
Sent via pgsql-odbc mailing list (pgsql-odbc [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc