【发布时间】:2021-04-20 11:04:40
【问题描述】:
在 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.
【问题讨论】:
标签: ruby postgresql apple-m1