Обсуждение: Re: [INTERFACES] ODBC for Mac OS
Sean Davis <sdavis2@mail.nih.gov> writes: > I'm trying to compile psqlodbc-08.02.0200 for Mac OS. I'm getting the > following when I try to do that: > gcc -o .libs/psqlodbcw.so -bundle .libs/info.o .libs/bind.o > .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o > .libs/environ.o .libs/execute.o .libs/lobj.o .libs/win_md5.o > .libs/misc.o .libs/options.o .libs/pgtypes.o .libs/psqlodbc.o > .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o > .libs/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o > .libs/multibyte.o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o > .libs/pgapi30.o .libs/info30.o .libs/mylog.o .libs/odbcapi30w.o > .libs/odbcapiw.o .libs/win_unicode.o -L/Users/sdavis/local/pgsql/lib > -lpgport -lz -lreadline -lresolv -ldl -lm -lpq > /usr/bin/ld: Undefined symbols: > _CONNLOCK_ACQUIRE > _CONNLOCK_RELEASE > _INIT_CONNLOCK > _SSL_get_error > _SSL_read > _SSL_write > _SQLGetPrivateProfileString > _SQLWritePrivateProfileString > collect2: ld returned 1 exit status > make[1]: *** [psqlodbcw.la] Error 1 Darwin is pickier than most other OSes about requiring that all symbols referenced by a shared library be defined in one or another of the shared libraries listed when it's linked. In this case the link command is clearly missing a -l switch for OpenSSL, and probably a couple other things. ODBC guys, can you fix this? regards, tom lane
On Sunday 25 March 2007 22:45, Tom Lane wrote: > Sean Davis <sdavis2@mail.nih.gov> writes: > > I'm trying to compile psqlodbc-08.02.0200 for Mac OS. I'm getting the > > following when I try to do that: > > > > gcc -o .libs/psqlodbcw.so -bundle .libs/info.o .libs/bind.o > > .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o > > .libs/environ.o .libs/execute.o .libs/lobj.o .libs/win_md5.o > > .libs/misc.o .libs/options.o .libs/pgtypes.o .libs/psqlodbc.o > > .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o > > .libs/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o > > .libs/multibyte.o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o > > .libs/pgapi30.o .libs/info30.o .libs/mylog.o .libs/odbcapi30w.o > > .libs/odbcapiw.o .libs/win_unicode.o -L/Users/sdavis/local/pgsql/lib > > -lpgport -lz -lreadline -lresolv -ldl -lm -lpq > > /usr/bin/ld: Undefined symbols: > > _CONNLOCK_ACQUIRE > > _CONNLOCK_RELEASE > > _INIT_CONNLOCK > > _SSL_get_error > > _SSL_read > > _SSL_write > > _SQLGetPrivateProfileString > > _SQLWritePrivateProfileString > > collect2: ld returned 1 exit status > > make[1]: *** [psqlodbcw.la] Error 1 > > Darwin is pickier than most other OSes about requiring that all symbols > referenced by a shared library be defined in one or another of the > shared libraries listed when it's linked. In this case the link command > is clearly missing a -l switch for OpenSSL, and probably a couple other > things. ODBC guys, can you fix this? Thanks, Tom. I'll see what I can work out here, but I'm a bit out of my league. Sean
Hi Sean Davis-san. I am wishing this to help you. Thanks! Regards, Hiroshi Saito Sent: Tuesday, March 27, 2007 10:49 AM Subject: [COMMITTERS] psqlodbc - psqlodbc: The lib verification of OpenSSL was added. > Log Message: > ----------- > The lib verification of OpenSSL was added. > It was confirmed in Linux. > This might correspond to the problem report of Darwin. > from Sean Davis. > Thanks! > > Modified Files: > -------------- > psqlodbc: > configure.ac (r1.57 -> r1.58) > (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/psqlodbc/psqlodbc/configure.ac.diff?r1=1.57&r2=1.58) > ----- Original Message ----- From: "Sean Davis" <sdavis2@mail.nih.gov> To: "Tom Lane" <tgl@sss.pgh.pa.us> Cc: <pgsql-interfaces@postgresql.org>; <pgsql-odbc@postgresql.org> Sent: Monday, March 26, 2007 7:36 PM Subject: Re: [ODBC] [INTERFACES] ODBC for Mac OS > On Sunday 25 March 2007 22:45, Tom Lane wrote: >> Sean Davis <sdavis2@mail.nih.gov> writes: >> > I'm trying to compile psqlodbc-08.02.0200 for Mac OS. I'm getting the >> > following when I try to do that: >> > >> > gcc -o .libs/psqlodbcw.so -bundle .libs/info.o .libs/bind.o >> > .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o >> > .libs/environ.o .libs/execute.o .libs/lobj.o .libs/win_md5.o >> > .libs/misc.o .libs/options.o .libs/pgtypes.o .libs/psqlodbc.o >> > .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o >> > .libs/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o >> > .libs/multibyte.o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o >> > .libs/pgapi30.o .libs/info30.o .libs/mylog.o .libs/odbcapi30w.o >> > .libs/odbcapiw.o .libs/win_unicode.o -L/Users/sdavis/local/pgsql/lib >> > -lpgport -lz -lreadline -lresolv -ldl -lm -lpq >> > /usr/bin/ld: Undefined symbols: >> > _CONNLOCK_ACQUIRE >> > _CONNLOCK_RELEASE >> > _INIT_CONNLOCK >> > _SSL_get_error >> > _SSL_read >> > _SSL_write >> > _SQLGetPrivateProfileString >> > _SQLWritePrivateProfileString >> > collect2: ld returned 1 exit status >> > make[1]: *** [psqlodbcw.la] Error 1 >> >> Darwin is pickier than most other OSes about requiring that all symbols >> referenced by a shared library be defined in one or another of the >> shared libraries listed when it's linked. In this case the link command >> is clearly missing a -l switch for OpenSSL, and probably a couple other >> things. ODBC guys, can you fix this? > > Thanks, Tom. I'll see what I can work out here, but I'm a bit out of my > league. > > Sean > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend >
Hi Sean-san. From: "Sean Davis" <sdavis2@mail.nih.gov> > On Monday 26 March 2007 21:56, Hiroshi Saito wrote: >> Hi Sean Davis-san. >> >> I am wishing this to help you. >> Thanks! >> >> Regards, >> Hiroshi Saito > > Thank you very much, Hiroshi, for the quick response. That change does appear > to have fixed the SSL problem. However, there are other problems. I have > attached the entire config.log and make output, but here is the last part of > the make output: > > gcc -o .libs/psqlodbcw.so -bundle .libs/info.o .libs/bind.o .libs/columninfo.o > .libs/connection.o .libs/convert.o .libs/drvconn.o .libs/environ.o .libs/execut > e.o .libs/lobj.o .libs/win_md5.o .libs/misc.o .libs/options.o .libs/pgtypes.o .l > ibs/psqlodbc.o .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o .lib > s/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o .libs/multibyte > .o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o .libs/pgapi30.o .libs/in > fo30.o .libs/mylog.o .libs/odbcapi30w.o .libs/odbcapiw.o .libs/win_unicode.o -L > /usr/local/pgsql/lib -lssl -lcrypto > /usr/bin/ld: Undefined symbols: Uga...As for it, the link is generated as follows if original. gcc -shared .libs/info.o .libs/bind.o .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o .libs/environ.o .libs/execute.o .libs/lobj.o .libs/win_md5.o .libs/misc.o .libs/options.o .libs/pgtypes.o .libs/psqlodbc.o .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o .libs/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o .libs/multibyte.o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o .libs/pgapi30.o .libs/info30.o .libs/mylog.o .libs/odbcapi30w.o .libs/odbcapiw.o .libs/win_unicode.o -L/usr/local/lib -L/usr/local/pgsql/lib -lpq -lpthread /usr/local/lib/libodbcinst.so -lssl -lcrypto -ldl -Wl,-soname -Wl,psqlodbcw.so -o .libs/psqlodbcw.so Umm, What result does your pg_config obtain? > _CONNLOCK_ACQUIRE > _CONNLOCK_RELEASE > _INIT_CONNLOCK > _PQcancel > _PQerrorMessage > _PQfinish > _PQfreeCancel > _PQgetCancel > _PQgetssl > _PQprotocolVersion > _PQserverVersion > _PQsocket > _PQstatus > _PQuser > _SQLGetPrivateProfileString > _SQLWritePrivateProfileString > _PQconnectdb > collect2: ld returned 1 exit status > make[1]: *** [psqlodbcw.la] Error 1 > make: *** [all] Error 2 > Ahh, It seems to obtain pthread and libpq. > Still more linker issues, it appears. I don't think it is just my machine--I > tried this on a couple of machines with the same results. > > Sean >
On Tuesday 27 March 2007 07:59, Hiroshi Saito wrote: > Hi Sean-san. > > From: "Sean Davis" <sdavis2@mail.nih.gov> > > > On Monday 26 March 2007 21:56, Hiroshi Saito wrote: > >> Hi Sean Davis-san. > >> > >> I am wishing this to help you. > >> Thanks! > >> > >> Regards, > >> Hiroshi Saito > > > > Thank you very much, Hiroshi, for the quick response. That change does > > appear to have fixed the SSL problem. However, there are other problems. > > I have attached the entire config.log and make output, but here is the > > last part of the make output: > > > > gcc -o .libs/psqlodbcw.so -bundle .libs/info.o .libs/bind.o > > .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o > > .libs/environ.o .libs/execut e.o .libs/lobj.o .libs/win_md5.o > > .libs/misc.o .libs/options.o .libs/pgtypes.o .l ibs/psqlodbc.o > > .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o .lib > > s/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o > > .libs/multibyte .o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o > > .libs/pgapi30.o .libs/in fo30.o .libs/mylog.o .libs/odbcapi30w.o > > .libs/odbcapiw.o .libs/win_unicode.o -L /usr/local/pgsql/lib -lssl > > -lcrypto > > /usr/bin/ld: Undefined symbols: > > Uga...As for it, the link is generated as follows if original. > > gcc -shared .libs/info.o .libs/bind.o .libs/columninfo.o > .libs/connection.o .libs/convert.o .libs/drvconn.o .libs/environ.o > .libs/execute.o .libs/lobj.o .libs/win_md5.o .libs/misc.o .libs/options.o > .libs/pgtypes.o .libs/psqlodbc.o .libs/qresult.o .libs/results.o > .libs/socket.o .libs/parse.o .libs/statement.o .libs/tuple.o > .libs/dlg_specific.o .libs/loadlib.o .libs/multibyte.o .libs/odbcapi.o > .libs/descriptor.o .libs/odbcapi30.o .libs/pgapi30.o .libs/info30.o > .libs/mylog.o .libs/odbcapi30w.o .libs/odbcapiw.o .libs/win_unicode.o > -L/usr/local/lib -L/usr/local/pgsql/lib -lpq -lpthread > /usr/local/lib/libodbcinst.so -lssl -lcrypto -ldl -Wl,-soname > -Wl,psqlodbcw.so -o .libs/psqlodbcw.so > > Umm, What result does your pg_config obtain? I did a clean install of postgres, just to make sure.... bash$ pg_config BINDIR = /usr/local/pgsql/bin DOCDIR = /usr/local/pgsql/doc INCLUDEDIR = /usr/local/pgsql/include PKGINCLUDEDIR = /usr/local/pgsql/include INCLUDEDIR-SERVER = /usr/local/pgsql/include/server LIBDIR = /usr/local/pgsql/lib PKGLIBDIR = /usr/local/pgsql/lib LOCALEDIR = MANDIR = /usr/local/pgsql/man SHAREDIR = /usr/local/pgsql/share SYSCONFDIR = /usr/local/pgsql/etc PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--with-perl' '--with-python' CC = gcc -no-cpp-precomp CPPFLAGS = CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing CFLAGS_SL = LDFLAGS = LDFLAGS_SL = LIBS = -lpgport -lz -lreadline -lm VERSION = PostgreSQL 8.2.3 The error when making psqlodbc is the same. Sean
Hi. Ooops, SSL was not effective to PostgreSQL that you had replaced. However, psqlODBC should be able to be constructed without SSL. Please let me adjust it later about this. >> > gcc -o .libs/psqlodbcw.so -bundle .libs/info.o .libs/bind.o >> > .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o >> > .libs/environ.o .libs/execut e.o .libs/lobj.o .libs/win_md5.o >> > .libs/misc.o .libs/options.o .libs/pgtypes.o .l ibs/psqlodbc.o >> > .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o .lib >> > s/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o >> > .libs/multibyte .o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o >> > .libs/pgapi30.o .libs/in fo30.o .libs/mylog.o .libs/odbcapi30w.o >> > .libs/odbcapiw.o .libs/win_unicode.o -L /usr/local/pgsql/lib -lssl >> > -lcrypto >> > /usr/bin/ld: Undefined symbols: As for either of your this result, it is strange. ?_? Makefile.ac seems not to be developed correctly. -lpq has the mechanism that any development is allotted.... Regards, Hiroshi Saito
"Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes: > As for either of your this result, it is strange. ?_? > Makefile.ac seems not to be developed correctly. > -lpq has the mechanism that any development is allotted.... Hmm, broken autoconf or automake? But he said he got the same results on other machines ... regards, tom lane
Hi. From: "Tom Lane" <tgl@sss.pgh.pa.us> > "Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes: >> As for either of your this result, it is strange. ?_? >> Makefile.ac seems not to be developed correctly. >> -lpq has the mechanism that any development is allotted.... > > Hmm, broken autoconf or automake? But he said he got the same > results on other machines ... Ahh Yes.. Therefore, I am looking at his config.log now. Please give the inspection time for a while... Regards, Hiroshi Saito
On Tuesday 27 March 2007 10:04, Tom Lane wrote: > "Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes: > > As for either of your this result, it is strange. ?_? > > Makefile.ac seems not to be developed correctly. > > -lpq has the mechanism that any development is allotted.... > > Hmm, broken autoconf or automake? But he said he got the same > results on other machines ... Both were intel-based Macs running the same OS version and Xcode version. However, I have compiled postgresql from source (and a bunch of other stuff) from source without significant problems. I'm sorry I can't be more help here, and I am behind no fewer than 4 firewalls, so I can't give you access to any machines for testing. Sean
Hi. From: "Sean Davis" <sdavis2@mail.nih.gov> > Both were intel-based Macs running the same OS version and Xcode version. > However, I have compiled postgresql from source (and a bunch of other stuff) > from source without significant problems. I'm sorry I can't be more help > here, and I am behind no fewer than 4 firewalls, so I can't give you access > to any machines for testing. Ah Ok, You acquire from present CVS when it is possible and try again? At that time, please send me the following one directly with mail. tar cf - Make* config*|gzip -c ->psqlODBC_DEBUG.tgz Thanks! Regards, Hiroshi Saito
Hi. From: "Sean Davis" <sdavis2@mail.nih.gov> >> > gcc -o .libs/psqlodbcw.so -bundle .libs/info.o .libs/bind.o >> > .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o >> > .libs/environ.o .libs/execute.o .libs/lobj.o .libs/win_md5.o .libs/misc.o >> > .libs/options.o .libs/pgtypes.o .libs/psqlodbc.o .libs/qresult.o >> > .libs/results.o .libs/socket.o .libs/parse.o .libs/statement.o >> > .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o .libs/multibyte.o >> > .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o .libs/pgapi30.o >> > .libs/info30.o .libs/mylog.o .libs/odbcapi30w.o .libs/odbcapiw.o >> > libs/win_unicode.o -L/usr/local/pgsql/lib -lpq -lssl -lcrypto >> > /usr/bin/ld: Undefined symbols: >> > _SQLGetPrivateProfileString >> > _SQLWritePrivateProfileString >> > collect2: ld returned 1 exit status >> > make[1]: *** [psqlodbcw.la] Error 1 >> > make: *** [all] Error 2 >> >> Um, what configure option? >> configure --enable-unicode --with-iodbc --with-odbcver=0x0300 >> --enable-pthreads --with-openssl > > no options specified in what I sent to you. If I use the options you just > sent, I get a build! I have to try it out, but it built without errors. > Thanks for all the help, and I will let you know if I have further problems. Oh ok, I understood the mistake was found in the option of either iodbc or unixodbc.:-) I think becoming for your help to be glad. It will be repaired soon. Anyway, Thanks!! Regards, Hiroshi Saito