Re: AWL: PostgreSQL ODBC. - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: AWL: PostgreSQL ODBC.
Date
Msg-id 3635E57A.8A9A6D8@alumni.caltech.edu
Whole thread Raw
Responses Re: [HACKERS] Re: AWL: PostgreSQL ODBC.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> YES!  That's exactly the problem!  Relinked with -Bsymbolic (which
> necessitates -lc -lm, as well) and all's fine.  Thanks.
> > In testing on my machine the linking works correctly...
> Yup.  It doesn't use -Bsymbolic by default.

Darn. It was apparently broken when the main Postgres distribution went
to this new separate Makefile.shlib. Will look at it, and it should be
fixed up in time for the v6.4 release. In the meantime your workaround
is the right thing to do, including the "-lc -lm" flags.

Sorry for the pain, but it took me two weeks of poking to figure out
this "misdirected linking problem", so I'm just spreading the joy around
a little bit ;)
                  - Thomas

Tom, I'm thinking of putting a "LDFLAGS_ODBC" into the port-specific
Makefile, to keep this goofy set of flags separate from other shared
libraries. They are necessary because the iodbc driver has _exactly_ the
same entry point names as the psqlodbc driver, and the linker
preferentially chooses the iodbc ones when resolving links (the setup is
that the iodbc generic driver dynamically links in the psqlodbc
db-specific one when connecting to a database). So you need to force
them beforehand with this flags, at least on Linux.


pgsql-hackers by date:

Previous
From: Sferacarta Software
Date:
Subject: Re[2]: [HACKERS] Re: [INTERFACES] Odbc parser error
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Last call?