Skip to content

Instantly share code, notes, and snippets.

@oleksiilevzhynskyi
Created April 2, 2012 10:47
Show Gist options
  • Save oleksiilevzhynskyi/2282518 to your computer and use it in GitHub Desktop.
Save oleksiilevzhynskyi/2282518 to your computer and use it in GitHub Desktop.
installing the oniguruma gem on debian/ubuntu
sudo apt-get install libonig-dev
gem install oniguruma
@cmdcolin
Copy link

not sure why but I get this error?

Building native extensions. This could take a while...
ERROR:  Error installing oniguruma:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/oniguruma-1.1.0/ext
/usr/bin/ruby2.5 -r ./siteconf20191130-5395-fpq26u.rb extconf.rb
checking for -lonig... yes
creating Makefile

current directory: /var/lib/gems/2.5.0/gems/oniguruma-1.1.0/ext
make "DESTDIR=" clean

current directory: /var/lib/gems/2.5.0/gems/oniguruma-1.1.0/ext
make "DESTDIR="
compiling oregexp.c
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
oregexp.c: In function ‘name_callback’:
/usr/include/ruby-2.5.0/ruby/ruby.h:1755:50: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
 1755 |         __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
      |                                                  ^~~~~
      |                                                  |
      |                                                  const OnigUChar * {aka const unsigned char *}
/usr/include/ruby-2.5.0/ruby/ruby.h:380:33: note: in definition of macro ‘RB_ID2SYM’
  380 | #define RB_ID2SYM(x) (rb_id2sym(x))
      |                                 ^
oregexp.c:111:31: note: in expansion of macro ‘ID2SYM’
  111 |       rb_hash_aset( nameHash, ID2SYM(rb_intern(name)), INT2FIX( gn ) );
      |                               ^~~~~~
/usr/include/ruby-2.5.0/ruby/ruby.h:1755:24: note: in expansion of macro ‘RUBY_CONST_ID_CACHE’
 1755 |         __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
      |                        ^~~~~~~~~~~~~~~~~~~
oregexp.c:111:38: note: in expansion of macro ‘rb_intern’
  111 |       rb_hash_aset( nameHash, ID2SYM(rb_intern(name)), INT2FIX( gn ) );
      |                                      ^~~~~~~~~
In file included from /usr/include/ruby-2.5.0/ruby/defines.h:131,
                 from /usr/include/ruby-2.5.0/ruby/ruby.h:29,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/string.h:384:35: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
  384 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/ruby.h:1743:38: warning: pointer targets in passing argument 1 of ‘rb_intern2’ differ in signedness [-Wpointer-sign]
 1743 |      rb_intern_id_cache = rb_intern2((str), (long)strlen(str)); \
      |                                      ^~~~~
      |                                      |
      |                                      const OnigUChar * {aka const unsigned char *}
/usr/include/ruby-2.5.0/ruby/ruby.h:380:33: note: in definition of macro ‘RB_ID2SYM’
  380 | #define RB_ID2SYM(x) (rb_id2sym(x))
      |                                 ^
oregexp.c:111:31: note: in expansion of macro ‘ID2SYM’
  111 |       rb_hash_aset( nameHash, ID2SYM(rb_intern(name)), INT2FIX( gn ) );
      |                               ^~~~~~
/usr/include/ruby-2.5.0/ruby/ruby.h:1755:24: note: in expansion of macro ‘RUBY_CONST_ID_CACHE’
 1755 |         __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
      |                        ^~~~~~~~~~~~~~~~~~~
oregexp.c:111:38: note: in expansion of macro ‘rb_intern’
  111 |       rb_hash_aset( nameHash, ID2SYM(rb_intern(name)), INT2FIX( gn ) );
      |                                      ^~~~~~~~~
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/ruby.h:1729:15: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
 1729 | ID rb_intern2(const char*, long);
      |               ^~~~~~~~~~~
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
oregexp.c:111:48: warning: pointer targets in passing argument 1 of ‘rb_intern’ differ in signedness [-Wpointer-sign]
  111 |       rb_hash_aset( nameHash, ID2SYM(rb_intern(name)), INT2FIX( gn ) );
      |                                                ^~~~
      |                                                |
      |                                                const OnigUChar * {aka const unsigned char *}
/usr/include/ruby-2.5.0/ruby/ruby.h:380:33: note: in definition of macro ‘RB_ID2SYM’
  380 | #define RB_ID2SYM(x) (rb_id2sym(x))
      |                                 ^
oregexp.c:111:31: note: in expansion of macro ‘ID2SYM’
  111 |       rb_hash_aset( nameHash, ID2SYM(rb_intern(name)), INT2FIX( gn ) );
      |                               ^~~~~~
oregexp.c:111:38: note: in expansion of macro ‘rb_intern’
  111 |       rb_hash_aset( nameHash, ID2SYM(rb_intern(name)), INT2FIX( gn ) );
      |                                      ^~~~~~~~~
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/ruby.h:1728:14: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
 1728 | ID rb_intern(const char*);
      |              ^~~~~~~~~~~
oregexp.c: In function ‘oregexp_initialize’:
oregexp.c:123:41: error: ‘struct RString’ has no member named ‘ptr’
  123 |    UChar* pat_ptr = RSTRING(pattern_str)->ptr;
      |                                         ^~
oregexp.c:124:38: error: ‘struct RString’ has no member named ‘len’
  124 |    int pat_len = RSTRING(pattern_str)->len;
      |                                      ^~
oregexp.c:138:30: warning: pointer targets in passing argument 1 of ‘onig_error_code_to_str’ differ in signedness [-Wpointer-sign]
  138 |       onig_error_code_to_str(s, r, &einfo);
      |                              ^
      |                              |
      |                              char *
In file included from oregexp.c:2:
/usr/include/oniguruma.h:767:28: note: expected ‘OnigUChar *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
  767 | int onig_error_code_to_str PV_((OnigUChar* s, int err_code, ...));
      |                            ^~~
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
oregexp.c: In function ‘oregexp_make_match_data’:
oregexp.c:156:14: warning: passing argument 1 of ‘rb_obj_setup’ makes integer from pointer without a cast [-Wint-conversion]
  156 |     OBJSETUP(match, rb_cMatch, T_MATCH);
      |              ^~~~~
      |              |
      |              struct RMatch *
/usr/include/ruby-2.5.0/ruby/ruby.h:757:40: note: in definition of macro ‘OBJSETUP’
  757 | #define OBJSETUP(obj,c,t) rb_obj_setup(obj, c, t) /* use NEWOBJ_OF instead of NEWOBJ()+OBJSETUP() */
      |                                        ^~~
/usr/include/ruby-2.5.0/ruby/ruby.h:752:26: note: expected ‘VALUE’ {aka ‘long unsigned int’} but argument is of type ‘struct RMatch *’
  752 | VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
      |                    ~~~~~~^~~
oregexp.c:176:41: warning: passing argument 2 of ‘onig_foreach_name’ from incompatible pointer type [-Wincompatible-pointer-types]
  176 |         onig_foreach_name(oregexp->reg, name_callback, &packet);
      |                                         ^~~~~~~~~~~~~
      |                                         |
      |                                         int (*)(const OnigUChar *, const OnigUChar *, int,  int *, regex_t *, struct callback_packet *) {aka int (*)(const unsigned char *, const unsigned char *, int,  int *, struct re_pattern_buffer *, struct callback_packet *)}
In file included from oregexp.c:2:
/usr/include/oniguruma.h:812:23: note: expected ‘int (*)(const OnigUChar *, const OnigUChar *, int,  int *, OnigRegexType *, void *)’ {aka ‘int (*)(const unsigned char *, const unsigned char *, int,  int *, struct re_pattern_buffer *, void *)’} but argument is of type ‘int (*)(const OnigUChar *, const OnigUChar *, int,  int *, regex_t *, struct callback_packet *)’ {aka ‘int (*)(const unsigned char *, const unsigned char *, int,  int *, struct re_pattern_buffer *, struct callback_packet *)’}
  812 | int onig_foreach_name P_((OnigRegex reg, int (*func)(const OnigUChar*, const OnigUChar*,int,int*,OnigRegex,void*), void* arg));
      |                       ^~
oregexp.c: In function ‘oregexp_match’:
oregexp.c:211:7: warning: statement with no effect [-Wunused-value]
  211 |       exit;
      |       ^~~~
oregexp.c:215:40: error: ‘struct RString’ has no member named ‘ptr’
  215 |    UChar* str_ptr = RSTRING(string_str)->ptr;
      |                                        ^~
oregexp.c:216:37: error: ‘struct RString’ has no member named ‘len’
  216 |    int str_len = RSTRING(string_str)->len;
      |                                     ^~
oregexp.c:244:30: warning: pointer targets in passing argument 1 of ‘onig_error_code_to_str’ differ in signedness [-Wpointer-sign]
  244 |       onig_error_code_to_str(s, r);
      |                              ^
      |                              |
      |                              char *
In file included from oregexp.c:2:
/usr/include/oniguruma.h:767:28: note: expected ‘OnigUChar *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
  767 | int onig_error_code_to_str PV_((OnigUChar* s, int err_code, ...));
      |                            ^~~
oregexp.c: In function ‘oregexp_append_replacement’:
oregexp.c:267:52: error: ‘struct RString’ has no member named ‘len’
  267 |     int32_t  replacementLength = RSTRING(repl_text)->len;
      |                                                    ^~
oregexp.c:268:51: error: ‘struct RString’ has no member named ‘ptr’
  268 |     UChar    *replacementText = RSTRING(repl_text)->ptr;
      |                                                   ^~
oregexp.c:277:34: error: ‘struct RString’ has no member named ‘ptr’
  277 |     matchText = RSTRING(src_text)->ptr;
      |                                  ^~
oregexp.c:278:34: error: ‘struct RString’ has no member named ‘len’
  278 |     matchLen  = RSTRING(src_text)->len;
      |                                  ^~
oregexp.c:293:50: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  293 |      rb_str_buf_cat( ret, replacementText+replIdx-c_len, c_len);
      |                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                                                  |
      |                                                  OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:297:52: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  297 |                 rb_str_buf_cat(ret, replacementText+(replIdx-c_len), c_len);
      |                                     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      |                                                    |
      |                                                    OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:328:34: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  328 |     rb_str_buf_cat(ret, matchText+region->beg[0], region->end[0] - region->beg[0]);
      |                         ~~~~~~~~~^~~~~~~~~~~~~~~
      |                                  |
      |                                  const OnigUChar * {aka const unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:332:53: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  332 |                                 rb_str_buf_cat(ret, matchText, region->beg[0]);
      |                                                     ^~~~~~~~~
      |                                                     |
      |                                                     const OnigUChar * {aka const unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:336:34: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  336 |     rb_str_buf_cat(ret, matchText+region->end[0], matchLen - region->end[0]);
      |                         ~~~~~~~~~^~~~~~~~~~~~~~~
      |                                  |
      |                                  const OnigUChar * {aka const unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:341:40: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  341 |     rb_str_buf_cat(ret, replacementText+replIdx, c_len);
      |                         ~~~~~~~~~~~~~~~^~~~~~~~
      |                                        |
      |                                        OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:350:39: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  350 |          rb_str_buf_cat(ret, matchText+g_start, g_end-g_start);
      |                              ~~~~~~~~~^~~~~~~~
      |                                       |
      |                                       const OnigUChar * {aka const unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:371:43: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  371 |        rb_str_buf_cat(ret, replacementText+(replIdx-p_len), p_len+c_len);
      |                            ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      |                                           |
      |                                           OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:378:38: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  378 |         rb_str_buf_cat(ret, matchText+region->beg[groupNum],
      |                             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      const OnigUChar * {aka const unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:385:68: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  385 |                                 rb_str_buf_cat(ret, replacementText+(replIdx-p_len), p_len+c_len);
      |                                                     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:392:38: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  392 |         rb_str_buf_cat(ret, matchText+region->beg[groupNum], region->end[groupNum]-region->beg[groupNum]);
      |                             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      const OnigUChar * {aka const unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘const OnigUChar *’ {aka ‘const unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c: In function ‘str_mod_check’:
oregexp.c:405:16: error: ‘struct RString’ has no member named ‘ptr’
  405 |  if (RSTRING(s)->ptr != p || RSTRING(s)->len != len) {
      |                ^~
oregexp.c:405:40: error: ‘struct RString’ has no member named ‘len’
  405 |  if (RSTRING(s)->ptr != p || RSTRING(s)->len != len) {
      |                                        ^~
oregexp.c: In function ‘oregexp_gsub’:
oregexp.c:444:41: error: ‘struct RString’ has no member named ‘ptr’
  444 |     UChar* str_ptr = RSTRING(string_str)->ptr;
      |                                         ^~
oregexp.c:445:38: error: ‘struct RString’ has no member named ‘len’
  445 |     int str_len = RSTRING(string_str)->len;
      |                                      ^~
oregexp.c:462:29: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  462 |  rb_str_buf_cat(buf, str_ptr+prev_end, beg-prev_end);
      |                      ~~~~~~~^~~~~~~~~
      |                             |
      |                             OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:484:40: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  484 |            rb_str_buf_cat( buf, str_ptr+end, len);
      |                                 ~~~~~~~^~~~
      |                                        |
      |                                        OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c:491:33: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
  491 |     rb_str_buf_cat( buf, str_ptr+end, str_len - end);
      |                          ~~~~~~~^~~~
      |                                 |
      |                                 OnigUChar * {aka unsigned char *}
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:2040,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/intern.h:736:25: note: expected ‘const char *’ but argument is of type ‘OnigUChar *’ {aka ‘unsigned char *’}
  736 | VALUE rb_str_cat(VALUE, const char*, long);
      |                         ^~~~~~~~~~~
oregexp.c: In function ‘oregexp_safe_gsub’:
oregexp.c:527:67: warning: passing argument 3 of ‘rb_ensure’ from incompatible pointer type [-Wincompatible-pointer-types]
  527 |         return rb_ensure( oregexp_packed_gsub, (VALUE)&call_args, oregexp_cleanup_region, (VALUE)region);
      |                                                                   ^~~~~~~~~~~~~~~~~~~~~~
      |                                                                   |
      |                                                                   void (*)(OnigRegion *) {aka void (*)(struct re_registers *)}
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/ruby.h:1883:41: note: expected ‘VALUE (*)()’ {aka ‘long unsigned int (*)()’} but argument is of type ‘void (*)(OnigRegion *)’ {aka ‘void (*)(struct re_registers *)’}
 1883 | VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
      |                                         ^~~~~~~~~~~~~~~~~
oregexp.c: In function ‘oregexp_scan’:
oregexp.c:614:41: error: ‘struct RString’ has no member named ‘ptr’
  614 |     UChar* str_ptr = RSTRING(string_str)->ptr;
      |                                         ^~
oregexp.c:615:38: error: ‘struct RString’ has no member named ‘len’
  615 |     int str_len = RSTRING(string_str)->len;
      |                                      ^~
oregexp.c: In function ‘oregexp_m_scan’:
oregexp.c:671:63: warning: passing argument 3 of ‘rb_ensure’ from incompatible pointer type [-Wincompatible-pointer-types]
  671 |     return rb_ensure( oregexp_packed_scan, (VALUE)&call_args, oregexp_cleanup_region, (VALUE)region);
      |                                                               ^~~~~~~~~~~~~~~~~~~~~~
      |                                                               |
      |                                                               void (*)(OnigRegion *) {aka void (*)(struct re_registers *)}
In file included from /usr/include/ruby-2.5.0/ruby.h:33,
                 from oregexp.c:1:
/usr/include/ruby-2.5.0/ruby/ruby.h:1883:41: note: expected ‘VALUE (*)()’ {aka ‘long unsigned int (*)()’} but argument is of type ‘void (*)(OnigRegion *)’ {aka ‘void (*)(struct re_registers *)’}
 1883 | VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
      |                                         ^~~~~~~~~~~~~~~~~
make: *** [Makefile:243: oregexp.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.5.0/gems/oniguruma-1.1.0 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/oniguruma-1.1.0/gem_make.out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment