teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

mkmf.logの抜粋を変更しました。noやnot foundという言葉が入っている所を抜き出しましたが、これ以上となるとどこをやっていいのか分かりません。何回も申し訳ありません。

2020/02/03 23:57

投稿

yata_
yata_

スコア5

title CHANGED
File without changes
body CHANGED
@@ -17,45 +17,10 @@
17
17
  --with-pg-config=/usr/pgsql-9.3/bin/pg_config
18
18
  Using config values from /usr/pgsql-9.3/bin/pg_config
19
19
  sh: /usr/pgsql-9.3/bin/pg_config: No such file or directory
20
- checking for libpq-fe.h... yes
20
+ Yesと判定されたところは文字数削減のため省略。
21
- checking for libpq/libpq-fs.h... yes
22
- checking for pg_config_manual.h... yes
23
- checking for PQconnectdb() in -lpq... yes
24
- checking for PQconnectionUsedPassword()... yes
25
- checking for PQisthreadsafe()... yes
26
- checking for PQprepare()... yes
27
- checking for PQexecParams()... yes
28
- checking for PQescapeString()... yes
29
- checking for PQescapeStringConn()... yes
30
- checking for PQescapeLiteral()... yes
31
- checking for PQescapeIdentifier()... yes
32
- checking for PQgetCancel()... yes
33
- checking for lo_create()... yes
34
21
 
35
- > checking for pg_encoding_to_char()... yes
36
- checking for pg_char_to_encoding()... yes
37
- checking for PQsetClientEncoding()... yes
38
- checking for PQlibVersion()... yes
39
- checking for PQping()... yes
40
- checking for PQsetSingleRowMode()... yes
41
- checking for PQconninfo()... yes
42
- checking for rb_encdb_alias()... yes
43
- checking for rb_enc_alias()... no
22
+ > checking for rb_enc_alias()... no
44
- checking for rb_thread_call_without_gvl()... yes
45
- checking for rb_thread_call_with_gvl()... yes
46
- checking for rb_thread_fd_select()... yes
47
23
  checking for rb_w32_wrap_io_handle()... no
48
- checking for rb_str_modify_expand()... yes
49
- checking for rb_hash_dup()... yes
50
- checking for PGRES_COPY_BOTH in libpq-fe.h... yes
51
- checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes
52
- checking for PG_DIAG_TABLE_NAME in libpq-fe.h... yes
53
- checking for struct pgNotify.extra in libpq-fe.h... yes
54
- checking for unistd.h... yes
55
- checking for inttypes.h... yes
56
- checking for ruby/st.h... yes
57
- checking for C99 variable length arrays... yes
58
- creating extconf.h
59
24
  creating Makefile
60
25
 
61
26
  > urrent directory: /Users/yatayuki/instagram-clone/vendor/bundle/ruby/2.5.0/gems/pg-0.18.4/ext
@@ -130,11 +95,11 @@
130
95
 
131
96
  > --------------------
132
97
 
133
- > have_func: checking for PQconnectionUsedPassword()... -------------------- yes
98
+ > have_func: checking for rb_w32_wrap_io_handle()... -------------------- no
134
99
 
135
100
  > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpq -lruby.2.5.0 -lpq -lpthread -ldl -lobjc "
136
- conftest.c:13:57: error: use of undeclared identifier 'PQconnectionUsedPassword'
101
+ conftest.c:13:57: error: use of undeclared identifier 'rb_w32_wrap_io_handle'
137
- int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectionUsedPassword; return !p; }
102
+ int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_w32_wrap_io_handle; return !p; }
138
103
  ^
139
104
  1 error generated.
140
105
  checked program was:
@@ -151,11 +116,31 @@
151
116
  10:
152
117
  11: return 0;
153
118
  12: }
154
- 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectionUsedPassword; return !p; }
119
+ 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_w32_wrap_io_handle; return !p; }
155
120
  /* end */
156
121
 
157
122
  > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpq -lruby.2.5.0 -lpq -lpthread -ldl -lobjc "
123
+ Undefined symbols for architecture x86_64:
124
+ "_rb_w32_wrap_io_handle", referenced from:
125
+ _t in conftest-1913e3.o
126
+ ld: symbol(s) not found for architecture x86_64
127
+ clang: error: linker command failed with exit code 1 (use -v to see invocation)
158
128
  checked program was:
129
+ 文字数削減のため、省略。
130
+ 13: extern void rb_w32_wrap_io_handle();
131
+ 14: int t(void) { rb_w32_wrap_io_handle(); return 0; }
132
+ /* end */
133
+
134
+ > ----------------------------------------
135
+
136
+ > have_func: checking for rb_enc_alias()... -------------------- no
137
+
138
+ > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpq -lruby.2.5.0 -lpq -lpthread -ldl -lobjc "
139
+ conftest.c:13:57: error: use of undeclared identifier 'rb_enc_alias'
140
+ int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_alias; return !p; }
141
+ ^
142
+ 1 error generated.
143
+ checked program was:
159
144
  /* begin */
160
145
  1: #include "ruby.h"
161
146
  2:
@@ -169,11 +154,34 @@
169
154
  10:
170
155
  11: return 0;
171
156
  12: }
172
- 13: extern void PQconnectionUsedPassword();
173
- 14: int t(void) { PQconnectionUsedPassword(); return 0; }
157
+ 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_alias; return !p; }
174
158
  /* end */
175
159
 
160
+ > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpq -lruby.2.5.0 -lpq -lpthread -ldl -lobjc "
161
+ Undefined symbols for architecture x86_64:
162
+ "_rb_enc_alias", referenced from:
163
+ _t in conftest-76f101.o
164
+ ld: symbol(s) not found for architecture x86_64
165
+ clang: error: linker command failed with exit code 1 (use -v to see invocation)
166
+ checked program was:
167
+ /* begin */
168
+ 1: #include "ruby.h"
169
+ 2:
170
+ 3: /*top*/
171
+ 4: extern int t(void);
172
+ 5: int main(int argc, char **argv)
173
+ 6: {
174
+ 7: if (argc > 1000000) {
175
+ 8: printf("%p", &t);
176
+ 9: }
177
+ 10:
178
+ 11: return 0;
179
+ 12: }
180
+ 13: extern void rb_enc_alias();
181
+ 14: int t(void) { rb_enc_alias(); return 0; }
182
+ /* end */
176
183
 
184
+ > --------------------
177
185
 
178
186
  ・sudo -u postgres psql⇨**これをやれ的な記事を見つけたのでやってみましたが、**
179
187
  > sudo: unknown user: postgres

2

mkmf.logの加筆を行いました。コード内を「error」で検索するとこのエラーが何回も繰り返して出ている様に見えました。何回もお手数おかけしますが、改めてよろしくお願いします。

2020/02/03 23:57

投稿

yata_
yata_

スコア5

title CHANGED
File without changes
body CHANGED
@@ -128,45 +128,53 @@
128
128
 
129
129
  ・mkmf.logを見れば何か分かるらしい⇨見てもよくわかりませんでした。以下に貼り付けておきますので、何かわかればよろしくお願いします。(どこまで貼り付ければ良いのかわからないかったので長めに貼り付けました。)
130
130
 
131
- > extconf.h is:
131
+ > --------------------
132
+
133
+ > have_func: checking for PQconnectionUsedPassword()... -------------------- yes
134
+
135
+ > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpq -lruby.2.5.0 -lpq -lpthread -ldl -lobjc "
136
+ conftest.c:13:57: error: use of undeclared identifier 'PQconnectionUsedPassword'
137
+ int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectionUsedPassword; return !p; }
138
+ ^
139
+ 1 error generated.
140
+ checked program was:
132
141
  /* begin */
142
+ 1: #include "ruby.h"
143
+ 2:
133
- 1: #ifndef EXTCONF_H
144
+ 3: /*top*/
134
- 2: #define EXTCONF_H
145
+ 4: extern int t(void);
135
- 3: #define HAVE_PQCONNECTIONUSEDPASSWORD 1
136
- 4: #define HAVE_PQISTHREADSAFE 1
146
+ 5: int main(int argc, char **argv)
137
- 5: #define HAVE_PQPREPARE 1
138
- 6: #define HAVE_PQEXECPARAMS 1
147
+ 6: {
139
- 7: #define HAVE_PQESCAPESTRING 1
148
+ 7: if (argc > 1000000) {
140
- 8: #define HAVE_PQESCAPESTRINGCONN 1
149
+ 8: printf("%p", &t);
141
- 9: #define HAVE_PQESCAPELITERAL 1
142
- 10: #define HAVE_PQESCAPEIDENTIFIER 1
143
- 11: #define HAVE_PQGETCANCEL 1
144
- 12: #define HAVE_LO_CREATE 1
145
- 13: #define HAVE_PG_ENCODING_TO_CHAR 1
146
- 14: #define HAVE_PG_CHAR_TO_ENCODING 1
147
- 15: #define HAVE_PQSETCLIENTENCODING 1
148
- 16: #define HAVE_PQLIBVERSION 1
149
- 17: #define HAVE_PQPING 1
150
+ 9: }
150
- 18: #define HAVE_PQSETSINGLEROWMODE 1
151
- 19: #define HAVE_PQCONNINFO 1
152
- 20: #define HAVE_RB_ENCDB_ALIAS 1
153
- 21: #define HAVE_RB_THREAD_CALL_WITHOUT_GVL 1
154
- 22: #define HAVE_RB_THREAD_CALL_WITH_GVL 1
155
- 23: #define HAVE_RB_THREAD_FD_SELECT 1
156
- 24: #define HAVE_RB_STR_MODIFY_EXPAND 1
157
- 25: #define HAVE_RB_HASH_DUP 1
158
- 26: #define HAVE_CONST_PGRES_COPY_BOTH 1
159
- 27: #define HAVE_CONST_PGRES_SINGLE_TUPLE 1
160
- 28: #define HAVE_CONST_PG_DIAG_TABLE_NAME 1
161
- 29: #define HAVE_STRUCT_PGNOTIFY_EXTRA 1
162
- 30: #define HAVE_ST_EXTRA 1
151
+ 10:
163
- 31: #define HAVE_ST_NOTIFY_EXTRA 1
164
- 32: #define HAVE_UNISTD_H 1
165
- 33: #define HAVE_INTTYPES_H 1
166
- 34: #define HAVE_RUBY_ST_H 1
167
- 35: #define HAVE_VARIABLE_LENGTH_ARRAYS 1
168
- 36: #endif
152
+ 11: return 0;
153
+ 12: }
154
+ 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectionUsedPassword; return !p; }
169
155
  /* end */
156
+
157
+ > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpq -lruby.2.5.0 -lpq -lpthread -ldl -lobjc "
158
+ checked program was:
159
+ /* begin */
160
+ 1: #include "ruby.h"
161
+ 2:
162
+ 3: /*top*/
163
+ 4: extern int t(void);
164
+ 5: int main(int argc, char **argv)
165
+ 6: {
166
+ 7: if (argc > 1000000) {
167
+ 8: printf("%p", &t);
168
+ 9: }
169
+ 10:
170
+ 11: return 0;
171
+ 12: }
172
+ 13: extern void PQconnectionUsedPassword();
173
+ 14: int t(void) { PQconnectionUsedPassword(); return 0; }
174
+ /* end */
175
+
176
+
177
+
170
178
  ・sudo -u postgres psql⇨**これをやれ的な記事を見つけたのでやってみましたが、**
171
179
  > sudo: unknown user: postgres
172
180
  sudo: unable to initialize policy plugin
@@ -189,14 +197,14 @@
189
197
  <<: *default
190
198
  database: db/development.sqlite3
191
199
 
192
- > 引用テキスト Warning: The database defined as "test" will be erased and
200
+ > Warning: The database defined as "test" will be erased and
193
201
  re-generated from your development database when you run "rake".
194
202
  Do not set this db to the same as development or production.
195
203
  test:
196
204
  <<: *default
197
205
  database: db/test.sqlite3
198
206
 
199
- > 引用テキストproduction:
207
+ > production:
200
208
  <<: *default
201
209
  database: db/production.sqlite3
202
210
 

1

指摘していただいた点を修正しました。

2020/02/03 13:56

投稿

yata_
yata_

スコア5

title CHANGED
File without changes
body CHANGED
@@ -128,35 +128,45 @@
128
128
 
129
129
  ・mkmf.logを見れば何か分かるらしい⇨見てもよくわかりませんでした。以下に貼り付けておきますので、何かわかればよろしくお願いします。(どこまで貼り付ければ良いのかわからないかったので長めに貼り付けました。)
130
130
 
131
- > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -lruby.2.5.0 -lpthread -ldl -lobjc "
132
- checked program was:
131
+ > extconf.h is:
133
132
  /* begin */
133
+ 1: #ifndef EXTCONF_H
134
+ 2: #define EXTCONF_H
135
+ 3: #define HAVE_PQCONNECTIONUSEDPASSWORD 1
136
+ 4: #define HAVE_PQISTHREADSAFE 1
137
+ 5: #define HAVE_PQPREPARE 1
138
+ 6: #define HAVE_PQEXECPARAMS 1
139
+ 7: #define HAVE_PQESCAPESTRING 1
140
+ 8: #define HAVE_PQESCAPESTRINGCONN 1
141
+ 9: #define HAVE_PQESCAPELITERAL 1
142
+ 10: #define HAVE_PQESCAPEIDENTIFIER 1
134
- 1: #include "ruby.h"
143
+ 11: #define HAVE_PQGETCANCEL 1
135
- 2:
144
+ 12: #define HAVE_LO_CREATE 1
145
+ 13: #define HAVE_PG_ENCODING_TO_CHAR 1
146
+ 14: #define HAVE_PG_CHAR_TO_ENCODING 1
147
+ 15: #define HAVE_PQSETCLIENTENCODING 1
148
+ 16: #define HAVE_PQLIBVERSION 1
149
+ 17: #define HAVE_PQPING 1
150
+ 18: #define HAVE_PQSETSINGLEROWMODE 1
151
+ 19: #define HAVE_PQCONNINFO 1
152
+ 20: #define HAVE_RB_ENCDB_ALIAS 1
153
+ 21: #define HAVE_RB_THREAD_CALL_WITHOUT_GVL 1
154
+ 22: #define HAVE_RB_THREAD_CALL_WITH_GVL 1
155
+ 23: #define HAVE_RB_THREAD_FD_SELECT 1
156
+ 24: #define HAVE_RB_STR_MODIFY_EXPAND 1
157
+ 25: #define HAVE_RB_HASH_DUP 1
158
+ 26: #define HAVE_CONST_PGRES_COPY_BOTH 1
159
+ 27: #define HAVE_CONST_PGRES_SINGLE_TUPLE 1
160
+ 28: #define HAVE_CONST_PG_DIAG_TABLE_NAME 1
161
+ 29: #define HAVE_STRUCT_PGNOTIFY_EXTRA 1
162
+ 30: #define HAVE_ST_EXTRA 1
136
- 3: int main(int argc, char **argv)
163
+ 31: #define HAVE_ST_NOTIFY_EXTRA 1
164
+ 32: #define HAVE_UNISTD_H 1
165
+ 33: #define HAVE_INTTYPES_H 1
137
- 4: {
166
+ 34: #define HAVE_RUBY_ST_H 1
167
+ 35: #define HAVE_VARIABLE_LENGTH_ARRAYS 1
138
- 5: return 0;
168
+ 36: #endif
139
- 6: }
140
169
  /* end */
141
-
142
- > "clang -o conftest -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -L/usr/local/lib -L. -L/Users/yatayuki/.rbenv/versions/2.5.0/lib -fstack-protector -L/usr/local/lib -lruby.2.5.0 -Wl,-rpath,/usr/local/lib -lpthread -ldl -lobjc "
143
- checked program was:
144
- /* begin */
145
- 1: #include "ruby.h"
146
- 2:
147
- 3: int main() {return 0;}
148
- /* end */
149
-
150
- > find_header: checking for libpq-fe.h... -------------------- yes
151
-
152
- > "clang -E -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/x86_64-darwin18 -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0/ruby/backward -I/Users/yatayuki/.rbenv/versions/2.5.0/include/ruby-2.5.0 -I. -I/usr/local/include -I/Users/yatayuki/.rbenv/versions/2.5.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -fno-common -pipe conftest.c -o conftest.i"
153
- checked program was:
154
- /* begin */
155
- 1: #include "ruby.h"
156
- 2:
157
- 3: #include <libpq-fe.h>
158
- /* end */
159
-
160
170
  ・sudo -u postgres psql⇨**これをやれ的な記事を見つけたのでやってみましたが、**
161
171
  > sudo: unknown user: postgres
162
172
  sudo: unable to initialize policy plugin