Bluetooth in Ruby 2.3.1 on Linux -
i'd communicate arduino bluetooth module using ruby 2.3.1 on linux. tried sudo gem install bluetooth, didn't work, because execution of makefile fails. can suggest library here?
edit:
here's error log of makefile. sorry, thing in german.
current directory: /usr/lib/ruby/gems/2.3.0/gems/bluetooth- 1.0/ext/bluetooth4-lin /usr/bin/ruby -r ./siteconf20161111-21025-1p4skf9.rb extconf.rb checking main() in -lbluetooth... yes creating makefile see why extension failed compile, please check mkmf.log can found here: /usr/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/bluetooth-1.0/mkmf.log current directory: /usr/lib/ruby/gems/2.3.0/gems/bluetooth-1.0/ext/bluetooth make "destdir=" clean current directory: /usr/lib/ruby/gems/2.3.0/gems/bluetooth-1.0/ext/bluetooth make "destdir=" compiling linux/ruby_bluetooth.c in file included linux/ruby_bluetooth.c:3:0: /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:2:2: warnung: #warning use "ruby/io.h" instead of "rubyio.h" [-wcpp] #warning use "ruby/io.h" instead of "rubyio.h" ^~~~~~~ in file included linux/ruby_bluetooth.c:4:0: /usr/include/ruby-2.3.0/ruby/backward/rubysig.h:14:2: warnung: #warning rubysig.h obsolete [-wcpp] #warning rubysig.h obsolete ^~~~~~~ in file included linux/ruby_bluetooth.c:5:0: /usr/include/ruby-2.3.0/ruby/backward/util.h:2:2: warnung: #warning use "ruby/util.h" instead of bare "util.h" [-wcpp] #warning use "ruby/util.h" instead of bare "util.h" ^~~~~~~ linux/ruby_bluetooth.c: in funktion »init_bluetooth«: linux/ruby_bluetooth.c:58:40: fehler: »mbluetooth« nicht deklariert (erste benutzung in dieser funktion) bt_cbluetoothdevice = rb_const_get(mbluetooth, rb_intern("device")); ^~~~~~~~~~ linux/ruby_bluetooth.c:58:40: anmerkung: jeder nicht deklarierte bezeichner wird nur einmal für jede funktion, in der er vorkommt, gemeldet linux/ruby_bluetooth.c: in funktion »bt_socket_accept«: linux/ruby_bluetooth.c:62:5: fehler: unbekannter typname: »openfile« openfile *fptr; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:120:53: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:70:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:120:48: warnung: Übergabe des arguments 1 von »rb_io_check_closed« von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:70:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:149:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_check_closed(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c:72:50: fehler: anfrage nach element »f« in etwas, keine struktur oder variante ist sock2 = s_accept(bt_socket_class, fileno(fptr->f), (struct sockaddr *)buf, &len); ^~ linux/ruby_bluetooth.c: in funktion »bt_socket_listen«: linux/ruby_bluetooth.c:81:5: fehler: unbekannter typname: »openfile« openfile *fptr; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:120:53: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:86:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(sock, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:120:48: warnung: Übergabe des arguments 1 von »rb_io_check_closed« von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:86:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(sock, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:149:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_check_closed(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c:87:27: fehler: anfrage nach element »f« in etwas, keine struktur oder variante ist if (listen(fileno(fptr->f), backlog) < 0) ^~ linux/ruby_bluetooth.c: in funktion »bt_service_register«: linux/ruby_bluetooth.c:103:36: warnung: implizite deklaration der funktion »str2cstr« [-wimplicit-function-declaration] const char *service_name = str2cstr(rb_iv_get(self, "@name")); ^~~~~~~~ linux/ruby_bluetooth.c:103:36: warnung: initialisierung erzeugt zeiger von ganzzahl ohne typkonvertierung [-wint-conversion] linux/ruby_bluetooth.c:104:35: warnung: initialisierung erzeugt zeiger von ganzzahl ohne typkonvertierung [-wint-conversion] const char *service_dsc = str2cstr(rb_iv_get(self, "@description")); ^~~~~~~~ linux/ruby_bluetooth.c:105:36: warnung: initialisierung erzeugt zeiger von ganzzahl ohne typkonvertierung [-wint-conversion] const char *service_prov = str2cstr(rb_iv_get(self, "@provider")); ^~~~~~~~ linux/ruby_bluetooth.c:119:28: warnung: initialisierung erzeugt zeiger von ganzzahl ohne typkonvertierung [-wint-conversion] char *service_id = str2cstr(rb_iv_get(self, "@uuid")); ^~~~~~~~ linux/ruby_bluetooth.c: in funktion »bt_l2cap_socket_connect«: linux/ruby_bluetooth.c:222:5: fehler: unbekannter typname: »openfile« openfile *fptr; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:120:53: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:225:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:120:48: warnung: Übergabe des arguments 1 von »rb_io_check_closed« von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:225:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:149:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_check_closed(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c:226:21: fehler: anfrage nach element »f« in etwas, keine struktur oder variante ist fd = fileno(fptr->f); ^~ linux/ruby_bluetooth.c:229:18: warnung: initialisierung erzeugt zeiger von ganzzahl ohne typkonvertierung [-wint-conversion] char *dest = str2cstr(host); ^~~~~~~~ linux/ruby_bluetooth.c: in funktion »bt_rfcomm_socket_connect«: linux/ruby_bluetooth.c:247:5: fehler: unbekannter typname: »openfile« openfile *fptr; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:120:53: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:250:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:120:48: warnung: Übergabe des arguments 1 von »rb_io_check_closed« von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:250:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:149:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_check_closed(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c:251:21: fehler: anfrage nach element »f« in etwas, keine struktur oder variante ist fd = fileno(fptr->f); ^~ linux/ruby_bluetooth.c:254:18: warnung: initialisierung erzeugt zeiger von ganzzahl ohne typkonvertierung [-wint-conversion] char *dest = str2cstr(host); ^~~~~~~~ linux/ruby_bluetooth.c: in funktion »bt_socket_s_for_fd«: linux/ruby_bluetooth.c:272:5: fehler: unbekannter typname: »openfile« openfile *fptr; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:120:53: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:275:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(sock, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:120:48: warnung: Übergabe des arguments 1 von »rb_io_check_closed« von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:275:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(sock, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:149:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_check_closed(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c: in funktion »bt_rfcomm_socket_bind«: linux/ruby_bluetooth.c:282:5: fehler: unbekannter typname: »openfile« openfile *fptr; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:120:53: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:285:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:120:48: warnung: Übergabe des arguments 1 von »rb_io_check_closed« von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:285:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:149:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_check_closed(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c:286:21: fehler: anfrage nach element »f« in etwas, keine struktur oder variante ist fd = fileno(fptr->f); ^~ linux/ruby_bluetooth.c: in funktion »bt_l2cap_socket_bind«: linux/ruby_bluetooth.c:301:5: fehler: unbekannter typname: »openfile« openfile *fptr; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:120:53: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:304:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:120:48: warnung: Übergabe des arguments 1 von »rb_io_check_closed« von inkompatiblem zeigertyp [-wincompatible-pointer-types] #define getopenfile(obj,fp) rb_io_check_closed((fp) = rfile(rb_io_taint_check(obj))->fptr) ^ linux/ruby_bluetooth.c:304:5: anmerkung: bei substitution des makros »getopenfile« getopenfile(self, fptr); ^~~~~~~~~~~ /usr/include/ruby-2.3.0/ruby/io.h:149:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_check_closed(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c:305:21: fehler: anfrage nach element »f« in etwas, keine struktur oder variante ist fd = fileno(fptr->f); ^~ linux/ruby_bluetooth.c: in funktion »bt_init_sock«: linux/ruby_bluetooth.c:340:5: fehler: unbekannter typname: »openfile« openfile *fp = null; ^~~~~~~~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:127:10: warnung: zuweisung von inkompatiblem zeigertyp [-wincompatible-pointer-types] (fp) = rb_io_make_open_file(obj);\ ^ linux/ruby_bluetooth.c:342:5: anmerkung: bei substitution des makros »makeopenfile« makeopenfile(sock, fp); ^~~~~~~~~~~~ linux/ruby_bluetooth.c:344:7: fehler: anfrage nach element »f« in etwas, keine struktur oder variante ist fp->f = rb_fdopen(fd, "r"); ^~ linux/ruby_bluetooth.c:345:7: fehler: anfrage nach element »f2« in etwas, keine struktur oder variante ist fp->f2 = rb_fdopen(fd, "w"); ^~ linux/ruby_bluetooth.c:346:7: fehler: anfrage nach element »mode« in etwas, keine struktur oder variante ist fp->mode = fmode_readwrite; ^~ linux/ruby_bluetooth.c:348:24: warnung: Übergabe des arguments 1 von »rb_io_synchronized« von inkompatiblem zeigertyp [-wincompatible-pointer-types] rb_io_synchronized(fp); ^~ in file included /usr/include/ruby-2.3.0/ruby/backward/rubyio.h:6:0, linux/ruby_bluetooth.c:3: /usr/include/ruby-2.3.0/ruby/io.h:147:6: anmerkung: »rb_io_t * {aka struct rb_io_t *}« erwartet, aber argument hat typ »int *« void rb_io_synchronized(rb_io_t*); ^~~~~~~~~~~~~~~~~~ linux/ruby_bluetooth.c: in funktion »bt_devices_scan«: linux/ruby_bluetooth.c:414:32: fehler: makro »rb_str_new« erfordert 2 argumente, aber nur 1 wurden angegeben rb_str_new(name), rb_str_new2(addr)); ^ linux/ruby_bluetooth.c: in funktion »s_accept«: linux/ruby_bluetooth.c:435:5: fehler: »trap_beg« nicht deklariert (erste benutzung in dieser funktion) trap_beg; ^~~~~~~~ linux/ruby_bluetooth.c:437:5: fehler: »trap_end« nicht deklariert (erste benutzung in dieser funktion) trap_end; ^~~~~~~~ make: *** [makefile:239: ruby_bluetooth.o] fehler 1 make failed, exit code 2
Comments
Post a Comment