atheiman / better-chef-rundeck

A Sinatra app for integrating Chef and Rundeck
MIT License
13 stars 8 forks source link

Can't compile with Chef 13 #24

Closed rnt closed 6 years ago

rnt commented 7 years ago

Hi!

I'm try to compile better-chef-rundeck with Chef 13... and don't work. With Chef 13 the same cookbook recipe, install better-chef-rundeck without any problem.

The output:

       ---- Begin output of /opt/chef/embedded/bin/bundle install --deployment --without development test ----
       STDOUT: `/root` is not writable.
       Bundler will use `/tmp/bundler/home/vagrant' as your home directory temporarily.
       Fetching gem metadata from https://rubygems.org/..........
       Fetching version metadata from https://rubygems.org/...
       Fetching dependency metadata from https://rubygems.org/..
       Installing rake 11.2.2
       Installing builder 3.2.2
       Using bundler 1.14.6
       Installing fuzzyurl 0.8.0
       Installing mixlib-config 2.2.1
       Installing mixlib-shellout 2.2.6
       Installing libyajl2 1.2.0 with native extensions
       Installing hashie 3.4.4
       Installing mixlib-log 1.6.0
       Installing rack 1.6.4
       Installing uuidtools 2.1.5
       Installing diff-lcs 1.2.5
       Installing erubis 2.7.0
       Installing highline 1.7.8
       Installing iniparse 1.4.2
       Installing mixlib-cli 1.6.0
       Installing net-ssh 3.1.1
       Installing ffi 1.9.10 with native extensions
       Installing ipaddress 0.8.3
       Installing plist 3.2.0
       Installing systemu 2.6.5
       Installing wmi-lite 1.0.0
       Installing proxifier 1.0.3
       Installing rspec-support 3.4.1
       Installing multi_json 1.12.1
       Installing net-telnet 0.1.1
       Installing sfl 2.2
       Installing syslog-logger 1.6.8
       Installing tilt 2.0.5
       Installing chef-config 12.11.18
       Installing ffi-yajl 2.2.3 with native extensions
       Installing mixlib-authentication 1.4.1
       Installing passenger 5.0.28 with native extensions
       Installing rack-protection 1.5.3
       Installing net-sftp 2.1.2
       Installing net-ssh-gateway 1.2.0
       Installing net-scp 1.2.1
       Installing rspec-core 3.4.4
       Installing rspec-expectations 3.4.0
       Installing rspec-mocks 3.4.1
       Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

       current directory:
       /opt/plugins/better-chef-rundeck/vendor/bundle/ruby/2.4.0/gems/ffi-yajl-2.2.3/ext/ffi_yajl/ext/encoder
       /opt/chef/embedded/bin/ruby -r ./siteconf20170612-5176-1vgdplc.rb extconf.rb
       -I/opt/plugins/better-chef-rundeck/vendor/bundle/ruby/2.4.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/include
       -I/opt/chef/embedded/include -O2 -O3 -g -pipe -fPIC
       -L/opt/plugins/better-chef-rundeck/vendor/bundle/ruby/2.4.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/lib
       -L. -Wl,-rpath,/opt/chef/embedded/lib -fstack-protector -L/opt/chef/embedded/lib
       -rdynamic -Wl,-export-dynamic -L/opt/chef/embedded/lib 
       -Wl,-R/opt/chef/embedded/lib
       checking for yajl/yajl_tree.h... yes
       creating Makefile

       current directory:
       /opt/plugins/better-chef-rundeck/vendor/bundle/ruby/2.4.0/gems/ffi-yajl-2.2.3/ext/ffi_yajl/ext/encoder
       make "DESTDIR=" clean

       current directory:
       /opt/plugins/better-chef-rundeck/vendor/bundle/ruby/2.4.0/gems/ffi-yajl-2.2.3/ext/ffi_yajl/ext/encoder
       make "DESTDIR="
       compiling encoder.c
       encoder.c: In function ‘Init_encoder’:
       encoder.c:380:20: error: ‘rb_cFixnum’ undeclared (first use in this function)
          rb_define_method(rb_cFixnum, "ffi_yajl", rb_cFixnum_ffi_yajl, 2);
                    ^
       encoder.c:380:20: note: each undeclared identifier is reported only once for
       each function it appears in
       encoder.c:381:20: error: ‘rb_cBignum’ undeclared (first use in this function)
          rb_define_method(rb_cBignum, "ffi_yajl", rb_cBignum_ffi_yajl, 2);
                    ^
       make: *** [encoder.o] Error 1

       make failed, exit code 2

       Gem files will remain installed in
       /opt/plugins/better-chef-rundeck/vendor/bundle/ruby/2.4.0/gems/ffi-yajl-2.2.3
       for inspection.
       Results logged to
       /opt/plugins/better-chef-rundeck/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/ffi-yajl-2.2.3/gem_make.out

       An error occurred while installing ffi-yajl (2.2.3), and Bundler cannot
       continue.
       Make sure that `gem install ffi-yajl -v '2.2.3'` succeeds before bundling.
       STDERR: 
       ---- End output of /opt/chef/embedded/bin/bundle install --deployment --without development test ----
       Ran /opt/chef/embedded/bin/bundle install --deployment --without development test returned 5
       [2017-06-12T13:36:12+00:00] ERROR: execute[bundle_install] (fif_rundeck::chef_rundeck line 35) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '5'
ev0ldave commented 7 years ago

@rnt I was able to build this with chef 13.0 and sinatra 2.0 in the Gemfile. It looks like you are hitting a compile issue with ffi-yajl using ruby 2.4.0 and not BCR (better-chef-rundeck)

atheiman commented 7 years ago

would be happy to see a pr to test ruby 2.4 and chef 13