luikore / triez

fast, efficient, unicode aware HAT trie with prefix / suffix support for Ruby
MIT License
140 stars 9 forks source link

compile error with gem ins #9

Closed 444thLiao closed 3 years ago

444thLiao commented 4 years ago
Building native extensions. This could take a while...
ERROR:  Error installing triez:
        ERROR: Failed to build gem native extension.

    current directory: /share/home-user/thliao/anaconda3/lib/ruby/gems/2.5.0/gems/triez-1.0.6/ext
/share/home-user/thliao/anaconda3/bin/ruby -r ./siteconf20200314-153298-qt45sp.rb extconf.rb
creating Makefile

current directory: /share/home-user/thliao/anaconda3/lib/ruby/gems/2.5.0/gems/triez-1.0.6/ext
make "DESTDIR=" clean

current directory: /share/home-user/thliao/anaconda3/lib/ruby/gems/2.5.0/gems/triez-1.0.6/ext
make "DESTDIR="
compiling triez.cc
g++: error: unrecognized command line option ‘-Wimplicit-fallthrough=0’; did you mean ‘-Wno-fallthrough’?
g++: error: unrecognized command line option ‘-Wrestrict’
make: *** [Makefile:210: triez.o] Error 1

make failed, exit code 2

Gem files will remain installed in /share/home-user/thliao/anaconda3/lib/ruby/gems/2.5.0/gems/triez-1.0.6 for inspection.
Results logged to /share/home-user/thliao/anaconda3/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0/triez-1.0.6/gem_make.out

I think it cause by the wrong version of gcc? So could you clarify the exact version of gcc at your envionment?

luikore commented 4 years ago

Those compile options are from the Ruby pre-compiled by anaconda.

Maybe you can try with Ruby from apt or rvm?