2012年5月15日

[ruby-list:48756] Re: gem install pg で、PQconnectionUsedPassword チェックが no となる

篠田です。

なかださん、返信ありがとうございます。

> PostgreSQLが古いと言っていますが、PQconnectionUsedPassword()は少なくと
> も8.3にはあるようです。
> http://www.postgresql.jp/document/8.3/html/libpq-status.html
>

>> Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.13.2/ext/gem_make.out
>
> このファイルとmkmf.logの内容を見せてください。

まず、gem_make.out が、

# cat /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.13.2/ext/gem_make.out
/usr/local/bin/ruby extconf.rb
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 PQconnectionUsedPassword()... no
Your PostgreSQL is too old. Either install an older version of this
gem or upgrade your database.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pqlib
--without-pqlib

で、mkmf.log が、

# cat /vol1/usr/local/lib/ruby/gems/1.9.1/gems/pg-0.13.2/ext/mkmf.log
find_executable: checking for pg_config... -------------------- yes

--------------------

find_header: checking for libpq-fe.h... -------------------- yes

"gcc -o conftest -I/usr/local/include/ruby-1.9.1/i386-freebsd8.1
-I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/local/include
-I/vol1/usr/local/include -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
-Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
-Wimplicit-function-declaration conftest.c -L. -L/usr/local/lib
-Wl,-R/usr/local/lib -L. -L/usr/local/lib -rdynamic
-L/vol1/usr/local/lib -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib
-lruby-static -lexecinfo -lthr -lrt -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */

"gcc -E -I/usr/local/include/ruby-1.9.1/i386-freebsd8.1
-I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/local/include
-I/vol1/usr/local/include -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
-Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
-Wimplicit-function-declaration conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <libpq-fe.h>
/* end */

--------------------

find_header: checking for libpq/libpq-fs.h... -------------------- yes

"gcc -E -I/usr/local/include/ruby-1.9.1/i386-freebsd8.1
-I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/local/include
-I/vol1/usr/local/include -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
-Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
-Wimplicit-function-declaration conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <libpq/libpq-fs.h>
/* end */

--------------------

find_header: checking for pg_config_manual.h... -------------------- yes

"gcc -E -I/usr/local/include/ruby-1.9.1/i386-freebsd8.1
-I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/local/include
-I/vol1/usr/local/include -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
-Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
-Wimplicit-function-declaration conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <pg_config_manual.h>
/* end */

--------------------

have_library: checking for PQconnectdb() in -lpq... -------------------- yes

"gcc -o conftest -I/usr/local/include/ruby-1.9.1/i386-freebsd8.1
-I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/local/include
-I/vol1/usr/local/include -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
-Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
-Wimplicit-function-declaration conftest.c -L. -L/usr/local/lib
-Wl,-R/usr/local/lib -L. -L/usr/local/lib -rdynamic
-L/vol1/usr/local/lib -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib
-lruby-static -lpq -lexecinfo -lthr -lrt -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <libpq-fe.h>
4:
5: /*top*/
6: int main() {return 0;}
7: int t() { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
/* end */

--------------------

have_func: checking for PQconnectionUsedPassword()... -------------------- no

"gcc -o conftest -I/usr/local/include/ruby-1.9.1/i386-freebsd8.1
-I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/local/include
-I/vol1/usr/local/include -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
-Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
-Wimplicit-function-declaration conftest.c -L. -L/usr/local/lib
-Wl,-R/usr/local/lib -L. -L/usr/local/lib -rdynamic
-L/vol1/usr/local/lib -lpq -Wl,-R -Wl,/usr/local/lib
-L/usr/local/lib -lruby-static -lpq -lexecinfo -lthr -lrt -lcrypt -lm
-lc"
conftest.c: In function 't':
conftest.c:5: error: 'PQconnectionUsedPassword' undeclared (first use
in this function)
conftest.c:5: error: (Each undeclared identifier is reported only once
conftest.c:5: error: for each function it appears in.)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int main() {return 0;}
5: int t() { void ((*volatile p)()); p = (void
((*)()))PQconnectionUsedPassword; return 0; }
/* end */

"gcc -o conftest -I/usr/local/include/ruby-1.9.1/i386-freebsd8.1
-I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -I/usr/local/include
-I/vol1/usr/local/include -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers
-Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement
-Wimplicit-function-declaration conftest.c -L. -L/usr/local/lib
-Wl,-R/usr/local/lib -L. -L/usr/local/lib -rdynamic
-L/vol1/usr/local/lib -lpq -Wl,-R -Wl,/usr/local/lib
-L/usr/local/lib -lruby-static -lpq -lexecinfo -lthr -lrt -lcrypt -lm
-lc"
conftest.c: In function 't':
conftest.c:5: warning: implicit declaration of function
'PQconnectionUsedPassword'
/var/tmp//ccE63gFs.o(.text+0x27): In function `t':
/vol1/usr/local/lib/ruby/gems/1.9.1/gems/pg-0.13.2/ext/conftest.c:5:
undefined reference to `PQconnectionUsedPassword'
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int main() {return 0;}
5: int t() { PQconnectionUsedPassword(); return 0; }
/* end */

--------------------

となっています。

お手数をおかけしますが、よろしくお願いいたします。

--
SHINODA Masanori <shinoda@xxxxx>
Net & Field Co.,Ltd. Internet Service Section
Phone 082-231-0760 Fax 082-231-0776
Portable... 090-6419-9919


投稿者 xml-rpc : 2012年5月15日 20:08
役に立ちました?:
過去のフィードバック 平均:(0) 総合:(0) 投票回数:(0)
本記事へのTrackback: http://hoop.euqset.org/blog/mt-tb2006.cgi/110609
トラックバック
コメント
コメントする




画像の中に見える文字を入力してください。