Open philippemnoel opened 1 year ago
An annoying thing about this is that fixing it makes our binding situations worse again, in some cases (we end up adding bad bindings for these functions). I tried a hacky fix for it here https://gist.github.com/thomcc/efa9554a6a50024ea1bb46f345a3cc5e but it actually is the wrong approach, ugh.
Actually this issue is way more awful. If you install postgresql@15
with brew, it doesn't link any binaries or anything, because it's a special version of another package (brews default postgresql
package is 14).
So, if you install PG with homebrew and are trying to use a version other than 14, then which pg_config
will point at the wrong one. $(brew --prefix postgresql@15)/bin/pg_config
is what you need to do.
Amazing.
Does cargo-pgrx need some kind of cargo pgrx init --smart
thing that can use some heuristics to just figure this stuff out depending on operating system and distro?
ugh, saying that out loud gives me chills.
cc https://github.com/Homebrew/homebrew-core/issues/167593
Based on the remarks there, when interacting with homebrew, we should simply avoid sanctioning any installs that touch the "default" postgresql package and only interact with postgres@14, postgres@15, and postgres@16.
What
When I run
on my M1 macOS, it fails with error:
The solution is to manually run:
before, which fixes it. Surprisingly, this is not an issue on
pg14
.For more context, see https://github.com/paradedb/paradedb/issues/362 and the recent conversation in Discord with the team: https://discord.com/channels/710918545906597938/1117863684916645930/1162057010276225064
How to fix
According to thomcc, the fix would to be fully pass the
pg_config --cppflags
flags during compilation