rubyを使ってシリアルポートから読み込みをしようと思い「ruby-serialport」をインストールしようとしているのですがうまく出来ませんどうしたらいいでしょうか?
現在の環境は
・Debian7.9
・ruby1.9.1
・rubygems1.9.1
です.
また,「sudo gem install ruby-serialport」を実行した時のエラーは以下のようなものです.
Building native extensions. This could take a while...
ERROR: Error installing ruby-serialport:
ERROR: Failed to build gem native extension.
current directory: /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0/ext
/usr/bin/ruby1.9.1 -r ./siteconf20160203-7968-koi67h.rb extconf.rb
checking for OS... linux
checking for termios.h... yes
checking for unistd.h... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/lib/ruby/gems/1.9.1/extensions/x86_64-linux/1.9.1/ruby-serialport-0.7.0/mkmf.log
current directory: /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0/ext
make clean
current directory: /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0/ext
make
compiling serialport.c
In file included from serialport.h:25:0,
from serialport.c:20:
/usr/include/ruby-1.9.1/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
In file included from serialport.c:26:0:
impl/posix_serialport.c: In function ‘get_fd_helper’:
impl/posix_serialport.c:41:4: error: unknown type name ‘OpenFile’
impl/posix_serialport.c:43:4: warning: assignment from incompatible pointer type [enabled by default]
impl/posix_serialport.c:43:4: warning: passing argument 1 of ‘rb_io_check_closed’ from incompatible pointer type [enabled by default]
In file included from /usr/include/ruby-1.9.1/ruby/backward/rubyio.h:6:0,
from serialport.h:25,
from serialport.c:20:
/usr/include/ruby-1.9.1/ruby/io.h:169:6: note: expected ‘struct rb_io_t *’ but argument is of type ‘int *’
In file included from serialport.c:26:0:
impl/posix_serialport.c:44:23: error: request for member ‘f’ in something not a structure or union
impl/posix_serialport.c: In function ‘sp_create_impl’:
impl/posix_serialport.c:50:4: error: unknown type name ‘OpenFile’
impl/posix_serialport.c:77:4: warning: assignment from incompatible pointer type [enabled by default]
impl/posix_serialport.c:77:4: error: request for member ‘fd’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘stdio_file’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘mode’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘pid’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘lineno’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘pathv’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘finalize’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘readconv’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_asciicompat’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_pre_ecflags’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_pre_ecopts’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_initialized’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘tied_io_for_writing’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘write_lock’ in something not a structure or union
impl/posix_serialport.c:77:4: warning: assignment from incompatible pointer type [enabled by default]
impl/posix_serialport.c:91:10: warning: ‘rb_check_safe_str’ is deprecated (declared at /usr/include/ruby-1.9.1/ruby/ruby.h:471) [-Wdeprecated-declarations]
impl/posix_serialport.c:92:31: error: ‘struct RString’ has no member named ‘ptr’
impl/posix_serialport.c:133:6: error: request for member ‘f’ in something not a structure or union
impl/posix_serialport.c:134:6: error: request for member ‘mode’ in something not a structure or union
impl/posix_serialport.c: In function ‘sp_set_rts_impl’:
impl/posix_serialport.c:634:4: warning: implicit declaration of function ‘set_signal’ [-Wimplicit-function-declaration]
impl/posix_serialport.c: In function ‘sp_get_rts_impl’:
impl/posix_serialport.c:648:4: warning: implicit declaration of function ‘get_line_signals_helper’ [-Wimplicit-function-declaration]
serialport.c: At top level:
impl/posix_serialport.c:571:13: warning: ‘get_line_signals_helper_impl’ defined but not used [-Wunused-function]
impl/posix_serialport.c:592:14: warning: ‘set_signal_impl’ defined but not used [-Wunused-function]
serialport.c: In function ‘get_fd_helper’:
impl/posix_serialport.c:45:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [serialport.o] エラー 1
make failed, exit code 2
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/extensions/x86_64-linux/1.9.1/ruby-serialport-0.7.0/gem_make.out
よろしくおねがいします。
あなたの回答
tips
プレビュー