-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install script does not use pg_config's LIBDIR for runtime linking #1356
Comments
Have you got a MR to suggest? |
See #1357. My original suggestion to pass pg_config's LDFLAGS to the linker was not correct because those flags are the ones that were used to build postgres so it doesn't follow that they should be used to build psycopg2 too. My solution in #1357 is to take just the LIBDIR from pg_config (which psycopg2's setup already used for compile-time linking) and use it for runtime linking. |
So, the real problem is that some "smarter" linking systems like For better or worse, A more "correct" solution as compared to #1357, where you are adding $ ldconfig -v 2>/dev/null | grep -v ^$'\t' | cut -d ":" -f 1
/usr/lib64//bind9-export
/usr/lib64/mysql
/lib
/lib64
/lib/sse2
/lib64/sse2
/lib64/tls Your system is configured in a way that Postgres is not on the loader path, and if you don't like it, then you should fix your system by adding it, or else, if you have reasons why you configured it this way, then you have to live with the consequences of this choice by either supplying Anyway, I would not complicate the world to support obscure edge cases like this with a lot of effort, or by adding |
The install script does not pass pg_config's LDFLAGS to the linker. In my case pg_config outputs the following LDFLAGS:
But the psycopg2 install script ignores everything that doesn't start with "-L", therefore it ignores the rpath configuration. Then, when psycopg2 is loaded by a uwsgi executable that has its own rpath the process exits with a "missing name" error because the fact that the executable has its own rpath prevents it from loading the psycopg2 library even though ldconfig has run and has properly configured the system.
To work around this I do
and then psycopg2 seems to work fine.
Please consider loading pg_config's LDFLAGS and passing them to the linker without user intervention.
The text was updated successfully, but these errors were encountered: