Re: [ODBC] ODBC constructs - Mailing list pgsql-general

From Dev Kumkar
Subject Re: [ODBC] ODBC constructs
Date
Msg-id CALSLE1PD8tAT+euR=w0iXgqdnagYwwYKB6a6DxcRaGeZ4tzVJQ@mail.gmail.com
Whole thread Raw
In response to Re: [ODBC] ODBC constructs  (Dev Kumkar <devdas.kumkar@gmail.com>)
List pgsql-general
On Tue, May 21, 2013 at 11:28 PM, Dev Kumkar <devdas.kumkar@gmail.com> wrote:
On Tue, May 21, 2013 at 10:49 PM, John R Pierce <pierce@hogranch.com> wrote:
its looking for the RPM installed packages it was linked against. its not looking to see if any same named files just happen to be on your system.

Oh, got it. So the only way is to do bless it thru 'yum install unixODBC-libs' only. Hmm need this going tomorrow. Thanks so far!

The other method which I was trying to manually install psqlODBC library is also stuck because of incomplete configuration.

Started first with looking more into building psqlODBC today and things looks good. Need to write a test program though.

# cd psqlodbc-09.01.0200

-- The configuration failed with following error (same as yesterday)
# ./configure
configure: error: libpq library not found

-- ran with --with-libpq and it could find libpq this time
# ./configure --with-libpq=/usr/pgsql-9.1

-- next make failed with following error
# make
odbcapi.c:1125: error: expected declaration specifiers or '...' before 'SQLROWSE
odbcapi.c:1130: error: conflicting types for 'SQLExtendedFetch'
/usr/local/include/sqlext.h:1927: error: previous declaration of 'SQLExtendedFet
odbcapi.c: In function 'SQLExtendedFetch':
odbcapi.c:1143: error: 'pcrow' undeclared (first use in this function)
odbcapi.c:1143: error: (Each undeclared identifier is reported only once
odbcapi.c:1143: error: for each function it appears in.)
make[1]: *** [odbcapi.lo] Error 1
make[1]: Leaving directory `/installers/psqlodbc-09.01.0200'
make: *** [all] Error 2

-- Went ahead and edited odbcapi.c and changed definition of SQLExtendedFetch
-- to match with the types defined in /usr/local/include/sqlext/sqlext.h
-- Works this time
# make

# make install
make[1]: Entering directory `/installers/psqlodbc-09.01.0200'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /usr/bin/install -c  'psqlodbcw.la' '/usr/local/lib/psqlodbcw.la'
libtool: install: /usr/bin/install -c .libs/psqlodbcw.so /usr/local/lib/psqlodbcw.so
libtool: install: /usr/bin/install -c .libs/psqlodbcw.lai /usr/local/lib/psqlodbcw.la
libtool: finish: PATH="......." ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/installers/psqlodbc-09.01.0200'
#

Well need to write a test program though whether its really working.

Regards...

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: data file corruption
Next
From: Dev Kumkar
Date:
Subject: Re: [ODBC] ODBC constructs