Skip site navigation (1) Skip section navigation (2)

Re: compiling psqlodbc for unixodbc -- problems

From: Ray Aspeitia <aspeitia(at)sells(dot)com>
To: duanewinner(at)att(dot)net, pgsql-odbc(at)postgresql(dot)org
Subject: Re: compiling psqlodbc for unixodbc -- problems
Date: 2004-03-08 21:09:00
Message-ID: p06002000bc728f910d9d@[192.168.5.55] (view raw or whole thread)
Thread:
Lists: pgsql-odbc
I had this problem on OSX,

it has to do with the compiler finding the similarly named file 
"sql.h" in the psql includes directory instead of your unixodbc 
includes directory.

What happened is that somehow the /usr/local/psql/includes directory 
comes before /usr/local/includes in the compiler string and it finds 
the psql version of sql.h first.

For me it was as simple as renaming the 
/usr/local/psql/includes/sql.h file to something else (BEWARE! your 
mileage may vary!) I must not have used some of those flags in that 
file (many define parameters in that file), so that when the compiler 
searched the directory /usr/local/psql/includes and didn't find 
sql.h, it continued on to /usr/local/includes.

You should check the HACKERS list for further information on the 
progress of this. I believe it is in discussion.

Ray A.


>Can anybody provide me with some help on this issue?
>
>I'm attempting to build psqlodbc-07.03.0200 in an attempt to use this
>driver with unixodbc.
>
>I first configure:
># ./configure --with-unixodbc
>I don't see any errors when I do this.
>
>Then I "make":
>#make
>
>And this is what I get:
>
>make  all-am
>source='info.c' object='info.lo' libtool=yes  depfile='.deps/info.Plo'
>tmpdepfile='.deps/info.TPlo'  depmode=gcc /usr/local/bin/bash ./depcomp
>/usr/local/bin/bash ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
>-I.      -g -O2 -c -o info.lo `test -f 'info.c' || echo './'`info.c
>gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c info.c
>-Wp,-MD,.deps/info.TPlo  -fPIC -DPIC -o info.lo
>In file included from info.c:19:
>psqlodbc.h:41: sql.h: No such file or directory
>psqlodbc.h:42: sqlext.h: No such file or directory
>psqlodbc.h:52: odbcinst.h: No such file or directory
>*** Error code 1
>
>Stop in /root/psqlodbc-07.03.0200.
>*** Error code 1
>
>Stop in /root/psqlodbc-07.03.0200.
>
>
>I am running FreeBSD-4.9-RELEASE-p3
>Postgresql-7.3.5_1 (installed from ports)
>unixODBC-2.2.8 (installed from ports)
>
>Thanks for any input you can provide.
>
>-DW
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


In response to

pgsql-odbc by date

Next:From: Tom LaneDate: 2004-03-08 21:31:23
Subject: Re: compiling psqlodbc for unixodbc -- problems
Previous:From: Duane WinnerDate: 2004-03-08 20:14:20
Subject: compiling psqlodbc for unixodbc -- problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group