Skip to content

Instantly share code, notes, and snippets.

@QuillyT
Created October 26, 2020 13:55
Show Gist options
  • Save QuillyT/0a71d32ff29fd25365181c39988f2b6b to your computer and use it in GitHub Desktop.
Save QuillyT/0a71d32ff29fd25365181c39988f2b6b to your computer and use it in GitHub Desktop.
gem_make.out for the fast_trie gem
Building native extensions. This could take a while...
ERROR: Error installing fast_trie:
ERROR: Failed to build gem native extension.
current directory: /Users/quentintai/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fast_trie-0.5.1/ext/trie
/Users/quentintai/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20201026-42589-1ld0gyx.rb extconf.rb
creating Makefile
current directory: /Users/quentintai/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fast_trie-0.5.1/ext/trie
make "DESTDIR=" clean
current directory: /Users/quentintai/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fast_trie-0.5.1/ext/trie
make "DESTDIR="
compiling darray.c
compiling fileutils.c
fileutils.c:140:52: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
return (fread (buff, sizeof (char), len, file) == len);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
fileutils.c:146:53: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
return (fwrite (buff, sizeof (char), len, file) == len);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
2 warnings generated.
compiling tail.c
tail.c:111:32: warning: incompatible pointer types passing 'TrieData *' (aka 'unsigned long *') to parameter of type 'int32 *' (aka 'int *') [-Wincompatible-pointer-types]
file_read_int32 (file, &t->tails[i].data);
^~~~~~~~~~~~~~~~~
./fileutils.h:20:44: note: passing argument to parameter 'o_val' here
Bool file_read_int32 (FILE *file, int32 *o_val);
^
tail.c:156:50: warning: implicit conversion loses integer precision: 'TrieData' (aka 'unsigned long') to 'int32' (aka 'int') [-Wshorten-64-to-32]
!file_write_int32 (file, t->tails[i].data))
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~^~~~
2 warnings generated.
compiling trie-private.c
trie-private.c:95:55: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
if (tail_walk_str (trie->tail, t, &suffix_idx, p, len) != len)
~~~~~~~~~~~~~ ^~~
trie-private.c:95:60: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (tail_walk_str (trie->tail, t, &suffix_idx, p, len) != len)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
2 warnings generated.
compiling trie.c
trie.c:84:8: error: implicit declaration of function 'trie_has_key' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if(trie_has_key(trie, (TrieChar*)RSTRING_PTR(key)))
^
trie.c:84:8: note: did you mean 'rb_trie_has_key'?
trie.c:78:14: note: 'rb_trie_has_key' declared here
static VALUE rb_trie_has_key(VALUE self, VALUE key) {
^
trie.c:123:16: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(args);
~~~~ ^~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:1021:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
trie.c:180:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
trie.c:211:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int prefix_size = RSTRING_LEN(prefix);
~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:975:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:971:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
trie.c:211:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int prefix_size = RSTRING_LEN(prefix);
~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:976:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
trie.c:271:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int prefix_size = RSTRING_LEN(prefix);
~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:975:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:971:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
trie.c:271:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int prefix_size = RSTRING_LEN(prefix);
~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:976:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
trie.c:325:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
trie.c:343:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int prefix_size = RSTRING_LEN(prefix);
~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:975:6: note: expanded from macro 'RSTRING_LEN'
RSTRING_EMBED_LEN(str) : \
^~~~~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:971:6: note: expanded from macro 'RSTRING_EMBED_LEN'
(long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
trie.c:343:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int prefix_size = RSTRING_LEN(prefix);
~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/quentintai/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:976:28: note: expanded from macro 'RSTRING_LEN'
RSTRING(str)->as.heap.len)
~~~~~~~~~~~~~~~~~~~~~~^~~
trie.c:529:28: warning: comparison of integers of different signs: 'int' and 'TrieData' (aka 'unsigned long') [-Wsign-compare]
return TRIE_DATA_ERROR == trie_data ? Qnil : (VALUE)trie_data;
~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
10 warnings and 1 error generated.
make: *** [trie.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/quentintai/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fast_trie-0.5.1 for inspection.
Results logged to /Users/quentintai/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-19/2.5.0/fast_trie-0.5.1/gem_make.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment