Re: Errors compiling psqlodbc - Mailing list pgsql-odbc

From Rich Silva
Subject Re: Errors compiling psqlodbc
Date
Msg-id 20041020190711.HBXP3551.lakecmmtao01.coxmail.com@CALICOBASS
Whole thread Raw
In response to Re: Errors compiling psqlodbc  ("Rich Silva" <rich.silva@softwareprose.com>)
List pgsql-odbc
Just to add more data to this...

I tried both the 08.00.0001 and 0002 source drops and although they compiled
with no errors our test program generated the following errors (some of this
is Wine Debug output, a trace...

The "environment" is Red Hat EL3. Postgres is 7.4.5 from RPMs (it may be a
Fedora release, but I think not, just don't have the trail, although I do
still have the rpms...). The Driver Manager is unixODBC 2.2.10-1.

We wrote this test program to help us diagnose why various operations that
we could make work in a Windows environment would not work in a Linux
environment. The program connects to the DSN, digs out some version
information then tries to create a table, fill it with data using
bulkoperations. The program is a windows binary, we run it using the WINE
emulator.

For what its worth, this same program works with version 07.05.0001,
although at the end of the test it invalidly reports "zero data" even though
the data was inserted into the table. (After I get this project over the
current hump, I can help generate some other data for this group if useful)

Rich

[Horse_08.00.0002_03.00]
Database Manager        : PostgreSQL
Database Manager Version: 08.00.0002 PostgreSQL 7.4.5 on
i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat
Linux 3.2.3-39)

CLI Driver Name         : libpsqlodbc.so
CLI Driver Version      : 08.00.0002

SQL_DRIVER_ODBC_VER     : 03.00
SQL_ODBC_VER            : 03.52

The ODBC SQLSetPos function is supported!
The ODBC SQLBulkOperations function is supported!

SQLSetStmtAttr: SQLError = 1, [unixODBC]Requested value changed.;
ERROR:  table "emp_bulk_test" does not exist

wine: Unhandled exception (thread 0009), starting debugger...
fixme:console:SetConsoleCtrlHandler (0x778dadc0,1) - no error checking or
testing yet
WineDbg starting on pid 0x8
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code
(0x7f62a3d3).
In 32 bit mode.
fixme:dbghelp:elf_load_debug_info Unsupported Dwarf2 information
0x7f62a3d3: movl        0x0(%eax,%edi,4),%edx
Wine-dbg>where
Backtrace:
=>1 0x7f62a3d3 (0x778edf90)
  2 0x7f63a93e (0x778edfd0)
  3 0x7f63aa8e (0x778ee020)
  4 0x7f638132 (0x778ee050)
  5 0x7ff92a7d SQLBulkOperations+0x33d in libodbc.so (0x778ee190)
  6 0x777ea136 SQLBulkOperations+0x96 in odbc32 (0x778ee1b4)
  7 0x004148faerr:dbghelp_msc:pe_load_debug_directory Got a page fault while
loading symbols
 (0x778efec8)
  8 0x0041948c (0x778eff20)
  9 0x77b83ef5 (0x778efff4)
  10 0xb75c10b1 wine_switch_to_stack+0x11 in libwine.so.1 (0x00000000)
Wine-dbg>

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-
> owner@postgresql.org] On Behalf Of Rich Silva
> Sent: Sunday, October 17, 2004 12:58 PM
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Errors compiling psqlodbc
>
>
> Thanx, I also received a reply from Peter on some of this...
>
> Good to know the 08.00.0002 branch is "stable"... We'll give that a try...
>
> Rich
>
> > -----Original Message-----
> > From: Dave Page [mailto:dpage@vale-housing.co.uk]
> > Sent: Sunday, October 17, 2004 10:57 AM
> > To: Rich Silva; pgsql-odbc@postgresql.org
> > Subject: RE: [ODBC] Errors compiling psqlodbc
> >
> > Apologies for top posting (dodgy webmail)...
> >
> > With 07.03.0200, 2.5 *was* the correct default ODBC version. That has
> been
> > removed from the current code for some time now though, so fixes or bugs
> > related to the ODBC version are now pretty much irrelevant unless they
> are
> > also present in the current code.
> >
> > The 08.00.0002 snapshot is pretty stable judging by the lack of bugs
> > reports we have seen about it - please try that version.
> >
> > Regards, Dave.
> >
> >
> >
> > -----Original Message-----
> > From: pgsql-odbc-owner@postgresql.org on behalf of Rich Silva
> > Sent: Sat 10/16/2004 11:58 PM
> > To: pgsql-odbc@postgresql.org
> > Subject: [ODBC] Errors compiling psqlodbc
> >
> >
> >
> >
> >
> > Hmmm, I was building the latest (07.03.0200) sources for a Linux system
> > and
> > I found first one then another issue.
> >
> >
> >
> > First issue (and already submitted as a bug): The default ODBCVER is not
> > 0x0300, but 0x0250. Configure does not set ODBCVER unless the -with-
> > odbcver
> > option is used. In psqlodbc.h, if ODBCVER is not set it defaults to
> > 0x0250.
> > I'm now using the configure line:
> >
> >
> >
> > ./configure --with-unixodbc --prefix=/usr --sysconfdir=/etc
> > --with-odbcver=0x0300
> >
> >
> >
> > Second issue (and still diagnosing), once I've configured with that
> define
> > the project will not compile, generating the following errors:
> >
> > convert.c: In function `copy_and_convert_field':
> >
> > convert.c:1194: incompatible types in assignment
> >
> > convert.c:1196: incompatible types in assignment
> >
> > convert.c:1202: incompatible types in assignment
> >
> > convert.c:1204: incompatible types in assignment
> >
> > (example line: *((SQLBIGINT *) rgbValueBindRow) = ATOI64(neut_str);)
> >
> >
> >
> > odbcapi.c: In function `SQLFetch':
> >
> > odbcapi.c:349: warning: initialization from incompatible pointer type
> >
> > (line: SQLINTEGER *pcRow = irdopts->rowsFetched;)
> >
> >
> >
> > odbcapi30.c: In function `SQLFetchScroll':
> >
> > odbcapi30.c:204: warning: initialization from incompatible pointer type
> >
> > (line: SQLINTEGER *pcRow = irdopts->rowsFetched, bkmarkoff = 0;)
> >
> >
> >
> > pgapi30.c: In function `IRDSetField':
> >
> > pgapi30.c:755: warning: assignment from incompatible pointer type
> >
> > (example: opts->rowsFetched = (SQLUINTEGER *) Value;)
> >
> > pgapi30.c: In function `IPDSetField':
> >
> > pgapi30.c:811: warning: assignment from incompatible pointer type
> >
> > pgapi30.c: In function `PGAPI_GetStmtAttr':
> >
> > pgapi30.c:1424: warning: assignment from incompatible pointer type
> >
> > pgapi30.c:1440: warning: assignment from incompatible pointer type
> >
> > pgapi30.c:1448: warning: assignment from incompatible pointer type
> >
> > pgapi30.c:1460: warning: assignment from incompatible pointer type
> >
> > pgapi30.c: In function `PGAPI_SetStmtAttr':
> >
> > pgapi30.c:1685: warning: assignment from incompatible pointer type
> >
> > pgapi30.c:1697: warning: assignment from incompatible pointer type
> >
> > pgapi30.c:1703: warning: assignment from incompatible pointer type
> >
> > pgapi30.c:1712: warning: assignment from incompatible pointer type
> >
> >
> >
> > Now, I'm not yet claiming to be a programmer, so I'm hoping that someone
> > has
> > tackled these before.
> >
> >
> >
> > Thanx for the help!
> >
> > Rich Silva
> >
> >
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




pgsql-odbc by date:

Previous
From: "Rich Silva"
Date:
Subject: What is the minimal ODBC ini entry?
Next
From: Karol Szkudlarek
Date:
Subject: Re: Snapshot release 08.00.0002 uploaded