X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 114CD565DC for ; Wed, 16 Mar 2005 11:15:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34844-01 for ; Wed, 16 Mar 2005 11:15:45 +0000 (GMT) Received: from digicertmy1.digicert.com.my (www2.digicert.com.my [202.185.202.34]) by svr1.postgresql.org (Postfix) with SMTP id 5DF31565C4 for ; Wed, 16 Mar 2005 11:15:42 +0000 (GMT) Received: (qmail 25512 invoked by uid 104); 16 Mar 2005 11:15:42 -0000 Received: from sakthi@digicert.com.my by digicertmy1 with network-box scanner-1.10 (received+scanned in 7.67616 secs); 16 Mar 2005 11:15:42 -0000 X-Scanned-By-digicertmy1: Virus scan performed by network-box (www.network-box.com) X-Scanned-By-digicertmy1: Scanner file id is digicertmy1111097173551125430 X-Scanned-By-digicertmy1: No known viruses found in message (received+scanned in 7.67616 secs) X-Scanned-By-digicertmy1: Spam-Check-Result: No, hits=1.3 required=7.0 tests=AWL, FCS_URI_NODOTS, HTML_20_30, HTML_MESSAGE, J_CHICKENPOX_35, J_CHICKENPOX_64, RATWR7a_MESSID autolearn=no version=2.63 Received: from unknown (HELO digicertsakhti) (192.168.1.151) by 192.168.1.1 with SMTP; 16 Mar 2005 11:15:35 -0000 Message-ID: <006101c52a19$8e15a7a0$9701a8c0@digicert2003.com.my> From: "Sivasakthi d/o Sivagnanam" To: , Subject: PostGreSQL Date: Wed, 16 Mar 2005 19:16:09 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005E_01C52A5C.9C01D210" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.111 tagged_above=0 required=5 tests=HTML_40_50, HTML_MESSAGE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/61 X-Sequence-Number: 5079 This is a multi-part message in MIME format. ------=_NextPart_000_005E_01C52A5C.9C01D210 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, My problem is when I tried to test the odbc = connection(/usr/local/bin/iodbctest ... DSN=3DPgSQL), it failed with the = following error:- "[root@openldap2 bin]# iodbctest iODBC Demonstration program This program shows an interactive SQL processor Driver Manager: 03.52.0205.0204 Enter ODBC connect string (? shows list):=20 DSN | Driver = =20 -------------------------------------------------------------------------= ----- PgSQL | PostgreSQL = =20 Enter ODBC connect string (? shows list): DSN=3DPgSQL 1: SQLDriverConnect =3D [iODBC][Driver = Manager]/usr/local/lib/psqlodbc.so: undefined symbol: ucs2_to_utf8 (0) = SQLSTATE=3D00000 2: SQLDriverConnect =3D [iODBC][Driver Manager]Specified driver could = not be loaded (0) SQLSTATE=3DIM003 " I'm trying to get OpenLDAP to work with PostgreSQL. I did the = installation and configuration as per link: = http://www.samse.fr/GPL/ldap_pg/HOWTO/x37.html on how to get OpenLDAP to = work with PostgresSQL. Please note the errors i've encountered during = compilation[refer to Step3]....could that have something to do with why = my connection failed ? The versions of softwares are:- a.. PostgreSQL[from postgresql-8.0.1.tar.gz]=20 b.. iODBC [from libiodbc-3.52.2.tar.gz]=20 c.. PostgreSQL ODCB Driver[from psqlodbc-08.00.0101.tar.gz]=20 d.. OpenLDAP[2.2.23] Step1: Compiled PostgreSQL and created database pg_ldap and set allowed = host as local connection using authentication=3Dpassword [Status=3DOK] ./configure gmake su gmake install adduser postgres mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 & /usr/local/pgsql/bin/createdb pg_ldap /usr/local/pgsql/bin/psql pg_ldap Step2: Compiled iODBC [Status=3DOK] ./configure --with-iodbc-inidir=3D/etc make make install Step3: Compiled PostgreSQL... [Status=3DFailed]...the details are:- Action1: ./configure --with-iodbc- --with-odbcinst=3D/etc = [Status=3DFailed]... the error was:- "checking size of long... configure: error: cannot compute sizeof = (long), 77 See `config.log' for more details." Resolution: Following advise in this link = http://emacs-w3m.namazu.org/ml/msg07449.html, I've set export = LDFLAGS=3D'-Xlinker -R/usr/local/lib' Action1 again: ./configure --with-iodbc- --with-odbcinst=3D/etc = [Status=3DOK] Action2: make [Status=3DFailed]...the error was "make all-am make[1]: Entering directory = `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101' if /bin/sh ./libtool --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. -I. -I. = -g -O2 -MT odbcapi30w.lo -MD -MP -MF ".deps/odbcapi30w.Tpo" \ -c -o odbcapi30w.lo `test -f 'odbcapi30w.c' || echo './'`odbcapi30w.c; = \ then mv -f ".deps/odbcapi30w.Tpo" ".deps/odbcapi30w.Plo"; \ else rm -f ".deps/odbcapi30w.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT odbcapi30w.lo -MD -MP -MF = .deps/odbcapi30w.Tpo -c odbcapi30w.c -fPIC -DPIC -o .libs/odbcapi30w.o odbcapi30w.c:238: conflicting types for `SQLColAttributeW' /usr/local/include/sqlucode.h:122: previous declaration of = `SQLColAttributeW' make[1]: *** [odbcapi30w.lo] Error 1 make[1]: Leaving directory = `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101' make: *** [all] Error 2 " Resolution: I'm not sure how to resolve this...the only thing i could = think off is to comment those items. So I commented in 2 places where = "SQLColAttributeW" appeared in /usr/local/include/sqlucode.h Action2 again: make [Status=3DFailed]...the old error disappeared but = the new error was "make all-am make[1]: Entering directory = `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101' if /bin/sh ./libtool --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. -I. -I. = -g -O2 -MT odbcapi30.lo -MD -MP -MF ".deps/odbcapi30.Tpo" \ -c -o odbcapi30.lo `test -f 'odbcapi30.c' || echo './'`odbcapi30.c; \ then mv -f ".deps/odbcapi30.Tpo" ".deps/odbcapi30.Plo"; \ else rm -f ".deps/odbcapi30.Tpo"; exit 1; \ fi gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT odbcapi30.lo -MD -MP -MF = .deps/odbcapi30.Tpo -c odbcapi30.c -fPIC -DPIC -o .libs/odbcapi30.o odbcapi30.c:108: conflicting types for `SQLColAttribute' /usr/local/include/sql.h:840: previous declaration of `SQLColAttribute' make[1]: *** [odbcapi30.lo] Error 1 make[1]: Leaving directory = `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101' make: *** [all] Error 2 " Resolution: I'm not sure how to resolve this...the only thing i could = think off is to comment those items. So I commented "SQLColAttribute" in = /usr/local/include/sql.h Action2 again: make [Status=3DOK] Action3: make install Step4: Compile OpenLDAP Action1: ./configure --enable-sql --without-cyrus-sasl --disable-bdb = --enable-crypt [Status=3DOK] Action2: make depend [Status=3DOK] Action3: make [Status=3DOK] Action4: make install [Status=3DOK] Step5: Test ODBC Connection Error as reported above. Hope you could help me. .sakthi ------=_NextPart_000_005E_01C52A5C.9C01D210 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
My problem is when I tried to test the odbc=20 connection(/usr/local/bin/iodbctest ... DSN=3DPgSQL), it failed with the = following=20 error:-
"[root@openldap2 bin]# iodbctest
iODBC = Demonstration=20 program
This program shows an interactive SQL processor
Driver = Manager:=20 03.52.0205.0204
 
Enter ODBC connect string (? shows list): =
 
DSN          &= nbsp;           &n= bsp;      =20 |=20 Driver           &= nbsp;           &n= bsp;         =20
---------------------------------------------------------------------= ---------
PgSQL         &= nbsp;           &n= bsp;     =20 |=20 PostgreSQL          &nb= sp;           &nbs= p;      =20
 
Enter ODBC connect string (? shows list): = DSN=3DPgSQL
1:=20 SQLDriverConnect =3D [iODBC][Driver Manager]/usr/local/lib/psqlodbc.so: = undefined=20 symbol: ucs2_to_utf8 (0) SQLSTATE=3D00000
2: SQLDriverConnect =3D = [iODBC][Driver=20 Manager]Specified driver could not be loaded (0)=20 SQLSTATE=3DIM003
"
 
I'm trying to get OpenLDAP to work with PostgreSQL.=20 I did the installation and configuration as=20 per link: http://www.samse.= fr/GPL/ldap_pg/HOWTO/x37.html on=20 how to get OpenLDAP to work with PostgresSQL. Please note the errors = i've=20 encountered during compilation[refer to Step3]....could that have = something to=20 do with why my connection failed ?
The versions of softwares are:-
  • PostgreSQL[from postgresql-8.0.1.tar.gz]=20
  • iODBC [from libiodbc-3.52.2.tar.gz]=20
  • PostgreSQL ODCB Driver[from=20 psqlodbc-08.00.0101.tar.gz]=20
  • OpenLDAP[2.2.23]
Step1: Compiled PostgreSQL and created database = pg_ldap and=20 set allowed host as local connection using authentication=3Dpassword=20 [Status=3DOK]
./configure
gmake
su
gmake = install
adduser=20 postgres
mkdir /usr/local/pgsql/data
chown postgres=20 /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D = /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D=20 /usr/local/pgsql/data >logfile 2>&1=20 &
/usr/local/pgsql/bin/createdb = pg_ldap
/usr/local/pgsql/bin/psql=20 pg_ldap
 
Step2: Compiled iODBC [Status=3DOK]
./configure --with-iodbc-inidir=3D/etc
make
make install
 
Step3: Compiled PostgreSQL... = [Status=3DFailed]...the details=20 are:-
Action1: ./configure --with-iodbc-=20 --with-odbcinst=3D/etc [Status=3DFailed]... the error = was:-
"checking size of long... configure: error: cannot = compute=20 sizeof (long), 77
See `config.log' for more details."
Resolution: Following advise in = this link http://emacs-w3m.na= mazu.org/ml/msg07449.html,=20 I've set export LDFLAGS=3D'-Xlinker=20 -R/usr/local/lib'
 
Action1 again: ./configure --with-iodbc-=20 --with-odbcinst=3D/etc  [Status=3DOK]
Action2: make = [Status=3DFailed]...the=20 error was
"make  all-am
make[1]: Entering directory=20 `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101'
if = /bin/sh=20 ./libtool --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. -I. = -I.    =20 -g -O2 -MT odbcapi30w.lo -MD -MP -MF ".deps/odbcapi30w.Tpo" \
  = -c -o=20 odbcapi30w.lo `test -f 'odbcapi30w.c' || echo './'`odbcapi30w.c; = \
then mv -f=20 ".deps/odbcapi30w.Tpo" ".deps/odbcapi30w.Plo"; \
else rm -f=20 ".deps/odbcapi30w.Tpo"; exit 1; \
fi
 gcc -DHAVE_CONFIG_H -I. = -I. -I.=20 -g -O2 -MT odbcapi30w.lo -MD -MP -MF .deps/odbcapi30w.Tpo -c = odbcapi30w.c =20 -fPIC -DPIC -o .libs/odbcapi30w.o
odbcapi30w.c:238: conflicting types = for=20 `SQLColAttributeW'
/usr/local/include/sqlucode.h:122: previous = declaration of=20 `SQLColAttributeW'
make[1]: *** [odbcapi30w.lo] Error 1
make[1]: = Leaving=20 directory=20 `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101'
make:= ***=20 [all] Error 2
"
Resolution: I'm not sure how to = resolve=20 this...the only thing i could think off is to comment those items. = So I=20 commented in 2 places where "SQLColAttributeW" appeared in=20 /usr/local/include/sqlucode.h
 
Action2 again: make [Status=3DFailed]...the old = error=20 disappeared but the new error was
"make  all-am
make[1]: Entering directory=20 `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101'
if = /bin/sh=20 ./libtool --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. -I. = -I.    =20 -g -O2 -MT odbcapi30.lo -MD -MP -MF ".deps/odbcapi30.Tpo" \
  -c = -o=20 odbcapi30.lo `test -f 'odbcapi30.c' || echo './'`odbcapi30.c; \
then = mv -f=20 ".deps/odbcapi30.Tpo" ".deps/odbcapi30.Plo"; \
else rm -f=20 ".deps/odbcapi30.Tpo"; exit 1; \
fi
 gcc -DHAVE_CONFIG_H -I. = -I. -I.=20 -g -O2 -MT odbcapi30.lo -MD -MP -MF .deps/odbcapi30.Tpo -c = odbcapi30.c =20 -fPIC -DPIC -o .libs/odbcapi30.o
odbcapi30.c:108: conflicting types = for=20 `SQLColAttribute'
/usr/local/include/sql.h:840: previous declaration = of=20 `SQLColAttribute'
make[1]: *** [odbcapi30.lo] Error 1
make[1]: = Leaving=20 directory=20 `/usr/src/redhat/code_to_compile_latestldap/psqlodbc-08.00.0101'
make:= ***=20 [all] Error 2
"
Resolution: I'm not sure how to = resolve=20 this...the only thing i could think off is to comment those items. = So I=20 commented "SQLColAttribute" in = /usr/local/include/sql.h
 
Action2 again: make [Status=3DOK]
Action3: make install
 
Step4: Compile OpenLDAP
Action1: ./configure --enable-sql --without-cyrus-sasl = --disable-bdb=20 --enable-crypt [Status=3DOK]
Action2: make depend [Status=3DOK]
Action3: make [Status=3DOK]
Action4: make install [Status=3DOK]
 
Step5: Test ODBC Connection
Error as reported above.
 
Hope you could help me.
 
.sakthi
 
------=_NextPart_000_005E_01C52A5C.9C01D210--