Re: PG Extensions: Must be statically linked? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PG Extensions: Must be statically linked?
Date
Msg-id 1634.1141406118@sss.pgh.pa.us
Whole thread Raw
In response to Re: PG Extensions: Must be statically linked?  ("Craig A. James" <cjames@modgraph-usa.com>)
Responses Re: PG Extensions: Must be statically linked?
List pgsql-hackers
"Craig A. James" <cjames@modgraph-usa.com> writes:
> So now my question is: Can I somehow add other directories/libraries
> to those that Postgres uses?

This is not a Postgres problem, it's a dynamic-linker problem, and
I don't believe there is a different dynamic linker for C++ than C.
Your problem is just to get your shared library marked as needing
libstdc++.so.  (ldd on the .so should show what shared libraries it
needs.)  On Linux this should all happen pretty much automatically,
at least for libraries that are in the ldconfig search path.  I'm
not sure what is going wrong, but you could take a look at
contrib/dblink, which dynamically includes libpq.so (and the backend
certainly does not load libpq.so by default).  If that works on your
machine then try to figure out what dblink's Makefile does differently
from yours.

My concern about how nicely libstdc++ will play in the backend
environment still stands though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Automatic free space map filling
Next
From: Stephan Szabo
Date:
Subject: Re: Foreign keys for non-default datatypes