Re: postgres odbc applix
От | Cary B. O'Brien |
---|---|
Тема | Re: postgres odbc applix |
Дата | |
Msg-id | 199810281526.KAA22004@access1.digex.net обсуждение исходный текст |
Список | pgsql-interfaces |
> Hi Cary, > > I finally got 6.3.2 installed and working, and the error has shifted to: > > Error from ODBC gateway. > S1001::Couldn't allocate statement for SQLTables result > OK, we've seen this one before. > I tried rebuilding the odbc driver with -Bsymbolic and -lm -lc, as > described, but I get this error: > This seems to be the solution. > ld -shared -Bsymbolic -soname libpsqlodbc.so.0.25 -o libpsqlodbc.so.0.25 info.o bind.o columninfo.o connection.o convert.odrvconn.o environ.o execute.o lobj.o misc.o options.o pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.ostatement.o gpps.o tuple.o tuplelist.o dlg_specific.o Hmm.. I don't see -lm or -lc in the ld call. > info.o: In function `SQLGetInfo': > info.o(.text+0x3ec): undefined reference to `sprintf' > info.o(.text+0x54f): undefined reference to `strncmp' > info.o: In function `SQLGetTypeInfo': > info.o(.text+0xec4): undefined reference to `malloc' > (followed by many more similar undefined reference errors). > > Here is the changed section of the makefile > > ifeq ($(PORTNAME), linux) > install-shlib-dep := install-shlib > shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSIO > N) > #LDFLAGS_SL := -shared -soname $(shlib) > LDFLAGS_SL := -shared -Bsymbolic -soname $(shlib) > CFLAGS += $(CFLAGS_SL) > SHLIB_LNK := -lm -lc > endif > > RedHat 5.1, pg 6.3.2 This *SHOULD* be the fix, but why didn't it work. Hey, wait, I don't even have a Makefile.shlib. Ok, so I have a pre-release version. It uses -Bsymbolic -lc -lm in the link. Download ftp://postgresql.org/pub/patches/psqlodbc-025-6.4beta.tar.gz... Unpack... ./configure, make, nope, no -Bsymbolic in the final ld. Edit Makefile.shlib as shown in http://www.access.digex.net/~cobrien/applix/applix.txt make clean, make, AHA! Tons of undefined symbols just like you said. Hm... Try ./configure, make. Still doesn't work. Fiddle... ARRG: In the makefile, > SHLIB_LNK := -lm -lc Should be > SHLIB_LINK := -lm -lc Rebuild, yup this works! Grumble. Fix web page. Sorry about that. Hope this helps. -- cary > > Thanks in advance, > Evelyn Mitchell > efm@tummy.com > > On Sat, Oct 24, 1998 at 12:20:57PM -0400, Cary B. O'Brien wrote: > > > Once I got the right library specified in .odbc.ini, I'm really close > > > to getting the odbc link working.. > > > > > > I ran into this error: > > > > > > Error from ODBC gateway > > > 28000::Failed to authenticate client as Postgres user 'efm' using > > > <unknown authentication type>: be_recvauth: unrecognized message type: 65536 > > > > > > I've tried it with several combinations of logins, but haven't had > > > much luck yet. My guess is that this is a good sign, as an attempt to > > > authenticate would indicate that the odbc pipe is working. > > > > > > > Sorry about the delay, very busy. > > > > Good news: be_recvauth is the routine in the postgresql backend that > > authenticates incoming connections. So you are loading the right > > libraries and connecting to the backend. > > > > Bad news: I can't seem to find the source of the 'unrecognized message type' > > error message. Grepping the PostgreSQL 6.4 and 6.3.1 source (what I've got > > at hand) for unrecognized doesn't come up with the error message that > > you've got. > > > > Things to check: > > > > 1) Are you using a reasonably new version of PostgreSQL? 6.3.2 is the > > stable version, 6.4 is just about to be released. > > > > 2) Check your PostgreSQL authentication file (pg_hba.conf) for errors. It > > should be in your PG_DATA directory, at the top of where the database data > > files are kept. > > > > 3) Make sure you can connect to the databse with psql, but using TCP rather > > than UNIX sockets. I.E. run > > > > psql -h hostname -d dbname > > > > And see what happens. This _should_ connect to the database the same > > way that PostODBC does. > > > > 4) As a last resort, 'strace -s 1024 -f -p <pid>' the postmaster process. > > This will show you the data transfers in detail. > > > > 5) One thing that can really mess things up is old postgres libraries > > lying around. check for old libpq libraries. > > > > Good luck, and please let me know how things go. I haven't seen this error > > message yet, and I'd like to add it to the debug section of > > > > http://www.access.digex.net/~cobrien/applix/applix.txt > > > > -- cary > > > > Cary O'Brien > > cobrien@access.digex.net > > > > > > > Thanks for all your help, > > > Evelyn Mitchell > > > efm@tummy.com > > > -- > > > http://www.tummy.com/ Consulting and Software for Linux and Unix > > > XVScan - Scanning software for Linux, HP-UX, Solaris, FreeBSD and BSD/OS > > > > Hmm... Wife's been agitating about getting a scanner... > > > > -- > http://www.tummy.com/ Consulting and Software for Linux and Unix > XVScan - Scanning software for Linux, HP-UX, Solaris, FreeBSD and BSD/OS >
В списке pgsql-interfaces по дате отправления: