Я пытаюсь запустить установку пакета в приложении rails. Сбой установки на шаге: установка pg 1.1.3 с собственными расширениями
Вот полный журнал ошибок:
current directory: /Users/velinapetrova/.rvm/gems/ruby-2.5.1/gems/pg-1.1.3/ext
/Users/velinapetrova/.rvm/rubies/ruby-2.5.1/bin/ruby -r ./siteconf20181118-57661-1vdieox.rb extconf.rb
——with-pg-config=/usr/local/Cellar/postgresql/10.5/bin/pg_config
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQsetSingleRowMode()... yes
checking for PQconninfo()... yes
checking for PQsslAttribute()... yes
checking for PQencryptPasswordConn()... yes
checking for timegm()... yes
checking for rb_gc_adjust_memory_usage()... yes
checking for PG_DIAG_TABLE_NAME in libpq-fe.h... yes
checking for unistd.h... yes
checking for inttypes.h... yes
checking for C99 variable length arrays... yes
creating extconf.h
creating Makefile
current directory: /Users/velinapetrova/.rvm/gems/ruby-2.5.1/gems/pg-1.1.3/ext
make "DESTDIR=" clean
current directory: /Users/velinapetrova/.rvm/gems/ruby-2.5.1/gems/pg-1.1.3/ext
make "DESTDIR="
compiling gvl_wrappers.c
compiling pg.c
compiling pg_binary_decoder.c
compiling pg_binary_encoder.c
compiling pg_coder.c
pg_coder.c:206:34: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
res = this->dec_func(this, val, RSTRING_LEN(argv[0]), tuple, field, ENCODING_GET(argv[0]));
~~~~ ^~~~~~~~~~~~~~~~~~~~
/Users/velinapetrova/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/ruby.h:975:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/velinapetrova/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/ruby.h:971:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pg_coder.c:206:34: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
res = this->dec_func(this, val, RSTRING_LEN(argv[0]), tuple, field, ENCODING_GET(argv[0]));
~~~~ ^~~~~~~~~~~~~~~~~~~~
/Users/velinapetrova/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/ruby.h:976:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
2 warnings generated.
compiling pg_connection.c
compiling pg_copy_coder.c
pg_copy_coder.c:225:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
strlen = RSTRING_LEN(subint);
~ ^~~~~~~~~~~~~~~~~~~
/Users/velinapetrova/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/ruby.h:975:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/velinapetrova/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/ruby.h:971:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pg_copy_coder.c:225:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
strlen = RSTRING_LEN(subint);
~ ^~~~~~~~~~~~~~~~~~~
/Users/velinapetrova/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/ruby/ruby.h:976:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
pg_copy_coder.c:531:23: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
input_len = end_ptr - start_ptr;
~ ~~~~~~~~^~~~~~~~~~~
3 warnings generated.
compiling pg_errors.c
compiling pg_result.c
compiling pg_text_decoder.c
pg_text_decoder.c:693:14: error: variable has incomplete type 'struct tm'
struct tm tm;
^
pg_text_decoder.c:693:11: note: forward declaration of 'struct tm'
struct tm tm;
^
pg_text_decoder.c:705:19: warning: implicit declaration of function 'timegm' is invalid in C99 [-Wimplicit-function-declaration]
time_t time = timegm(&tm);
^
pg_text_decoder.c:723:13: warning: implicit declaration of function 'mktime' is invalid in C99 [-Wimplicit-function-declaration]
time = mktime(&tm);
^
pg_text_decoder.c:725:13: warning: implicit declaration of function 'timegm' is invalid in C99 [-Wimplicit-function-declaration]
time = timegm(&tm);
^
3 warnings and 1 error generated.
make: *** [pg_text_decoder.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/velinapetrova/.rvm/gems/ruby-2.5.1/gems/pg-1.1.3 for inspection.
Results logged to /Users/velinapetrova/.rvm/gems/ruby-2.5.1/extensions/x86_64-darwin-17/2.5.0/pg-1.1.3/gem_make.out
An error occurred while installing pg (1.1.3), and Bundler cannot continue.
Make sure that `gem install pg -v '1.1.3' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
pg
Запуск gem install pg -v '1.1.3' --source 'https://rubygems.org/'
выдает то же сообщение об ошибке.
Я переустановил postgres.
Я настроил свой bundle.config, чтобы он указывал на правильный файл pg_config.