我在安裝ibm_db gem時遇到以下錯誤。不知道是什麼造成了這一點。我在Win 7 32位上使用ruby,並使用從IBM網站下載的ibm_data_server_driver_package_win32_v10.5。無法安裝ibm_db gem
D:\Users\zzuj001>gem install ibm_db -- '--with-IBM_DB-include="C:\Program Files\
IBM\IBM DATA SERVER DRIVER\include" --with-IBM_DB-lib="C:\Program Files\IBM\IBM
DATA SERVER DRIVER\lib"'
ERROR: Error installing ibm_db:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb --with-IBM_DB-include="C:\Program Files\I
BM\IBM DATA SERVER DRIVER\include" --with-IBM_DB-lib="C:\Program Files\IBM\IBM D
ATA SERVER DRIVER\lib"
Detected 32-bit Ruby
Detected usage of IBM Data Server Driver package. Ensure you have downloaded 32-
bit package of IBM_Data_Server_Driver and retry the 'gem install ibm_db' command
creating gil_release_version
creating unicode_support_version
checking for SQLConnect() in -ldb2cli... yes
checking for gil_release_version... yes
checking for unicode_support_version... yes
creating Makefile
extconf.rb:114:in `libpathflag': Use RbConfig instead of obsolete and deprecated
Config.
extconf.rb:114:in `libpathflag': Use RbConfig instead of obsolete and deprecated
Config.
make "DESTDIR=" clean
make "DESTDIR="
generating ibm_db-i386-mingw32.def
compiling ibm_db.c
In file included from C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlcli
.h:983:0,
from C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlcli
1.h:45,
from ruby_ibm_db_cli.h:52,
from ibm_db.c:27:
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1747:5: error: unkn
own type name '__in_ecount'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1750:5: error: unkn
own type name '__out_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1753:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1864:5: error: unkn
own type name '__in_ecount'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1867:5: error: unkn
own type name '__out_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1870:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1890:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1893:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1896:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1899:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1906:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1908:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1910:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1912:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1919:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1921:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1926:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1929:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1932:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1935:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1938:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1941:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1951:5: error: unkn
own type name '__in_ecount'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1953:5: error: unkn
own type name '__out_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1960:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1970:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1973:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1976:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1982:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1985:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1988:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1991:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:1997:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2000:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2003:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2017:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2020:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2023:5: error: unkn
own type name '__in_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2030:5: error: unkn
own type name '__out_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2033:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2035:5: error: unkn
own type name '__out_ecount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2038:5: error: unkn
own type name '__out_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2086:5: error: unkn
own type name '__out'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2127:5: error: unkn
own type name '__in_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2128:5: error: unkn
own type name '__out_bcount_opt'
C:\Program Files\IBM\IBM DATA SERVER DRIVER\include/sqlext.h:2129:5: error: unkn
own type name '__in'
ibm_db.c:93:0: warning: "STRCASECMP" redefined [enabled by default]
In file included from c:/Ruby200/include/ruby-2.0.0/ruby.h:33:0,
from ibm_db.c:21:
c:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1645:0: note: this is the location of
the previous definition
ibm_db.c: In function '_ruby_ibm_db_free_conn_struct':
ibm_db.c:475:7: warning: variable 'rc' set but not used [-Wunused-but-set-variab
le]
ibm_db.c: In function '_ruby_ibm_db_free_stmt_handle_and_resources':
ibm_db.c:680:7: warning: variable 'rc' set but not used [-Wunused-but-set-variab
le]
ibm_db.c: In function '_ruby_ibm_db_check_sql_errors':
ibm_db.c:991:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function '_ruby_ibm_db_connect_helper':
ibm_db.c:2504:5: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ruby_ibm_db_createDb_helper':
ibm_db.c:2922:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ruby_ibm_db_dropDb_helper':
ibm_db.c:3051:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_createDBNX':
ibm_db.c:3198:9: warning: unused variable 'return_value' [-Wunused-variable]
ibm_db.c: In function 'ibm_db_bind_param_helper':
ibm_db.c:3413:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c:3433:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c:3453:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c:3474:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_close':
ibm_db.c:3706:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c:3724:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_column_privileges':
ibm_db.c:3901:13: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_columns':
ibm_db.c:4081:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_foreign_keys':
ibm_db.c:4247:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_primary_keys':
ibm_db.c:4403:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_procedure_columns':
ibm_db.c:4594:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_procedures':
ibm_db.c:4751:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_special_columns':
ibm_db.c:4928:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_statistics':
ibm_db.c:5123:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_table_privileges':
ibm_db.c:5282:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_tables':
ibm_db.c:5456:11: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_commit':
ibm_db.c:5538:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function '_ruby_ibm_db_do_prepare':
ibm_db.c:5618:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_exec':
ibm_db.c:5756:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_free_result':
ibm_db.c:5831:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_execute':
ibm_db.c:6936:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c:7024:73: warning: comparison between signed and unsigned integer expres
sions [-Wsign-compare]
ibm_db.c: In function 'ibm_db_next_result':
ibm_db.c:7721:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_num_fields':
ibm_db.c:7820:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_num_rows':
ibm_db.c:7913:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function '_ruby_ibm_db_get_column_by_name':
ibm_db.c:7969:9: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_field_display_size':
ibm_db.c:8132:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_field_type':
ibm_db.c:8326:30: warning: initialization discards 'const' qualifier from pointe
r target type [enabled by default]
ibm_db.c:8349:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8357:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8360:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8363:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8366:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8369:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8372:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8375:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c:8378:15: warning: assignment discards 'const' qualifier from pointer ta
rget type [enabled by default]
ibm_db.c: In function 'ibm_db_field_width':
ibm_db.c:8452:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_rollback':
ibm_db.c:8558:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_result':
ibm_db.c:9147:7: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_fetch_row':
ibm_db.c:9950:5: warning: 'rb_thread_blocking_region' is deprecated (declared at
c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_result_cols':
ibm_db.c:9989:9: warning: unused variable 'ret_val' [-Wunused-variable]
ibm_db.c: In function 'ibm_db_fetch_assoc':
ibm_db.c:10118:5: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_fetch_object':
ibm_db.c:10205:5: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_fetch_array':
ibm_db.c:10287:5: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_fetch_both':
ibm_db.c:10363:5: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_server_info':
ibm_db.c:11114:7: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: In function 'ibm_db_client_info':
ibm_db.c:11401:7: warning: 'rb_thread_blocking_region' is deprecated (declared a
t c:/Ruby200/include/ruby-2.0.0/ruby/intern.h:839) [-Wdeprecated-declarations]
ibm_db.c: At top level:
ibm_db.c:42:13: warning: '_ruby_ibm_db_set_decfloat_rounding_mode_client' declar
ed 'static' but never defined [-Wunused-function]
ibm_db.c:43:14: warning: '_ruby_ibm_db_instance_name' defined but not used [-Wun
used-variable]
ibm_db.c:2539:12: warning: '_ruby_ibm_db_set_decfloat_rounding_mode_client_helpe
r' defined but not used [-Wunused-function]
make: *** [ibm_db.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/ibm_db-2.
5.17 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/ib
m_db-2.5.17/gem_make.out
獲得與「gem install ibm_db --platform x86-mingw32」相同的錯誤 – yudi2312
沒有更多答案? – yudi2312