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

Cannot build the extension on macOS #273

Closed
pyrocks opened this issue Apr 8, 2024 · 3 comments
Closed

Cannot build the extension on macOS #273

pyrocks opened this issue Apr 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@pyrocks
Copy link

pyrocks commented Apr 8, 2024

Description

I can't build the extension on macOS, specifically 14.4.1.
I did not see anywhere in the documentation that the extension is limited to linux or x86_64.

Steps to reproduce

Followed the installation instructions - cloned the repository and ran make in the cloned folder.

Expected outcome

Extension being built successfully

Actual outcome

ld: warning: ignoring file '/usr/local/Cellar/postgresql@15/15.6_1/bin/postgres': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_AllocSetContextCreateInternal", referenced from:
      _execute_extension_script in tleextension.o
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pg_tle.so] Error 1

Analysis

It would also be nice if the extension was installable using pgxn.

@pyrocks pyrocks added the bug Something isn't working label Apr 8, 2024
@anth0nyleung
Copy link
Contributor

Hi, is the cpu chip of your mac running on apple silicon or intel? it looks like your local installation of postgres is using the x86 architecture but your host is running on the arm64 architecture

@pyrocks
Copy link
Author

pyrocks commented Apr 9, 2024

Hi, my mac is using apple silicon, but I have migrated to it from an intel based mac, which might explain why the local installation is using a x86.
With that being said, I didn't have problems installing other extensions (i.e postgresql anonymizer).

@anth0nyleung
Copy link
Contributor

I would suggest reinstalling postgres binaries and retry building pg_tle. Im also running on a apple silicon cpu and it builds without any issue

@jkatz jkatz closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants