Skip to content
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

MacOS: libpq rpath doesn't work #405

Open
larskanis opened this issue Oct 4, 2021 · 1 comment
Open

MacOS: libpq rpath doesn't work #405

larskanis opened this issue Oct 4, 2021 · 1 comment
Assignees

Comments

@larskanis
Copy link
Collaborator

I noticed this in our CI on Github Actions.

If the libpq shared object is used from a non system location like in our CI:
https://github.com/larskanis/ruby-pg/runs/3784028158?check_suite_focus=true#step:8:8000

... then it's explicit added as an rpath to the ld command:
https://github.com/larskanis/ruby-pg/runs/3784028158?check_suite_focus=true#step:10:119

... but in the end this file isn't used but a libpq shared object from /usr/local/lib:
https://github.com/larskanis/ruby-pg/runs/3784028158?check_suite_focus=true#step:11:20

I solved a very similar issue on Windows, which doesn't recognize an rpath setting in #373 . It sets the path to be used at load time at require 'pg'. Maybe this solution can be extended to also give the dynamic loader a hint which directory should be used.

This issue hasn't stood out before, since we didn't do Macos tests for a long time and when we did, the system library was good enough.

I don't have much knowledge about Macos. @ged , @cbandy Can you help?

@ged
Copy link
Owner

ged commented Oct 4, 2021

Yeah, I can take a look at this.

@ged ged self-assigned this Oct 12, 2021
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

No branches or pull requests

2 participants