an error while compiling psqlODBC on linux

From: "Chigodaev, Aleksandr" <ChigodaevAV(at)sinara-finance(dot)ru>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: an error while compiling psqlODBC on linux
Date: 2023-01-27 11:49:32
Message-ID: b30a62c82e6b45d99b5ff35b0be39a3d@sinara-finance.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


Dear psgql-odbc community!

While following the instructions to compile psqlODBC from psqlodbc-13.02.0000.tar.gz ( I believe this is the latest version)

https://odbc.postgresql.org/docs/unix-compilation.html

I executed the configure command with the following flags:

./configure --with-unixodbc=/usr/local/unixODBC/bin --with-libpq=/usr/include/postgresql/libpq

And then, I end up with the following error while executing the make command

=====

odbcapi30.c:120:1: error: conflicting types for 'SQLColAttribute'; have 'SQLRETURN(void *, SQLUSMALLINT, SQLUSMALLINT, void *, SQLSMALLINT, SQLSMALLINT *, void *)' {aka 'short int(void *, short unsigned int, short unsigned int, void *, short int, short int *, void *)'}
120 | SQLColAttribute(SQLHSTMT StatementHandle,
| ^~~~~~~~~~~~~~~
In file included from psqlodbc.h:112,
from odbcapi30.c:21:
/usr/include/sql.h:613:24: note: previous declaration of 'SQLColAttribute' with type 'SQLRETURN(void *, SQLUSMALLINT, SQLUSMALLINT, void *, SQLSMALLINT, SQLSMALLINT *, SQLLEN *)' {aka 'short int(void *, short unsigned int, short unsigned int, void *, short int, short int *, long int *)'}
613 | SQLRETURN SQL_API SQLColAttribute(SQLHSTMT StatementHandle,
| ^~~~~~~~~~~~~~~
make[1]: *** [Makefile:811: psqlodbcw_la-odbcapi30.lo] Error 1
make[1]: Leaving directory '/home/quant/psqlodbc/psqlodbc-13.02.0000'
make: *** [Makefile:479: all] Error 2

=====

Would you be able to suggest anything to resolve this compilation error?

I believe I have all the prerequisites installed correctly.

psql -version
psql (PostgreSQL) 14.6 (Ubuntu 14.6-0ubuntu0.22.04.1)

I would be glad to provide additional details on request.

Thanks in advance,
Alexander

Browse pgsql-odbc by date

  From Date Subject
Next Message Michael Binder 2023-02-07 13:31:32 psqlODBC development and support
Previous Message Jacobo Sánchez López 2023-01-16 15:42:06 Substitution of convert function "{fn CONVERT(1, SQL_BIGINT)}" to text litreral '1'