Skip to content

Add pg_config libdir to the library's rpath#1357

Open
gtzampanakis wants to merge 1 commit into
psycopg:masterfrom
gtzampanakis:master
Open

Add pg_config libdir to the library's rpath#1357
gtzampanakis wants to merge 1 commit into
psycopg:masterfrom
gtzampanakis:master

Conversation

@gtzampanakis

Copy link
Copy Markdown

Close #1356.

@gtzampanakis

Copy link
Copy Markdown
Author

NOTE: I have tested this only on centos.

@gtzampanakis

Copy link
Copy Markdown
Author

Looks like rpath is not supported on windows and it failed the build. I just pushed 99262a2 which runs the fix only on Linux.

@gtzampanakis

Copy link
Copy Markdown
Author

Will this be merged?

@dvarrazzo

Copy link
Copy Markdown
Member

Hi, sorry, I thought you still had issues to solve around it.

This changeset makes me pretty nervous because it has just no test. Is there a way to reproduce the issue in first place and then to verify it's fixed by this change?

Can you comment in the setup.py why are we doing that thing?

Can you run a packaging task to verify that build works on all the platforms supported?

Thank you

@zyv

zyv commented Sep 25, 2022

Copy link
Copy Markdown

@gtzampanakis you should need to add the library path to rpath only if it's a dynamic library and the path to it is not already on the default linker path.

There are valid uses for rpath, but in this case you are 99% working around a broken installation of libpq, and unconditionally polluting rpath field for all users of the library.

One could do that conditionally by e.g. checking the output of ldd, but even this would be kind of questionable, because the problem shouldn't be there in the first place...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install script does not use pg_config's LIBDIR for runtime linking

3 participants