Installing on ARM M1 Macs
- Dominant language
- C
- Stars
- 3.9k
- Forks
- 260
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 1
Description
Apologies if this isn't the right place since I think it might just be an issue with postgres app issue.
I'm trying to install pg_cron on a macbook with the M1 chip. I'm getting the following error when trying to run the makefile:
```
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -bundle -multiply_defined suppress -o pg_cron.so src/entry.o src/job_metadata.o src/misc.o src/pg_cron.o src/task_states.o -L/Applications/Postgres.app/Contents/Versions/12/lib -L/Applications/Postgres.app/Contents/Versions/12/lib -L/Applications/Postgres.app/Contents/Versions/12/lib -Wl,-dead_strip_dylibs -L/Applications/Postgres.app/Contents/Versions/12/lib -lpq -bundle_loader /Applications/Postgres.app/Contents/Versions/12/bin/postgres
ld: warning: ignoring file /Applications/Postgres.app/Contents/Versions/12/lib/libpq.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: can't link with a main executable file '/Applications/Postgres.app/Contents/Versions/12/bin/postgres' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pg_cron.so] Error 1
```
I'm using the postgres app for mac and pg_config seems alright. Has anyone else had this issue before?
_Update, it seems to work if postgres is installed through homebrew instead of the postgres app_
_Update 2: I couldn't use the homebrew installation for other reasons, I fixed it by compiling pg_cron on an intel mac and running make install on the M1 mac_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Makefile and the pg_config output for the Postgres.app installation; reproduce the link step on an ARM M1 Mac and compare it with the Homebrew setup. Done means pg_cron builds and installs against an arm64 PostgreSQL installation without linking x86_64 libraries or the postgres executable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- build-system, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100