Unable to install on M1 pro with Apple chip
When running make on mac:
ld: can't link with a main executable file '/opt/homebrew/Cellar/postgresql@14/14.6_1/bin/postgres' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [src/semver.so] Error 1
Any workaround for M1 Pro users?
I use pgenv to build from source on my M1 Mac. Weird that Homebrew ships an x64 version.
@theory so it's working on your side ? It seems to work on another M1 when installing postgres with homebrew.
What is your output if you run file which pg_config? (text appears formatted on github, don't forget the backtick around which pg_config)
Because it seems to work when output is /opt/homebrew/opt/postgresql@13/bin/pg_config but on my current one, with /opt/homebrew/bin/pg_config, it fails.
Since I use pgenv, the output is:
/Users/david/.pgenv/pgsql/bin/pg_config
Maybe you need to reinstall Postgres from Homebrew.