I'm getting an error installing syck on Ubuntu 15.04. Building the native extensions fails:
Installing syck 1.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/markus/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150618-8242-1z0c5iw.rb extconf.rb
checking for st.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bytecode.c
compiling implicit.c
compiling token.c
token.re: In function ‘sycklex_yaml_utf8’:
token.re:541:36: warning: variable ‘lvl’ set but not used [-Wunused-but-set-variable]
compiling rubyext.c
rubyext.c:31:20: error: field ‘hash’ has incomplete type
struct RHash hash;
^
rubyext.c: In function ‘syck_seq_initialize’:
rubyext.c:1529:15: warning: variable ‘node’ set but not used [-Wunused-but-set-variable]
SyckNode *node;
^
Makefile:237: recipe for target 'rubyext.o' failed
make: *** [rubyext.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/markus/.rvm/gems/ruby-2.2.1#mygemset/gems/syck-1.0.1 for inspection.
Results logged to /home/markus/.rvm/gems/ruby-2.2.1#mygemset/extensions/x86_64-linux/2.2.0/syck-1.0.1/gem_make.out
An error occurred while installing syck (1.0.1), and Bundler cannot continue.
Make sure that `gem install syck -v '1.0.1'` succeeds before bundling.
Does someone have an idea what the issue is and how to fix it?
Related
My food critic gem installation is failing with the below error
Following gems were not installed:
foodcritic (3.0.3): Error installing foodcritic
ERROR: Failed to build gem native extension. current directory
/Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0/ext/yajl
/Users/dmanna/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf/20180729-63637-1dtcegj.rb.extconf.rb creating Makefile current
directory: /Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0/ext/yajl make "DESTDIR=" clean current
directory: /Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0/ext/yajl make "DESTDIR=" compiling
yajl.c compiling yajl_alloc.c compiling yajl_buf.c compiling yajl_encode.c compiling yajl_ext.c yajl_ext.c:852:22 error: use of undeclared identifier 'rb_cFixnum' rb_define_method(rb_cFixnum, "to_json", rb_yajl_json_ext_fixnum_to_json, -1); ^ 1 error generated.
make: *** [yajl_ext.o] Error 1 make failed, exit code 2 Gem files remain installed in
/Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0 for inspection. Results logged to
/Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/yajl-ruby-1.1.0/gem_make.out
Output of gem_make.out
current directory: /Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0/ext/yajl
/Users/dmanna/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20180729-63637-1dtcegj.rb extconf.rb
creating Makefile
current directory: /Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0/ext/yajl
make "DESTDIR=" clean
current directory: /Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0/ext/yajl
make "DESTDIR="
compiling yajl.c
compiling yajl_alloc.c
compiling yajl_buf.c
compiling yajl_encode.c
compiling yajl_ext.c
yajl_ext.c:852:22: error: use of undeclared identifier 'rb_cFixnum'
rb_define_method(rb_cFixnum, "to_json", rb_yajl_json_ext_fixnum_to_json, -1);
^
1 error generated.
make: *** [yajl_ext.o] Error 1
make failed, exit code 2
rbenv version - 2.5.1 OS
Mac 10.13.6
I am new to ruby. I am getting this error when trying to import a project in RubyMine and installing the gems.
Can someone let me know what is going wrong and how can I get around this?
Foodcritic 3.0.3 is from 2013. See here:
https://rubygems.org/gems/foodcritic/versions/3.0.3
Unfortunately it is not compatible with the latest version of Ruby. Your choices are to either downgrade Ruby to something less than 2.4, maybe even as low as 1.9 to be sure of compatibility, or upgrade foodcritic to its latest version (14.0.0).
I've been trying to install msgpack using homebrew, and it repeatedly throw the following error:
Building native extensions. This could take a while...
ERROR: Error installing msgpack:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.4.0/gems/msgpack
0.5.8/ext/msgpack
/usr/local/opt/ruby/bin/ruby -r ./siteconf20170801-23901-1ar0ojr.rb extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
creating Makefile
current directory: /usr/local/lib/ruby/gems/2.4.0/gems/msgpack-
0.5.8/ext/msgpack
make "DESTDIR=" clean
current directory: /usr/local/lib/ruby/gems/2.4.0/gems/msgpack-
0.5.8/ext/msgpack
make "DESTDIR="
compiling buffer.c
compiling buffer_class.c
compiling core_ext.c
core_ext.c:121:22: error: use of undeclared identifier 'rb_cFixnum'
rb_define_method(rb_cFixnum, "to_msgpack", Fixnum_to_msgpack, -1);
^
core_ext.c:122:22: error: use of undeclared identifier 'rb_cBignum'
rb_define_method(rb_cBignum, "to_msgpack", Bignum_to_msgpack, -1);
^
2 errors generated.
make: *** [core_ext.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/usr/local/lib/ruby/gems/2.4.0/gems/msgpack-0.5.8 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-
16/2.4.0/msgpack-0.5.8/gem_make.out
Searching for the solution to this has been unfruitful. My Ruby version is 2.4.1, but I'm not sure if it's a version issue.
I found this issue in msgpack repository in Github:
https://github.com/msgpack/msgpack-ruby/issues/120
Looks like this issue was resolved in version 1.0.0.
Do you really need to use the version 0.5.8? Is it possible to update the gem version?
When I run bundle install, it fails when it try to install ffi gem with native extension. I get this error
Installing ffi 1.8.1 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby21-x64/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile
make "DESTDIR="
generating ffi_c-x64-mingw32.def
Configuring libffi
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
configure: WARNING: cache variable lt_cv_path_LD contains a newline
configure: WARNING: cache variable lt_cv_path_LD contains a newline
make -C "/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32"
make[1]: Entering directory `/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32'
Makefile:318: *** missing separator. Stop.
make[1]: Leaving directory `/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32'
make: *** ["/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32"/.libs/libffi_convenience.a] Error 2
Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/gem_make.out
An error occurred while installing ffi (1.8.1), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.8.1'` succeeds before bundling.
I am on windows 7 with ruby 2.1.7 and rails 3.2. I have found different solution like updating system gems and downgrading ffi version but none of them is working for me. How can I solve this problem?
I have an error message while running sudo bundle install:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
Then I tried to run sudo gem install bcrypt -v '3.1.7' and have below error message:
Building native extensions. This could take a while...
ERROR: Error installing bcrypt:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
After this, I try to run sudo gem install bcrypt, still not working. Any tips?
I had upgraded Xcode from the Mac App Store, and that caused this particular error for me.
The way to fix it in my case: run Xcode and accept the license terms, etc. Then when I ran bundle install, it compiled and installed bcrypt just fine.
I am unable to install the bson_ext 1.8.2 gem in my mongo project directory.
In specific I tried running bundle install and gem install bson_ext -v '1.8.2'
I tried other solutions present on the forum but in vain.
Installing bson_ext (1.8.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/jayanth/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
checking for asprintf()... yes
checking for ruby/st.h... yes
checking for ruby/regex.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make
compiling bson_buffer.c
compiling encoding_helpers.c
compiling cbson.c
cbson.c: In function ‘write_utf8’:
cbson.c:118:36: warning: pointer targets in passing argument 1 of ‘check_string’ differ in signedness [-Wpointer-sign]
In file included from cbson.c:66:0:
encoding_helpers.h:26:10: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
cbson.c: In function ‘write_element’:
cbson.c:301:20: warning: unused variable ‘values’ [-Wunused-variable]
cbson.c: In function ‘objectid_generate’:
cbson.c:936:9: warning: implicit declaration of function ‘htonl’ [-Wimplicit-function-declaration]
cbson.c:944:5: warning: implicit declaration of function ‘htons’ [-Wimplicit-function-declaration]
cbson.c: In function ‘write_element’:
cbson.c:316:17: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
linking shared-object bson_ext/cbson.so
make install
/usr/bin/install -c -m 0755 cbson.so /home/jayanth/.rvm/gems/ruby-2.0.0-p0#mongo-tools/gems/bson_ext-1.8.2/ext/bson_ext/bson_ext
/usr/bin/install: cannot create regular file `/home/jayanth/.rvm/gems/ruby-2.0.0-p0#mongo-tools/gems/bson_ext-1.8.2/ext/bson_ext/bson_ext': No such file or directory
make: *** [install-so] Error 1
Gem files will remain installed in /home/jayanth/.rvm/gems/ruby-2.0.0-p0#mongo-tools/gems/bson_ext-1.8.2 for inspection.
Results logged to /home/jayanth/.rvm/gems/ruby-2.0.0-p0#mongo-tools/gems/bson_ext-1.8.2/ext/cbson/gem_make.out
An error occurred while installing bson_ext (1.8.2), and Bundler cannot continue.
Make sure that `gem install bson_ext -v '1.8.2'` succeeds before bundling.
gem install bson_ext -v '1.8.2 fails with the same error.
The solution here(https://jira.mongodb.org/browse/RUBY-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel) says its fixed....but i still face the same
Try updating rubygems and then installing bson_ext.
gem update --system
gem install bson_ext
I use ruby 2.0.0p0
When I installed bson-1.9.2.gem I got this error:
ERROR: Error installing bson_ext:
ERROR: Failed to build gem native extension.
/home/albert/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
The following worked for me:
gem update --system
gem install bson_ext