besquared / hyperloglog

An efficient native implementation of the HyperLogLog cardinality estimator for Ruby
36 stars 2 forks source link

Can't build on OS X #1

Open iconara opened 12 years ago

iconara commented 12 years ago

I was curious to try out your gem, but I couldn't get it to build in either 1.9.2 or 1.9.3:

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

        /Users/theo/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile

make
g++ -I. -I/Users/theo/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/theo/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/theo/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -I/Users/theo/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long  -fno-common -pipe-Iheaders -Wall -Wextra -Weffc++ -Wconversion -Wshadow -Wcast-align -Wwrite-strings -Wstrict-overflow=5  -Wpointer-arith -Winit-self   -o hyperloglog.o -c hyperloglog.cpp
In file included from /Users/theo/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby.h:32,
                 from hyperloglog.cpp:1:
/Users/theo/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/ruby.h:1063: warning: ‘void rb_global_variable(VALUE*)’ hides constructor for ‘struct rb_global_variable’
hyperloglog.cpp: In function ‘uword32 hyperbuilder_get_register(BoolArray<long long unsigned int>*, uword32)’:
hyperloglog.cpp:61: warning: implicit conversion shortens 64-bit value into a 32-bit value
hyperloglog.cpp: In function ‘uword32 hyperbuilder_hash(VALUE)’:
hyperloglog.cpp:76: error: ‘struct RString’ has no member named ‘ptr’
hyperloglog.cpp:76: error: ‘struct RString’ has no member named ‘len’
hyperloglog.cpp: In function ‘VALUE hyperestimator_new(VALUE, VALUE, VALUE)’:
hyperloglog.cpp:153: error: ‘struct RString’ has no member named ‘ptr’
hyperloglog.cpp:153: error: ‘struct RString’ has no member named ‘len’
hyperloglog.cpp: In function ‘VALUE hyperestimator_merge(VALUE)’:
hyperloglog.cpp:168: error: ‘struct RArray’ has no member named ‘len’
hyperloglog.cpp:171: error: ‘struct RArray’ has no member named ‘len’
hyperloglog.cpp:173: error: ‘struct RArray’ has no member named ‘ptr’
hyperloglog.cpp:173: error: ‘struct RArray’ has no member named ‘ptr’
hyperloglog.cpp:180: error: ‘registers’ was not declared in this scope
hyperloglog.cpp:185: error: ‘struct RArray’ has no member named ‘len’
hyperloglog.cpp:187: error: ‘registers’ was not declared in this scope
hyperloglog.cpp: At global scope:
hyperloglog.cpp:204: warning: unused parameter ‘klass’
make: *** [hyperloglog.o] Error 1
kenn commented 12 years ago

Getting the same error on OS X.