Ruby ./src/postgres/include/port/atomics.h:68:10: fatal error: 'port/atomics/arch-arm.h' file not found
Ruby ./src/postgres/include/port/atomics.h:68:10: fatal error: 'port/atomics/arch-arm.h' file not found
尝试在 M1 Mac.
上的 ruby 2.6.6 上安装 pg_query -v '1.0.2
gem 时收到此错误
这是完整的跟踪:
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.
为了后代,我不得不升级到 pg_query
1.3.0 以获得 ARM 支持。 https://github.com/pganalyze/pg_query/issues/210
尝试在 M1 Mac.
上的 ruby 2.6.6 上安装pg_query -v '1.0.2
gem 时收到此错误
这是完整的跟踪:
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.
为了后代,我不得不升级到 pg_query
1.3.0 以获得 ARM 支持。 https://github.com/pganalyze/pg_query/issues/210