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

Install fails on Apple M1 chip #210

Closed
tbhockey opened this issue Apr 20, 2021 · 2 comments
Closed

Install fails on Apple M1 chip #210

tbhockey opened this issue Apr 20, 2021 · 2 comments

Comments

@tbhockey
Copy link

macOS 11.2.3
Ruby 2.6.6

Trace:

In file included from src/pg_query_json_plpgsql.c:2:                                                                                                                            
In file included from src/pg_query_json_plpgsql.h:5:                                    
In file included from ./src/postgres/include/plpgsql.h:21:                              
In file included from ./src/postgres/include/commands/trigger.h:17:                                                                                                             
In file included from ./src/postgres/include/nodes/execnodes.h:17:                      
In file included from ./src/postgres/include/access/genam.h:19:                         
In file included from ./src/postgres/include/nodes/tidbitmap.h:26:                      
In file included from ./src/postgres/include/utils/dsa.h:17:                            
./src/postgres/include/port/atomics.h:68:10: fatal error: 'port/atomics/arch-arm.h' file not found                                                                              
#include "port/atomics/arch-arm.h"                                                      
         ^~~~~~~~~~~~~~~~~~~~~~~~~                                                      
1 error generated.            
make: *** [src/pg_query_json_plpgsql.o] Error 1                                         
cp: directory ./../../spec/files does not exist                                         
creating Makefile                                                                                                                                                               
                                                                                                                                                                                
current directory: /Users/tonybeninate/.rvm/gems/ruby-2.6.6@ammoready-two-point-oh/gems/pg_query-1.0.2/ext/pg_query                                                             
make "DESTDIR=" clean                                                                   
                                                                                                                                                                                
current directory: /Users/tonybeninate/.rvm/gems/ruby-2.6.6@ammoready-two-point-oh/gems/pg_query-1.0.2/ext/pg_query    
make "DESTDIR="                                                                                                                                                                 
compiling pg_query_ruby.c
pg_query_ruby.c:23:1: warning: function 'raise_ruby_parse_error' could be declared with attribute 'noreturn' [-Wmissing-noreturn]                                               
{                                                                                                                                                                               
^                                    
pg_query_ruby.c:41:1: warning: function 'raise_ruby_normalize_error' could be declared with attribute 'noreturn' [-Wmissing-noreturn]                                           
{                                                                                       
^                                                                                       
pg_query_ruby.c:59:1: warning: function 'raise_ruby_fingerprint_error' could be declared with attribute 'noreturn' [-Wmissing-noreturn]                                         
{                                                                                       
^                                                                                       
3 warnings generated.                                                                   
linking shared-object pg_query/pg_query.bundle              
ld: library not found for -lpg_query                                                                                                                                            
clang: error: linker command failed with exit code 1 (use -v to see invocation)         
make: *** [pg_query.bundle] Error 1
                                                                                        
make failed, exit code 2                                                                
                                                                                                                                                                                
Gem files will remain installed in /Users/tonybeninate/.rvm/gems/ruby-2.6.6@ammoready-two-point-oh/gems/pg_query-1.0.2 for inspection.                                          
Results logged to /Users/tonybeninate/.rvm/gems/ruby-2.6.6@ammoready-two-point-oh/extensions/-darwin-20/2.6.0/pg_query-1.0.2/gem_make.out                                       
                                                                                                                                                                                
An error occurred while installing pg_query (1.0.2), and Bundler cannot continue.       
Make sure that `gem install pg_query -v '1.0.2' --source 'https://rubygems.org/'` succeeds before bundling. 
@lfittl
Copy link
Member

lfittl commented Apr 21, 2021

@tbhockey You need to either update to 1.3.0 or 2.0 for ARM support.

@tbhockey
Copy link
Author

@lfittl looks like that was it, thanks!

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

No branches or pull requests

2 participants