New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install failed #18

Closed
gsmetal opened this Issue May 16, 2013 · 46 comments

Comments

Projects
None yet
@gsmetal

gsmetal commented May 16, 2013

Complie error:

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

    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
creating Makefile

 make
compiling city.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
city.cc: In function ‘uint32 Hash32Len0to4(const char*, size_t)’:
city.cc:145:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
city.cc: In function ‘void CityHashCrc256Long(const char*, size_t, uint32, uint64*)’:
city.cc:531:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:540:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:550:5: error: ‘_mm_crc32_u64’ was not declared in this scope
make: *** [city.o] Error 1

Cityhash from googlecode without -msse4.2 compiles successfully.

PS:

$ cat /proc/cpuinfo 
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 23
model name  : Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
stepping    : 6
microcode   : 0x60c
cpu MHz     : 800.000
cache size  : 3072 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 10
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm dtherm tpr_shadow vnmi flexpriority
bogomips    : 4788.61
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 16, 2013

Owner

@gsmetal could please try to clone this repository, remove msse4.2 from https://github.com/nashby/cityhash/blob/master/ext/cityhash/extconf.rb#L3 and run rake install and report back? Thanks!

Owner

nashby commented May 16, 2013

@gsmetal could please try to clone this repository, remove msse4.2 from https://github.com/nashby/cityhash/blob/master/ext/cityhash/extconf.rb#L3 and run rake install and report back? Thanks!

@gsmetal

This comment has been minimized.

Show comment
Hide comment
@gsmetal

gsmetal May 17, 2013

So, without msse4.2 it's installed:

~/temp/cityhash$ cat ext/cityhash/extconf.rb 
require 'mkmf'

%w{g O3 Wall}.each do |flag|
  flag = "-#{flag}"
  $CPPFLAGS += " #{flag}" unless $CPPFLAGS.split.include? flag
end

create_makefile('cityhash/cityhash')
~/temp/cityhash$ gem build cityhash.gemspec 
WARNING:  licenses is empty
WARNING:  description and summary are identical
  Successfully built RubyGem
  Name: cityhash
  Version: 0.8.0
  File: cityhash-0.8.0.gem
~/temp/cityhash$ gem install cityhash-0.8.0.gem 
Building native extensions.  This could take a while...
Successfully installed cityhash-0.8.0
Parsing documentation for cityhash-0.8.0
unable to convert "\xA0" from ASCII-8BIT to UTF-8 for lib/cityhash/cityhash.so, skipping
Installing ri documentation for cityhash-0.8.0
1 gem installed

gsmetal commented May 17, 2013

So, without msse4.2 it's installed:

~/temp/cityhash$ cat ext/cityhash/extconf.rb 
require 'mkmf'

%w{g O3 Wall}.each do |flag|
  flag = "-#{flag}"
  $CPPFLAGS += " #{flag}" unless $CPPFLAGS.split.include? flag
end

create_makefile('cityhash/cityhash')
~/temp/cityhash$ gem build cityhash.gemspec 
WARNING:  licenses is empty
WARNING:  description and summary are identical
  Successfully built RubyGem
  Name: cityhash
  Version: 0.8.0
  File: cityhash-0.8.0.gem
~/temp/cityhash$ gem install cityhash-0.8.0.gem 
Building native extensions.  This could take a while...
Successfully installed cityhash-0.8.0
Parsing documentation for cityhash-0.8.0
unable to convert "\xA0" from ASCII-8BIT to UTF-8 for lib/cityhash/cityhash.so, skipping
Installing ri documentation for cityhash-0.8.0
1 gem installed
@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 17, 2013

Owner

@gsmetal thanks. Could you please try to add march=native to that flags list and build it again? :)

Owner

nashby commented May 17, 2013

@gsmetal thanks. Could you please try to add march=native to that flags list and build it again? :)

@gsmetal

This comment has been minimized.

Show comment
Hide comment
@gsmetal

gsmetal May 17, 2013

It's OK, too:

~/temp/cityhash$ cat ext/cityhash/extconf.rb 
require 'mkmf'

%w{g O3 Wall march=native}.each do |flag|
  flag = "-#{flag}"
  $CPPFLAGS += " #{flag}" unless $CPPFLAGS.split.include? flag
end

create_makefile('cityhash/cityhash')
~/temp/cityhash$ gem build cityhash.gemspec 
WARNING:  licenses is empty
WARNING:  description and summary are identical
  Successfully built RubyGem
  Name: cityhash
  Version: 0.8.0
  File: cityhash-0.8.0.gem
~/temp/cityhash$ gem install cityhash-0.8.0.gem 
Building native extensions.  This could take a while...
Successfully installed cityhash-0.8.0
Parsing documentation for cityhash-0.8.0
unable to convert "\xA0" from ASCII-8BIT to UTF-8 for lib/cityhash/cityhash.so, skipping
1 gem installed

gsmetal commented May 17, 2013

It's OK, too:

~/temp/cityhash$ cat ext/cityhash/extconf.rb 
require 'mkmf'

%w{g O3 Wall march=native}.each do |flag|
  flag = "-#{flag}"
  $CPPFLAGS += " #{flag}" unless $CPPFLAGS.split.include? flag
end

create_makefile('cityhash/cityhash')
~/temp/cityhash$ gem build cityhash.gemspec 
WARNING:  licenses is empty
WARNING:  description and summary are identical
  Successfully built RubyGem
  Name: cityhash
  Version: 0.8.0
  File: cityhash-0.8.0.gem
~/temp/cityhash$ gem install cityhash-0.8.0.gem 
Building native extensions.  This could take a while...
Successfully installed cityhash-0.8.0
Parsing documentation for cityhash-0.8.0
unable to convert "\xA0" from ASCII-8BIT to UTF-8 for lib/cityhash/cityhash.so, skipping
1 gem installed
@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 17, 2013

Owner

@gsmetal nice, thanks. I assume that methods like CityHash.hash128crc, CityHash.hash128crc, CityHash.hash256crc just don't work for you, right? I'll release a new version tonight.

Owner

nashby commented May 17, 2013

@gsmetal nice, thanks. I assume that methods like CityHash.hash128crc, CityHash.hash128crc, CityHash.hash256crc just don't work for you, right? I'll release a new version tonight.

@gsmetal

This comment has been minimized.

Show comment
Hide comment
@gsmetal

gsmetal May 17, 2013

You're right:

2.0.0-p0 :001 > require 'cityhash'
 => true 
2.0.0-p0 :002 > CityHash.hash128crc('test')
NoMethodError: undefined method `hash128crc' for CityHash::Internal:Module
    from /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:32:in `hash128crc'
    from (irb):2
    from /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'
2.0.0-p0 :003 > CityHash.hash256crc('test')
NoMethodError: undefined method `hash256crc' for CityHash::Internal:Module
    from /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:39:in `hash256crc'
    from (irb):3
    from /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'
2.0.0-p0 :004 > CityHash.hash128('test')
 => 124124989950401219618153994964897029896 

And, additionally, if passing smth not string as argument, there is segfault :)

2.0.0-p0 :005 > CityHash.hash128(123)
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22: [BUG] Segmentation fault
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]

-- Control frame information -----------------------------------------------
c:0020 p:---- s:0082 e:000081 CFUNC  :hash128
c:0019 p:0044 s:0078 e:000077 METHOD /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22
c:0018 p:0013 s:0072 e:000071 EVAL   (irb):5 [FINISH]
c:0017 p:---- s:0070 e:000069 CFUNC  :eval
c:0016 p:0024 s:0063 e:000062 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb:86
c:0015 p:0025 s:0056 e:000054 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/context.rb:380
c:0014 p:0022 s:0050 e:000049 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:492
c:0013 p:0040 s:0042 e:000041 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:624
c:0012 p:0009 s:0037 e:000036 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:489
c:0011 p:0118 s:0033 e:000032 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:247 [FINISH]
c:0010 p:---- s:0030 e:000029 CFUNC  :loop
c:0009 p:0007 s:0027 e:000026 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:233 [FINISH]
c:0008 p:---- s:0025 e:000024 CFUNC  :catch
c:0007 p:0015 s:0021 e:000020 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:232
c:0006 p:0030 s:0018 E:0026c4 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:488
c:0005 p:0008 s:0015 e:000014 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:397 [FINISH]
c:0004 p:---- s:0013 e:000012 CFUNC  :catch
c:0003 p:0143 s:0009 E:0023f4 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:396
c:0002 p:0122 s:0004 E:00137c EVAL   /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16 [FINISH]
c:0001 p:0000 s:0002 E:0018b4 TOP    [FINISH]

/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:396:in `start'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:396:in `catch'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:397:in `block in start'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:488:in `eval_input'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `each_top_level_statement'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `catch'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `block in each_top_level_statement'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `loop'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:247:in `block (2 levels) in each_top_level_statement'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:489:in `block in eval_input'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:624:in `signal_status'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:492:in `block (2 levels) in eval_input'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/context.rb:380:in `evaluate'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb:86:in `evaluate'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb:86:in `eval'
(irb):5:in `irb_binding'
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22:in `hash128'
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22:in `hash128'

-- C level backtrace information -------------------------------------------
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1addd0) [0xb7660dd0] vm_dump.c:647
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x5bdfd) [0xb750edfd] error.c:283
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_bug+0x40) [0xb750fb40] error.c:302
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x12e9f4) [0xb75e19f4] signal.c:649
[0xb773740c]
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so(cityhash_hash128+0x1e) [0xb6e88e8e] cityhash.cc:33
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x194898) [0xb7647898] vm_insnhelper.c:1306
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19cfd1) [0xb764ffd1] insns.def:1017
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a180b) [0xb765480b] vm_eval.c:1229
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1cf9) [0xb7654cf9] vm_eval.c:1270
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19484e) [0xb764784e] vm_insnhelper.c:1294
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19cfd1) [0xb764ffd1] insns.def:1017
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a6569) [0xb7659569] vm.c:648
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_rescue2+0x173) [0xb75176e3] eval.c:714
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x196b92) [0xb7649b92] vm_eval.c:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19486e) [0xb764786e] vm_insnhelper.c:1300
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a59af) [0xb76589af] vm_insnhelper.c:1528
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19c86d) [0xb764f86d] insns.def:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a6f1d) [0xb7659f1d] vm.c:648
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_catch_obj+0xc9) [0xb764c839] vm_eval.c:1804
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x199907) [0xb764c907] vm_eval.c:1780
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19484e) [0xb764784e] vm_insnhelper.c:1294
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a59af) [0xb76589af] vm_insnhelper.c:1528
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19c86d) [0xb764f86d] insns.def:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a6f1d) [0xb7659f1d] vm.c:648
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_catch_obj+0xc9) [0xb764c839] vm_eval.c:1804
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x199907) [0xb764c907] vm_eval.c:1780
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19484e) [0xb764784e] vm_insnhelper.c:1294
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a59af) [0xb76589af] vm_insnhelper.c:1528
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19c86d) [0xb764f86d] insns.def:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_iseq_eval_main+0x156) [0xb765ac76] vm.c:1423
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x62a1c) [0xb7515a1c] eval.c:250
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(ruby_exec_node+0x24) [0xb75170d4] eval.c:315
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(ruby_run_node+0x36) [0xb7519096] eval.c:307
irb() [0x80486a8]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0xb72f9935]
irb() [0x80486d1]

-- Other runtime information -----------------------------------------------

* Loaded script: irb

* Loaded features:

    0 enumerator.so
    1 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
    2 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
    3 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/rbconfig.rb
    4 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/compatibility.rb
    5 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/defaults.rb
    6 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/deprecate.rb
    7 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/errors.rb
    8 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/version.rb
    9 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/requirement.rb
   10 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/platform.rb
   11 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb
   12 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/exceptions.rb
   13 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
   14 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb
   15 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems.rb
   16 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/e2mmap.rb
   17 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/init.rb
   18 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb
   19 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/inspector.rb
   20 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/context.rb
   21 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/extend-command.rb
   22 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/output-method.rb
   23 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/notifier.rb
   24 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/slex.rb
   25 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-token.rb
   26 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb
   27 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/src_encoding.rb
   28 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/magic-file.rb
   29 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
   30 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/input-method.rb
   31 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/locale.rb
   32 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb
   33 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/path_support.rb
   34 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb
   35 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/completion.rb
   36 /home/gsmetal/.rvm/scripts/irbrc.rb
   37 /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/version.rb
   38 /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
   39 /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb

* Process memory map:

08048000-08049000 r-xp 00000000 08:03 4701988    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
08049000-0804a000 r--p 00000000 08:03 4701988    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
0804a000-0804b000 rw-p 00001000 08:03 4701988    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
09f47000-0a336000 rw-p 00000000 00:00 0          [heap]
b6bda000-b6bf5000 r-xp 00000000 08:02 785418     /lib/i386-linux-gnu/libgcc_s.so.1
b6bf5000-b6bf6000 r--p 0001a000 08:02 785418     /lib/i386-linux-gnu/libgcc_s.so.1
b6bf6000-b6bf7000 rw-p 0001b000 08:02 785418     /lib/i386-linux-gnu/libgcc_s.so.1
b6bf7000-b6cd3000 r-xp 00000000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd3000-b6cd4000 ---p 000dc000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd4000-b6cd8000 r--p 000dc000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd8000-b6cd9000 rw-p 000e0000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd9000-b6ce0000 rw-p 00000000 00:00 0 
b6d00000-b6d21000 rw-p 00000000 00:00 0 
b6d21000-b6e00000 ---p 00000000 00:00 0 
b6e13000-b6e2f000 r-xp 00000000 08:02 805636     /lib/i386-linux-gnu/libtinfo.so.5.9
b6e2f000-b6e31000 r--p 0001b000 08:02 805636     /lib/i386-linux-gnu/libtinfo.so.5.9
b6e31000-b6e32000 rw-p 0001d000 08:02 805636     /lib/i386-linux-gnu/libtinfo.so.5.9
b6e32000-b6e67000 r-xp 00000000 08:02 785083     /lib/i386-linux-gnu/libreadline.so.6.2
b6e67000-b6e68000 r--p 00035000 08:02 785083     /lib/i386-linux-gnu/libreadline.so.6.2
b6e68000-b6e6b000 rw-p 00036000 08:02 785083     /lib/i386-linux-gnu/libreadline.so.6.2
b6e6b000-b6e6c000 rw-p 00000000 00:00 0 
b6e86000-b6e8a000 r-xp 00000000 08:03 7050272    /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
b6e8a000-b6e8b000 r--p 00003000 08:03 7050272    /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
b6e8b000-b6e8c000 rw-p 00004000 08:03 7050272    /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
b6e8c000-b6f0d000 rw-p 00000000 00:00 0 
b6f0d000-b703f000 r--p 00340000 08:02 134127     /usr/lib/locale/locale-archive
b703f000-b723f000 r--p 00000000 08:02 134127     /usr/lib/locale/locale-archive
b723f000-b7241000 rw-p 00000000 00:00 0 
b7241000-b7282000 r-xp 00000000 08:02 809358     /lib/i386-linux-gnu/libm-2.17.so
b7282000-b7283000 r--p 00040000 08:02 809358     /lib/i386-linux-gnu/libm-2.17.so
b7283000-b7284000 rw-p 00041000 08:02 809358     /lib/i386-linux-gnu/libm-2.17.so
b7284000-b728d000 r-xp 00000000 08:02 816968     /lib/i386-linux-gnu/libcrypt-2.17.so
b728d000-b728e000 r--p 00008000 08:02 816968     /lib/i386-linux-gnu/libcrypt-2.17.so
b728e000-b728f000 rw-p 00009000 08:02 816968     /lib/i386-linux-gnu/libcrypt-2.17.so
b728f000-b72b6000 rw-p 00000000 00:00 0 
b72b6000-b72b9000 r-xp 00000000 08:02 816993     /lib/i386-linux-gnu/libdl-2.17.so
b72b9000-b72ba000 r--p 00002000 08:02 816993     /lib/i386-linux-gnu/libdl-2.17.so
b72ba000-b72bb000 rw-p 00003000 08:02 816993     /lib/i386-linux-gnu/libdl-2.17.so
b72bb000-b72c2000 r-xp 00000000 08:02 788198     /lib/i386-linux-gnu/librt-2.17.so
b72c2000-b72c3000 r--p 00006000 08:02 788198     /lib/i386-linux-gnu/librt-2.17.so
b72c3000-b72c4000 rw-p 00007000 08:02 788198     /lib/i386-linux-gnu/librt-2.17.so
b72c4000-b72db000 r-xp 00000000 08:02 816977     /lib/i386-linux-gnu/libpthread-2.17.so
b72db000-b72dc000 r--p 00016000 08:02 816977     /lib/i386-linux-gnu/libpthread-2.17.so
b72dc000-b72dd000 rw-p 00017000 08:02 816977     /lib/i386-linux-gnu/libpthread-2.17.so
b72dd000-b72e0000 rw-p 00000000 00:00 0 
b72e0000-b748d000 r-xp 00000000 08:02 816964     /lib/i386-linux-gnu/libc-2.17.so
b748d000-b748f000 r--p 001ad000 08:02 816964     /lib/i386-linux-gnu/libc-2.17.so
b748f000-b7490000 rw-p 001af000 08:02 816964     /lib/i386-linux-gnu/libc-2.17.so
b7490000-b7493000 rw-p 00000000 00:00 0 
b7496000-b7498000 rw-p 00000000 00:00 0 
b7498000-b749f000 r--s 00000000 08:02 162010     /usr/lib/i386-linux-gnu/gconv/gconv-modules.cache
b749f000-b74a5000 r-xp 00000000 08:03 4842225    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
b74a5000-b74a6000 r--p 00006000 08:03 4842225    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
b74a6000-b74a7000 rw-p 00007000 08:03 4842225    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
b74a7000-b74a9000 r-xp 00000000 08:03 6274501    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b74a9000-b74aa000 r--p 00001000 08:03 6274501    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b74aa000-b74ab000 rw-p 00002000 08:03 6274501    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b74ab000-b74ad000 r-xp 00000000 08:03 6274534    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b74ad000-b74ae000 r--p 00001000 08:03 6274534    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b74ae000-b74af000 rw-p 00002000 08:03 6274534    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b74af000-b74b0000 ---p 00000000 00:00 0 
b74b0000-b74b3000 rw-p 00000000 00:00 0          [stack:23039]
b74b3000-b771e000 r-xp 00000000 08:03 4701990    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0.0
b771e000-b7721000 r--p 0026a000 08:03 4701990    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0.0
b7721000-b7723000 rw-p 0026d000 08:03 4701990    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0.0
b7723000-b7737000 rw-p 00000000 00:00 0 
b7737000-b7738000 r-xp 00000000 00:00 0          [vdso]
b7738000-b7758000 r-xp 00000000 08:02 817000     /lib/i386-linux-gnu/ld-2.17.so
b7758000-b7759000 r--p 0001f000 08:02 817000     /lib/i386-linux-gnu/ld-2.17.so
b7759000-b775a000 rw-p 00020000 08:02 817000     /lib/i386-linux-gnu/ld-2.17.so
bfde5000-bfe06000 rw-p 00000000 00:00 0 


[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

gsmetal commented May 17, 2013

You're right:

2.0.0-p0 :001 > require 'cityhash'
 => true 
2.0.0-p0 :002 > CityHash.hash128crc('test')
NoMethodError: undefined method `hash128crc' for CityHash::Internal:Module
    from /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:32:in `hash128crc'
    from (irb):2
    from /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'
2.0.0-p0 :003 > CityHash.hash256crc('test')
NoMethodError: undefined method `hash256crc' for CityHash::Internal:Module
    from /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:39:in `hash256crc'
    from (irb):3
    from /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'
2.0.0-p0 :004 > CityHash.hash128('test')
 => 124124989950401219618153994964897029896 

And, additionally, if passing smth not string as argument, there is segfault :)

2.0.0-p0 :005 > CityHash.hash128(123)
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22: [BUG] Segmentation fault
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]

-- Control frame information -----------------------------------------------
c:0020 p:---- s:0082 e:000081 CFUNC  :hash128
c:0019 p:0044 s:0078 e:000077 METHOD /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22
c:0018 p:0013 s:0072 e:000071 EVAL   (irb):5 [FINISH]
c:0017 p:---- s:0070 e:000069 CFUNC  :eval
c:0016 p:0024 s:0063 e:000062 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb:86
c:0015 p:0025 s:0056 e:000054 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/context.rb:380
c:0014 p:0022 s:0050 e:000049 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:492
c:0013 p:0040 s:0042 e:000041 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:624
c:0012 p:0009 s:0037 e:000036 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:489
c:0011 p:0118 s:0033 e:000032 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:247 [FINISH]
c:0010 p:---- s:0030 e:000029 CFUNC  :loop
c:0009 p:0007 s:0027 e:000026 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:233 [FINISH]
c:0008 p:---- s:0025 e:000024 CFUNC  :catch
c:0007 p:0015 s:0021 e:000020 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:232
c:0006 p:0030 s:0018 E:0026c4 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:488
c:0005 p:0008 s:0015 e:000014 BLOCK  /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:397 [FINISH]
c:0004 p:---- s:0013 e:000012 CFUNC  :catch
c:0003 p:0143 s:0009 E:0023f4 METHOD /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:396
c:0002 p:0122 s:0004 E:00137c EVAL   /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16 [FINISH]
c:0001 p:0000 s:0002 E:0018b4 TOP    [FINISH]

/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:396:in `start'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:396:in `catch'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:397:in `block in start'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:488:in `eval_input'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `each_top_level_statement'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `catch'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `block in each_top_level_statement'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `loop'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb:247:in `block (2 levels) in each_top_level_statement'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:489:in `block in eval_input'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:624:in `signal_status'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb:492:in `block (2 levels) in eval_input'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/context.rb:380:in `evaluate'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb:86:in `evaluate'
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb:86:in `eval'
(irb):5:in `irb_binding'
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22:in `hash128'
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb:22:in `hash128'

-- C level backtrace information -------------------------------------------
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1addd0) [0xb7660dd0] vm_dump.c:647
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x5bdfd) [0xb750edfd] error.c:283
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_bug+0x40) [0xb750fb40] error.c:302
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x12e9f4) [0xb75e19f4] signal.c:649
[0xb773740c]
/home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so(cityhash_hash128+0x1e) [0xb6e88e8e] cityhash.cc:33
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x194898) [0xb7647898] vm_insnhelper.c:1306
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19cfd1) [0xb764ffd1] insns.def:1017
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a180b) [0xb765480b] vm_eval.c:1229
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1cf9) [0xb7654cf9] vm_eval.c:1270
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19484e) [0xb764784e] vm_insnhelper.c:1294
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19cfd1) [0xb764ffd1] insns.def:1017
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a6569) [0xb7659569] vm.c:648
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_rescue2+0x173) [0xb75176e3] eval.c:714
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x196b92) [0xb7649b92] vm_eval.c:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19486e) [0xb764786e] vm_insnhelper.c:1300
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a59af) [0xb76589af] vm_insnhelper.c:1528
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19c86d) [0xb764f86d] insns.def:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a6f1d) [0xb7659f1d] vm.c:648
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_catch_obj+0xc9) [0xb764c839] vm_eval.c:1804
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x199907) [0xb764c907] vm_eval.c:1780
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19484e) [0xb764784e] vm_insnhelper.c:1294
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a59af) [0xb76589af] vm_insnhelper.c:1528
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19c86d) [0xb764f86d] insns.def:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a6f1d) [0xb7659f1d] vm.c:648
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_catch_obj+0xc9) [0xb764c839] vm_eval.c:1804
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x199907) [0xb764c907] vm_eval.c:1780
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19484e) [0xb764784e] vm_insnhelper.c:1294
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x197c0c) [0xb764ac0c] vm_insnhelper.c:1438
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a59af) [0xb76589af] vm_insnhelper.c:1528
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x19c86d) [0xb764f86d] insns.def:1002
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x1a1203) [0xb7654203] vm.c:1175
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(rb_iseq_eval_main+0x156) [0xb765ac76] vm.c:1423
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(+0x62a1c) [0xb7515a1c] eval.c:250
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(ruby_exec_node+0x24) [0xb75170d4] eval.c:315
/home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0(ruby_run_node+0x36) [0xb7519096] eval.c:307
irb() [0x80486a8]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0xb72f9935]
irb() [0x80486d1]

-- Other runtime information -----------------------------------------------

* Loaded script: irb

* Loaded features:

    0 enumerator.so
    1 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
    2 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
    3 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/rbconfig.rb
    4 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/compatibility.rb
    5 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/defaults.rb
    6 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/deprecate.rb
    7 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/errors.rb
    8 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/version.rb
    9 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/requirement.rb
   10 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/platform.rb
   11 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb
   12 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/exceptions.rb
   13 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
   14 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb
   15 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems.rb
   16 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/e2mmap.rb
   17 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/init.rb
   18 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/workspace.rb
   19 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/inspector.rb
   20 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/context.rb
   21 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/extend-command.rb
   22 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/output-method.rb
   23 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/notifier.rb
   24 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/slex.rb
   25 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-token.rb
   26 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/ruby-lex.rb
   27 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/src_encoding.rb
   28 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/magic-file.rb
   29 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
   30 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/input-method.rb
   31 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/locale.rb
   32 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb.rb
   33 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/path_support.rb
   34 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb
   35 /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/completion.rb
   36 /home/gsmetal/.rvm/scripts/irbrc.rb
   37 /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/version.rb
   38 /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
   39 /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash.rb

* Process memory map:

08048000-08049000 r-xp 00000000 08:03 4701988    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
08049000-0804a000 r--p 00000000 08:03 4701988    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
0804a000-0804b000 rw-p 00001000 08:03 4701988    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
09f47000-0a336000 rw-p 00000000 00:00 0          [heap]
b6bda000-b6bf5000 r-xp 00000000 08:02 785418     /lib/i386-linux-gnu/libgcc_s.so.1
b6bf5000-b6bf6000 r--p 0001a000 08:02 785418     /lib/i386-linux-gnu/libgcc_s.so.1
b6bf6000-b6bf7000 rw-p 0001b000 08:02 785418     /lib/i386-linux-gnu/libgcc_s.so.1
b6bf7000-b6cd3000 r-xp 00000000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd3000-b6cd4000 ---p 000dc000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd4000-b6cd8000 r--p 000dc000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd8000-b6cd9000 rw-p 000e0000 08:02 134270     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b6cd9000-b6ce0000 rw-p 00000000 00:00 0 
b6d00000-b6d21000 rw-p 00000000 00:00 0 
b6d21000-b6e00000 ---p 00000000 00:00 0 
b6e13000-b6e2f000 r-xp 00000000 08:02 805636     /lib/i386-linux-gnu/libtinfo.so.5.9
b6e2f000-b6e31000 r--p 0001b000 08:02 805636     /lib/i386-linux-gnu/libtinfo.so.5.9
b6e31000-b6e32000 rw-p 0001d000 08:02 805636     /lib/i386-linux-gnu/libtinfo.so.5.9
b6e32000-b6e67000 r-xp 00000000 08:02 785083     /lib/i386-linux-gnu/libreadline.so.6.2
b6e67000-b6e68000 r--p 00035000 08:02 785083     /lib/i386-linux-gnu/libreadline.so.6.2
b6e68000-b6e6b000 rw-p 00036000 08:02 785083     /lib/i386-linux-gnu/libreadline.so.6.2
b6e6b000-b6e6c000 rw-p 00000000 00:00 0 
b6e86000-b6e8a000 r-xp 00000000 08:03 7050272    /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
b6e8a000-b6e8b000 r--p 00003000 08:03 7050272    /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
b6e8b000-b6e8c000 rw-p 00004000 08:03 7050272    /home/gsmetal/.rvm/gems/ruby-2.0.0-p0/gems/cityhash-0.8.0/lib/cityhash/cityhash.so
b6e8c000-b6f0d000 rw-p 00000000 00:00 0 
b6f0d000-b703f000 r--p 00340000 08:02 134127     /usr/lib/locale/locale-archive
b703f000-b723f000 r--p 00000000 08:02 134127     /usr/lib/locale/locale-archive
b723f000-b7241000 rw-p 00000000 00:00 0 
b7241000-b7282000 r-xp 00000000 08:02 809358     /lib/i386-linux-gnu/libm-2.17.so
b7282000-b7283000 r--p 00040000 08:02 809358     /lib/i386-linux-gnu/libm-2.17.so
b7283000-b7284000 rw-p 00041000 08:02 809358     /lib/i386-linux-gnu/libm-2.17.so
b7284000-b728d000 r-xp 00000000 08:02 816968     /lib/i386-linux-gnu/libcrypt-2.17.so
b728d000-b728e000 r--p 00008000 08:02 816968     /lib/i386-linux-gnu/libcrypt-2.17.so
b728e000-b728f000 rw-p 00009000 08:02 816968     /lib/i386-linux-gnu/libcrypt-2.17.so
b728f000-b72b6000 rw-p 00000000 00:00 0 
b72b6000-b72b9000 r-xp 00000000 08:02 816993     /lib/i386-linux-gnu/libdl-2.17.so
b72b9000-b72ba000 r--p 00002000 08:02 816993     /lib/i386-linux-gnu/libdl-2.17.so
b72ba000-b72bb000 rw-p 00003000 08:02 816993     /lib/i386-linux-gnu/libdl-2.17.so
b72bb000-b72c2000 r-xp 00000000 08:02 788198     /lib/i386-linux-gnu/librt-2.17.so
b72c2000-b72c3000 r--p 00006000 08:02 788198     /lib/i386-linux-gnu/librt-2.17.so
b72c3000-b72c4000 rw-p 00007000 08:02 788198     /lib/i386-linux-gnu/librt-2.17.so
b72c4000-b72db000 r-xp 00000000 08:02 816977     /lib/i386-linux-gnu/libpthread-2.17.so
b72db000-b72dc000 r--p 00016000 08:02 816977     /lib/i386-linux-gnu/libpthread-2.17.so
b72dc000-b72dd000 rw-p 00017000 08:02 816977     /lib/i386-linux-gnu/libpthread-2.17.so
b72dd000-b72e0000 rw-p 00000000 00:00 0 
b72e0000-b748d000 r-xp 00000000 08:02 816964     /lib/i386-linux-gnu/libc-2.17.so
b748d000-b748f000 r--p 001ad000 08:02 816964     /lib/i386-linux-gnu/libc-2.17.so
b748f000-b7490000 rw-p 001af000 08:02 816964     /lib/i386-linux-gnu/libc-2.17.so
b7490000-b7493000 rw-p 00000000 00:00 0 
b7496000-b7498000 rw-p 00000000 00:00 0 
b7498000-b749f000 r--s 00000000 08:02 162010     /usr/lib/i386-linux-gnu/gconv/gconv-modules.cache
b749f000-b74a5000 r-xp 00000000 08:03 4842225    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
b74a5000-b74a6000 r--p 00006000 08:03 4842225    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
b74a6000-b74a7000 rw-p 00007000 08:03 4842225    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/readline.so
b74a7000-b74a9000 r-xp 00000000 08:03 6274501    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b74a9000-b74aa000 r--p 00001000 08:03 6274501    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b74aa000-b74ab000 rw-p 00002000 08:03 6274501    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b74ab000-b74ad000 r-xp 00000000 08:03 6274534    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b74ad000-b74ae000 r--p 00001000 08:03 6274534    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b74ae000-b74af000 rw-p 00002000 08:03 6274534    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b74af000-b74b0000 ---p 00000000 00:00 0 
b74b0000-b74b3000 rw-p 00000000 00:00 0          [stack:23039]
b74b3000-b771e000 r-xp 00000000 08:03 4701990    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0.0
b771e000-b7721000 r--p 0026a000 08:03 4701990    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0.0
b7721000-b7723000 rw-p 0026d000 08:03 4701990    /home/gsmetal/.rvm/rubies/ruby-2.0.0-p0/lib/libruby.so.2.0.0
b7723000-b7737000 rw-p 00000000 00:00 0 
b7737000-b7738000 r-xp 00000000 00:00 0          [vdso]
b7738000-b7758000 r-xp 00000000 08:02 817000     /lib/i386-linux-gnu/ld-2.17.so
b7758000-b7759000 r--p 0001f000 08:02 817000     /lib/i386-linux-gnu/ld-2.17.so
b7759000-b775a000 rw-p 00020000 08:02 817000     /lib/i386-linux-gnu/ld-2.17.so
bfde5000-bfe06000 rw-p 00000000 00:00 0 


[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 17, 2013

Owner

@gsmetal yeah, I think we should always convert input to string. I'll fix it too, thank you :)

Owner

nashby commented May 17, 2013

@gsmetal yeah, I think we should always convert input to string. I'll fix it too, thank you :)

@nashby nashby closed this in 64375a5 May 17, 2013

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 17, 2013

Owner

@gsmetal I've just released 0.8.1 version. Could you please test it? Thanks!

Owner

nashby commented May 17, 2013

@gsmetal I've just released 0.8.1 version. Could you please test it? Thanks!

@gsmetal

This comment has been minimized.

Show comment
Hide comment
@gsmetal

gsmetal May 20, 2013

Yes, it's OK now, thanks!

$ gem install cityhash
Fetching: cityhash-0.8.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed cityhash-0.8.1
Parsing documentation for cityhash-0.8.1
unable to convert "\xA0" from ASCII-8BIT to UTF-8 for lib/cityhash/cityhash.so, skipping
Installing ri documentation for cityhash-0.8.1
1 gem installed

gsmetal commented May 20, 2013

Yes, it's OK now, thanks!

$ gem install cityhash
Fetching: cityhash-0.8.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed cityhash-0.8.1
Parsing documentation for cityhash-0.8.1
unable to convert "\xA0" from ASCII-8BIT to UTF-8 for lib/cityhash/cityhash.so, skipping
Installing ri documentation for cityhash-0.8.1
1 gem installed

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 20, 2013

Owner

@gsmetal awesome, thank you for reporting back!

Owner

nashby commented May 20, 2013

@gsmetal awesome, thank you for reporting back!

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

Still experimenting the same issue with 0.8.1.

wiki1210 commented May 27, 2013

Still experimenting the same issue with 0.8.1.

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

@wiki1210 what OS are you using?

Owner

nashby commented May 27, 2013

@wiki1210 what OS are you using?

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

ubuntu 12.04

wiki1210 commented May 27, 2013

ubuntu 12.04

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

@wiki1210 could you please show output of cat /proc/cpuinfo?

Owner

nashby commented May 27, 2013

@wiki1210 could you please show output of cat /proc/cpuinfo?

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
stepping : 7
microcode : 0x25
cpu MHz : 3292.609
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips : 6585.21
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
stepping : 7
microcode : 0x25
cpu MHz : 3292.609
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips : 6585.21
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

wiki1210 commented May 27, 2013

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
stepping : 7
microcode : 0x25
cpu MHz : 3292.609
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips : 6585.21
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
stepping : 7
microcode : 0x25
cpu MHz : 3292.609
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips : 6585.21
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

@wiki1210 hrm, pretty strange. Could you please post a stacktrace of running gem install cityhash?

Owner

nashby commented May 27, 2013

@wiki1210 hrm, pretty strange. Could you please post a stacktrace of running gem install cityhash?

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

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

    /home/viki/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb

creating Makefile

make
compiling cityhash.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling city.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
city.cc: In function ‘uint32 Hash32Len0to4(const char_, size_t)’:
city.cc:145:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:531:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:540:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:550:5: error: ‘mm_crc32_u64’ was not declared in this scope
make: *
* [city.o] Error 1

Gem files will remain installed in /home/viki/.rvm/gems/ruby-1.9.3-p429/gems/cityhash-0.8.1 for inspection.
Results logged to /home/viki/.rvm/gems/ruby-1.9.3-p429/gems/cityhash-0.8.1/ext/cityhash/gem_make.out

wiki1210 commented May 27, 2013

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

    /home/viki/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb

creating Makefile

make
compiling cityhash.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling city.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
city.cc: In function ‘uint32 Hash32Len0to4(const char_, size_t)’:
city.cc:145:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:531:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:540:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:550:5: error: ‘mm_crc32_u64’ was not declared in this scope
make: *
* [city.o] Error 1

Gem files will remain installed in /home/viki/.rvm/gems/ruby-1.9.3-p429/gems/cityhash-0.8.1 for inspection.
Results logged to /home/viki/.rvm/gems/ruby-1.9.3-p429/gems/cityhash-0.8.1/ext/cityhash/gem_make.out

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

hm, looks like you are using some kind of old gcc. Show me gcc -v please :)

Owner

nashby commented May 27, 2013

hm, looks like you are using some kind of old gcc. Show me gcc -v please :)

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

wiki1210 commented May 27, 2013

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

Updating my gcc...

wiki1210 commented May 27, 2013

Updating my gcc...

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

@wiki1210 wait, I think gcc is ok. I think the problem is that your OS has 32bit architecture but I'm not sure if it's exact problem.

Owner

nashby commented May 27, 2013

@wiki1210 wait, I think gcc is ok. I think the problem is that your OS has 32bit architecture but I'm not sure if it's exact problem.

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

well :)
Updating gcc didn't help.

Yep, you are right...
viki@ubuntu:~$ uname -m
i686

wiki1210 commented May 27, 2013

well :)
Updating gcc didn't help.

Yep, you are right...
viki@ubuntu:~$ uname -m
i686

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

@wiki1210 I see. Well, we need to find a way how to handle it. Let me think about it a bit. For now, you can use older version without crc functions.

Owner

nashby commented May 27, 2013

@wiki1210 I see. Well, we need to find a way how to handle it. Let me think about it a bit. For now, you can use older version without crc functions.

@nashby nashby reopened this May 27, 2013

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 May 27, 2013

I'll install a new 64-bit ubuntu (FML!) tomorrow :(
Which version should I use meanwhile? 0.8.0 also fails.

Thanks a lot for your quick and helpful response!

wiki1210 commented May 27, 2013

I'll install a new 64-bit ubuntu (FML!) tomorrow :(
Which version should I use meanwhile? 0.8.0 also fails.

Thanks a lot for your quick and helpful response!

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

@wiki1210 I think 0.7.0 should work.

Owner

nashby commented May 27, 2013

@wiki1210 I think 0.7.0 should work.

@gsmetal

This comment has been minimized.

Show comment
Hide comment
@gsmetal

gsmetal May 27, 2013

I think the problem is that your OS has 32bit architecture but I'm not sure if it's exact problem.

But it works for me on 32bit Ubuntu 13.04.

gsmetal commented May 27, 2013

I think the problem is that your OS has 32bit architecture but I'm not sure if it's exact problem.

But it works for me on 32bit Ubuntu 13.04.

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 27, 2013

Owner

@gsmetal hmm... Any idea why it can fail?

Owner

nashby commented May 27, 2013

@gsmetal hmm... Any idea why it can fail?

@gsmetal

This comment has been minimized.

Show comment
Hide comment
@gsmetal

gsmetal May 27, 2013

@nashby No, sorry. But maybe try to compile from source without march=native?

gsmetal commented May 27, 2013

@nashby No, sorry. But maybe try to compile from source without march=native?

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby May 31, 2013

Owner

@wiki1210 any news on this one? Could you please try to clone this repo and change march=native to msse4.2 in extconf.rb and run rake install?

Owner

nashby commented May 31, 2013

@wiki1210 any news on this one? Could you please try to clone this repo and change march=native to msse4.2 in extconf.rb and run rake install?

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 Jun 2, 2013

Meanwhile I'm using 0.7.0, I'll try to clone and make the changes you wrote.
Will update.
Thanks.

wiki1210 commented Jun 2, 2013

Meanwhile I'm using 0.7.0, I'll try to clone and make the changes you wrote.
Will update.
Thanks.

@wiki1210

This comment has been minimized.

Show comment
Hide comment
@wiki1210

wiki1210 Jun 4, 2013

doesn't work :(

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/viki/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 

creating Makefile

make
compiling cityhash.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling city.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:394:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:400:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:405:5: error: ‘_mm_crc32_u64’ was not declared in this scope
make: *** [city.o] Error 1

wiki1210 commented Jun 4, 2013

doesn't work :(

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/viki/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 

creating Makefile

make
compiling cityhash.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
compiling city.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:394:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:400:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:405:5: error: ‘_mm_crc32_u64’ was not declared in this scope
make: *** [city.o] Error 1

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby Jun 23, 2013

Owner

@wiki1210 well, not sure what I can do with this. Maybe we should not support this CRC feature at all :(

Owner

nashby commented Jun 23, 2013

@wiki1210 well, not sure what I can do with this. Maybe we should not support this CRC feature at all :(

@noahsw

This comment has been minimized.

Show comment
Hide comment
@noahsw

noahsw Nov 7, 2013

I have a similar issue on Ubuntu 12.10. It's a Digital Ocean VM. Any ideas?

$ gem install cityhash

Fetching: cityhash-0.8.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing cityhash:
    ERROR: Failed to build gem native extension.

        /home/rails/.rbenv/versions/1.9.3-p448/bin/ruby extconf.rb
creating Makefile

make
compiling city.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
city.cc:1:0: error: CPU you selected does not support x86-64 instruction set
make: *** [city.o] Error 1


Gem files will remain installed in /home/rails/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/cityhash-0.8.1 for inspection.
Results logged to /home/rails/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/cityhash-0.8.1/ext/cityhash/gem_make.out
$ cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 2
model name  : QEMU Virtual CPU version 1.4.0
stepping    : 3
microcode   : 0x1
cpu MHz     : 2300.028
cache size  : 4096 KB
fpu     : yes
fpu_exception   : yes
cpuid level : 4
wp      : yes
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good nopl pni vmx cx16 popcnt hypervisor lahf_lm
bogomips    : 4600.05
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

noahsw commented Nov 7, 2013

I have a similar issue on Ubuntu 12.10. It's a Digital Ocean VM. Any ideas?

$ gem install cityhash

Fetching: cityhash-0.8.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing cityhash:
    ERROR: Failed to build gem native extension.

        /home/rails/.rbenv/versions/1.9.3-p448/bin/ruby extconf.rb
creating Makefile

make
compiling city.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
city.cc:1:0: error: CPU you selected does not support x86-64 instruction set
make: *** [city.o] Error 1


Gem files will remain installed in /home/rails/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/cityhash-0.8.1 for inspection.
Results logged to /home/rails/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/cityhash-0.8.1/ext/cityhash/gem_make.out
$ cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 2
model name  : QEMU Virtual CPU version 1.4.0
stepping    : 3
microcode   : 0x1
cpu MHz     : 2300.028
cache size  : 4096 KB
fpu     : yes
fpu_exception   : yes
cpuid level : 4
wp      : yes
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good nopl pni vmx cx16 popcnt hypervisor lahf_lm
bogomips    : 4600.05
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
@aaronchi

This comment has been minimized.

Show comment
Hide comment
@aaronchi

aaronchi Dec 3, 2013

I also get this on digitalocean

aaronchi commented Dec 3, 2013

I also get this on digitalocean

@taf2

This comment has been minimized.

Show comment
Hide comment
@taf2

taf2 Jan 9, 2014

also seeing this issue on digitalocean

taf2 commented Jan 9, 2014

also seeing this issue on digitalocean

@taf2

This comment has been minimized.

Show comment
Hide comment
@taf2

taf2 Jan 9, 2014

For anyone on digitalocean this work around fixed it for me:

diff --git a/ext/cityhash/extconf.rb b/ext/cityhash/extconf.rb
index 7e02749..daf94dd 100644
--- a/ext/cityhash/extconf.rb
+++ b/ext/cityhash/extconf.rb
@@ -2,7 +2,7 @@ require 'mkmf'

RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX']

-%w{g O3 Wall march=native}.each do |flag|
+%w{g O2 Wall}.each do |flag|
flag = "-#{flag}"
$CPPFLAGS += " #{flag}" unless $CPPFLAGS.split.include? flag
end

taf2 commented Jan 9, 2014

For anyone on digitalocean this work around fixed it for me:

diff --git a/ext/cityhash/extconf.rb b/ext/cityhash/extconf.rb
index 7e02749..daf94dd 100644
--- a/ext/cityhash/extconf.rb
+++ b/ext/cityhash/extconf.rb
@@ -2,7 +2,7 @@ require 'mkmf'

RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX']

-%w{g O3 Wall march=native}.each do |flag|
+%w{g O2 Wall}.each do |flag|
flag = "-#{flag}"
$CPPFLAGS += " #{flag}" unless $CPPFLAGS.split.include? flag
end

@noahsw

This comment has been minimized.

Show comment
Hide comment
@noahsw

noahsw Jan 18, 2014

Hi @taf2, looks like you're modifying extconf.rb. Do you suggest I fork this repo, make that change, and reference the forked repo in my gemspec?

noahsw commented Jan 18, 2014

Hi @taf2, looks like you're modifying extconf.rb. Do you suggest I fork this repo, make that change, and reference the forked repo in my gemspec?

@taf2

This comment has been minimized.

Show comment
Hide comment
@taf2

taf2 Jan 22, 2014

@noahsw - that could work yes 👍

taf2 commented Jan 22, 2014

@noahsw - that could work yes 👍

noahsw added a commit to noahsw/cityhash that referenced this issue Jan 23, 2014

@niedhui

This comment has been minimized.

Show comment
Hide comment
@niedhui

niedhui May 22, 2014

same issue on another vps , using the branch of @taf2, hope merge it to master 👍

niedhui commented May 22, 2014

same issue on another vps , using the branch of @taf2, hope merge it to master 👍

@glebm

This comment has been minimized.

Show comment
Hide comment
@glebm

glebm Jun 24, 2014

@noahsw branch with @taf2 patch still works on DigitalOcean, thanks! Though it uses O2 not O3.

glebm commented Jun 24, 2014

@noahsw branch with @taf2 patch still works on DigitalOcean, thanks! Though it uses O2 not O3.

byroot added a commit to byroot/cityhash that referenced this issue Aug 5, 2014

@kapilchoudhary

This comment has been minimized.

Show comment
Hide comment
@kapilchoudhary

kapilchoudhary Aug 5, 2015

@nashby I am getting same issue when installing this gem. I am using ubuntu 12.04.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/rails/.rvm/rubies/ruby-2.2.2/bin/ruby extconf.rb

creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling cityhash.cc
compiling city.cc
city.cc: In function ‘uint32 Hash32Len0to4(const char_, size_t)’:
city.cc:145:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:531:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:540:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:550:5: error: ‘mm_crc32_u64’ was not declared in this scope
make: *
* [city.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/rails/.rvm/gems/ruby-2.2.2@derek/gems/cityhash-0.8.1 for inspection.
Results logged to /home/rails/.rvm/gems/ruby-2.2.2@derek/extensions/x86-linux/2.2.0/cityhash-0.8.1/gem_make.out

kapilchoudhary commented Aug 5, 2015

@nashby I am getting same issue when installing this gem. I am using ubuntu 12.04.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/rails/.rvm/rubies/ruby-2.2.2/bin/ruby extconf.rb

creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling cityhash.cc
compiling city.cc
city.cc: In function ‘uint32 Hash32Len0to4(const char_, size_t)’:
city.cc:145:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:531:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:540:5: error: ‘_mm_crc32_u64’ was not declared in this scope
city.cc:550:5: error: ‘mm_crc32_u64’ was not declared in this scope
make: *
* [city.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/rails/.rvm/gems/ruby-2.2.2@derek/gems/cityhash-0.8.1 for inspection.
Results logged to /home/rails/.rvm/gems/ruby-2.2.2@derek/extensions/x86-linux/2.2.0/cityhash-0.8.1/gem_make.out

@vijaychouhan-rails

This comment has been minimized.

Show comment
Hide comment
@vijaychouhan-rails

vijaychouhan-rails Sep 11, 2015

I am also getting the same error while installing it using bundle install

Gemfile
gem "cityhash", "0.8.1"

gcc --version
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

OS
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty

Error trace
Using ffi 1.9.10
Using childprocess 0.5.6
Installing cityhash 0.8.1 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/rails/.rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20150911-25746-12dgsbl.rb extconf.rb

creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling city.cc
city.cc: In function ‘uint32 Hash32Len0to4(const char_, size_t)’:
city.cc:145:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < len; i++) {
^
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:524:31: error: ‘_mm_crc32_u64’ was not declared in this scope
z = _mm_crc32_u64(z, b + g);
^
city.cc:531:5: note: in expansion of macro ‘CHUNK’
CHUNK(0); PERMUTE3(a, h, c);
^
city.cc:524:31: error: ‘_mm_crc32_u64’ was not declared in this scope
z = _mm_crc32_u64(z, b + g);
^
city.cc:540:5: note: in expansion of macro ‘CHUNK’
CHUNK(29);
^
city.cc:524:31: error: ‘_mm_crc32_u64’ was not declared in this scope
z = mm_crc32_u64(z, b + g);
^
city.cc:550:5: note: in expansion of macro ‘CHUNK’
CHUNK(33);
^
make: *
* [city.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/rails/.rvm/gems/ruby-2.2.2@lexspot/gems/cityhash-0.8.1 for inspection.
Results logged to /home/rails/.rvm/gems/ruby-2.2.2@lexspot/extensions/x86-linux/2.2.0/cityhash-0.8.1/gem_make.out
An error occurred while installing cityhash (0.8.1), and Bundler cannot continue.
Make sure that gem install cityhash -v '0.8.1' succeeds before bundling.

vijaychouhan-rails commented Sep 11, 2015

I am also getting the same error while installing it using bundle install

Gemfile
gem "cityhash", "0.8.1"

gcc --version
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

OS
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty

Error trace
Using ffi 1.9.10
Using childprocess 0.5.6
Installing cityhash 0.8.1 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/rails/.rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20150911-25746-12dgsbl.rb extconf.rb

creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling city.cc
city.cc: In function ‘uint32 Hash32Len0to4(const char_, size_t)’:
city.cc:145:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < len; i++) {
^
city.cc: In function ‘void CityHashCrc256Long(const char_, size_t, uint32, uint64_)’:
city.cc:524:31: error: ‘_mm_crc32_u64’ was not declared in this scope
z = _mm_crc32_u64(z, b + g);
^
city.cc:531:5: note: in expansion of macro ‘CHUNK’
CHUNK(0); PERMUTE3(a, h, c);
^
city.cc:524:31: error: ‘_mm_crc32_u64’ was not declared in this scope
z = _mm_crc32_u64(z, b + g);
^
city.cc:540:5: note: in expansion of macro ‘CHUNK’
CHUNK(29);
^
city.cc:524:31: error: ‘_mm_crc32_u64’ was not declared in this scope
z = mm_crc32_u64(z, b + g);
^
city.cc:550:5: note: in expansion of macro ‘CHUNK’
CHUNK(33);
^
make: *
* [city.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/rails/.rvm/gems/ruby-2.2.2@lexspot/gems/cityhash-0.8.1 for inspection.
Results logged to /home/rails/.rvm/gems/ruby-2.2.2@lexspot/extensions/x86-linux/2.2.0/cityhash-0.8.1/gem_make.out
An error occurred while installing cityhash (0.8.1), and Bundler cannot continue.
Make sure that gem install cityhash -v '0.8.1' succeeds before bundling.

@ejholmes

This comment has been minimized.

Show comment
Hide comment
@ejholmes

ejholmes Sep 20, 2017

FWIW, we also ran into this issue on AWS. We were compiling cityhash within a docker build on C4 instances. When we went to run the image on a C3 instance, the Ruby VM crashed with:

/usr/local/bundle/gems/cityhash-0.8.1/lib/cityhash.rb:11: [BUG] Illegal instruction at 0x007fee4cc25764

Removing -march=native fixes the issue: remind101@915151c.

I'm not sure if this gem is still maintained, but I would suggest that the default CFLAGS don't include -march=native so that bundled gems are more portable across machines.

ejholmes commented Sep 20, 2017

FWIW, we also ran into this issue on AWS. We were compiling cityhash within a docker build on C4 instances. When we went to run the image on a C3 instance, the Ruby VM crashed with:

/usr/local/bundle/gems/cityhash-0.8.1/lib/cityhash.rb:11: [BUG] Illegal instruction at 0x007fee4cc25764

Removing -march=native fixes the issue: remind101@915151c.

I'm not sure if this gem is still maintained, but I would suggest that the default CFLAGS don't include -march=native so that bundled gems are more portable across machines.

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby Sep 20, 2017

Owner

@ejholmes thanks for following up. I just merged PR that removed default -march=native. But obviously CRC methods wont work on instances without sse4. Any suggestion how we should handle it? (As you can see master branch is failing on travis because of it)

Owner

nashby commented Sep 20, 2017

@ejholmes thanks for following up. I just merged PR that removed default -march=native. But obviously CRC methods wont work on instances without sse4. Any suggestion how we should handle it? (As you can see master branch is failing on travis because of it)

@ejholmes

This comment has been minimized.

Show comment
Hide comment
@ejholmes

ejholmes Sep 20, 2017

@nashby good question! We don't actually use the CRC methods, so I never noticed https://github.com/nashby/cityhash/blob/master/ext/cityhash/city.cc#L514 before.

Maybe instead of removing -march=native, there could be any easier way to remove it via --with-cppflags (I couldn't see a way to get around the previous logic to remove it from CPPFLAGS without actually altering extconf.rb).

ejholmes commented Sep 20, 2017

@nashby good question! We don't actually use the CRC methods, so I never noticed https://github.com/nashby/cityhash/blob/master/ext/cityhash/city.cc#L514 before.

Maybe instead of removing -march=native, there could be any easier way to remove it via --with-cppflags (I couldn't see a way to get around the previous logic to remove it from CPPFLAGS without actually altering extconf.rb).

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby Oct 11, 2017

Owner

Hey guys! Yeah, it's been 5 years already, sorry. I just released 0.9.0 version that should compile without CRC methods. Please give it a try!

Owner

nashby commented Oct 11, 2017

Hey guys! Yeah, it's been 5 years already, sorry. I just released 0.9.0 version that should compile without CRC methods. Please give it a try!

@nashby nashby closed this Oct 11, 2017

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