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

r/driver/postgres: Use pg_config instead (or in addition to) pkg-config #1268

Closed
krlmlr opened this issue Nov 8, 2023 · 2 comments · Fixed by #1271
Closed

r/driver/postgres: Use pg_config instead (or in addition to) pkg-config #1268

krlmlr opened this issue Nov 8, 2023 · 2 comments · Fixed by #1271

Comments

@krlmlr
Copy link
Collaborator

krlmlr commented Nov 8, 2023

Installing the R package didn't work out of the box for me, @paleolimbot also seems to have challenges: #161 (comment)

I suspect this is due to pkg-config libpq not returning anything.

I'm on macOS M1, installed libpq via Homebrew.

RPostgres uses both pkg-config and pg_config : https://github.com/r-dbi/RPostgres/blob/main/configure#L19-L62

I've also found this : psycopg/psycopg2#1001 (comment)

@paleolimbot
Copy link
Member

Definitely! I'll take a stab at this shortly. My personal setup (also on libpq via homebrew on M1) uses

PKG_CONFIG_PATH=/opt/homebrew/Cellar/libpq/16.0/lib/pkgconfig:/opt/homebrew/Cellar/openssl@3/3.1.3/lib/pkgconfig

...in ~/.Renviron, but pg_config sounds like less of a hack!

paleolimbot added a commit that referenced this issue Nov 8, 2023
)

Closes #1268.

The configure script now falls back on `pg_config`. Barring an
intervention like setting the PKG_CONFIG_PATH in advance, this method
gets used on MacOS M1 (libpq installed via homebrew) and archlinux. I
also checked recent ubuntu, fedora, and alpine, all of which appear to
use pkg-config to pick up the include/libs location.
@krlmlr
Copy link
Collaborator Author

krlmlr commented Nov 8, 2023

Thanks, works like a charm!

@lidavidm lidavidm added this to the ADBC Libraries 0.9.0 milestone Nov 8, 2023
paleolimbot added a commit to paleolimbot/arrow-adbc that referenced this issue Nov 9, 2023
…ache#1271)

Closes apache#1268.

The configure script now falls back on `pg_config`. Barring an
intervention like setting the PKG_CONFIG_PATH in advance, this method
gets used on MacOS M1 (libpq installed via homebrew) and archlinux. I
also checked recent ubuntu, fedora, and alpine, all of which appear to
use pkg-config to pick up the include/libs location.
vleslief-ms pushed a commit to vleslief-ms/arrow-adbc that referenced this issue Nov 9, 2023
…ache#1271)

Closes apache#1268.

The configure script now falls back on `pg_config`. Barring an
intervention like setting the PKG_CONFIG_PATH in advance, this method
gets used on MacOS M1 (libpq installed via homebrew) and archlinux. I
also checked recent ubuntu, fedora, and alpine, all of which appear to
use pkg-config to pick up the include/libs location.
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 a pull request may close this issue.

3 participants