bahamas10 / chef-standalone

Build a standalone Chef installation on SmartOS - useful while omnibus is broken for this OS
http://us-east.manta.joyent.com/bahamas10/public/chef-standalone/index.html
3 stars 1 forks source link

can't do a `chef_gem` install of the `dynect_rest` gem #4

Open bixu opened 9 years ago

bixu commented 9 years ago

After installing latest chef-standalone bundle, I see this error when trying to install the Dynect gem:

 ================================================================================
    Error executing action `install` on resource 'chef_gem[dynect_rest]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of /opt/chef/bin/gem install dynect_rest -q --no-rdoc --no-ri -v "0.4.6" ----
    STDOUT: Successfully installed netrc-0.10.3
    Building native extensions.  This could take a while...
    STDERR: ERROR:  Error installing dynect_rest:
     ERROR: Failed to build gem native extension.

        /opt/chef/bin/ruby -r ./siteconf20150730-39905-32y35h.rb extconf.rb
    checking for main() in -lstdc++... yes
    creating Makefile

    make "DESTDIR=" clean

    make "DESTDIR="
    compiling unf.cc
    In file included from /opt/chef/include/ruby-2.2.0/ruby/defines.h:68:0,
                     from /opt/chef/include/ruby-2.2.0/ruby/ruby.h:29,
                     from /opt/chef/include/ruby-2.2.0/ruby.h:33,
                     from unf.cc:3:
    /opt/chef/include/ruby-2.2.0/ruby/missing.h:222:17: error: expected unqualified-id before '__extension__'
    /opt/chef/include/ruby-2.2.0/ruby/missing.h:222:17: error: expected unqualified-id before ')' token
    Makefile:205: recipe for target 'unf.o' failed
    make: *** [unf.o] Error 1

    make failed, exit code 2

    Gem files will remain installed in /opt/chef/lib/ruby/gems/2.2.0/gems/unf_ext-0.0.7.1 for inspection.
    Results logged to /opt/chef/lib/ruby/gems/2.2.0/extensions/x86_64-solaris-2.11/2.2.0/unf_ext-0.0.7.1/gem_make.out
    ---- End output of /opt/chef/bin/gem install dynect_rest -q --no-rdoc --no-ri -v "0.4.6" ----
    Ran /opt/chef/bin/gem install dynect_rest -q --no-rdoc --no-ri -v "0.4.6" returned 1

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/dynect/recipes/default.rb:21:in `from_file'
    /var/chef/cache/cookbooks/yetu/recipes/dynect_dns.rb:8:in `from_file'
    /var/chef/cache/cookbooks/yetu/recipes/default.rb:22:in `from_file'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/dynect/recipes/default.rb

     21: chef_gem "dynect_rest" do
     22:   action :install
     23: end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/dynect/recipes/default.rb:21:in `from_file'

    chef_gem("dynect_rest") do
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      package_name "dynect_rest"
      version "0.4.6"
      gem_binary "/opt/chef/bin/gem"
      declared_type :chef_gem
      cookbook_name "dynect"
      recipe_name "default"
    end

  ================================================================================
  Recipe Compile Error in /var/chef/cache/cookbooks/yetu/recipes/default.rb
  ================================================================================

  Mixlib::ShellOut::ShellCommandFailed
  ------------------------------------
  chef_gem[dynect_rest] (dynect::default line 21) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
  ---- Begin output of /opt/chef/bin/gem install dynect_rest -q --no-rdoc --no-ri -v "0.4.6" ----
  STDOUT: Successfully installed netrc-0.10.3
  Building native extensions.  This could take a while...
  STDERR: ERROR:  Error installing dynect_rest:
     ERROR: Failed to build gem native extension.

      /opt/chef/bin/ruby -r ./siteconf20150730-39905-32y35h.rb extconf.rb
  checking for main() in -lstdc++... yes
  creating Makefile

  make "DESTDIR=" clean

  make "DESTDIR="
  compiling unf.cc
  In file included from /opt/chef/include/ruby-2.2.0/ruby/defines.h:68:0,
                   from /opt/chef/include/ruby-2.2.0/ruby/ruby.h:29,
                   from /opt/chef/include/ruby-2.2.0/ruby.h:33,
                   from unf.cc:3:
  /opt/chef/include/ruby-2.2.0/ruby/missing.h:222:17: error: expected unqualified-id before '__extension__'
  /opt/chef/include/ruby-2.2.0/ruby/missing.h:222:17: error: expected unqualified-id before ')' token
  Makefile:205: recipe for target 'unf.o' failed
  make: *** [unf.o] Error 1

  make failed, exit code 2

  Gem files will remain installed in /opt/chef/lib/ruby/gems/2.2.0/gems/unf_ext-0.0.7.1 for inspection.
  Results logged to /opt/chef/lib/ruby/gems/2.2.0/extensions/x86_64-solaris-2.11/2.2.0/unf_ext-0.0.7.1/gem_make.out
  ---- End output of /opt/chef/bin/gem install dynect_rest -q --no-rdoc --no-ri -v "0.4.6" ----
  Ran /opt/chef/bin/gem install dynect_rest -q --no-rdoc --no-ri -v "0.4.6" returned 1

  Cookbook Trace:
  ---------------
    /var/chef/cache/cookbooks/dynect/recipes/default.rb:21:in `from_file'
    /var/chef/cache/cookbooks/yetu/recipes/dynect_dns.rb:8:in `from_file'
    /var/chef/cache/cookbooks/yetu/recipes/default.rb:22:in `from_file'

  Relevant File Content:
  ----------------------
  /var/chef/cache/cookbooks/dynect/recipes/default.rb:

   14:  # distributed under the License is distributed on an "AS IS" BASIS,
   15:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   16:  # See the License for the specific language governing permissions and
   17:  # limitations under the License.
   18:  #
   19:
   20:  # Install dynect gem for usage within Chef runs
   21>> chef_gem "dynect_rest" do
   22:    action :install
   23:  end
   24:

  Running handlers:
  Running handlers complete
  Chef Client failed. 0 resources updated in 27.028254299 seconds
bahamas10 commented 9 years ago

sorry for the late reply, github didn't send me an email for this!!

I'll attempt to build this this weekend and see what I can find. My initial hypothesis is that ruby was built (by this script) in such a way where it is incompatible with whatever dynect is trying to compile.

I'll update this with my findings.