chef / effortless

Automated best practices for Chef Infra and Chef InSpec
https://chef.io
Apache License 2.0
33 stars 38 forks source link

Effortless packages fail to build on Linux with Chef Infra 17 release due to Ruby dependency #274

Closed collinmcneese closed 3 years ago

collinmcneese commented 3 years ago

Description

Effortless packages fail to build on Linux with Chef Infra 17 release due to Ruby dependency. scaffolding-chef-infra has a dependency of core/ruby27 which is causing issues when the scaffolding attempts to install the chef-cli gem.

Scaffolding Version

0.22.0

Platform Version

Linux

Replication Case

Build or Run Output

[7][default:/src:0]# build habitat
   : Loading /src/habitat/plan.sh
   effortless_config_example: Plan loaded
   effortless_config_example: Validating plan metadata
   effortless_config_example: Using HAB_BIN=/hab/pkgs/core/hab/1.6.288/20210402191717/bin/hab for installs, signing, and hashing
   effortless_config_example: hab-plan-build setup
   effortless_config_example: Writing pre_build file
   effortless_config_example: Resolving scaffolding dependencies
» Installing chef/scaffolding-chef-infra
☁ Determining latest version of chef/scaffolding-chef-infra in the 'stable' channel
→ Using chef/scaffolding-chef-infra/0.22.1/20210217161644
★ Install of chef/scaffolding-chef-infra/0.22.1/20210217161644 complete with 0 new packages installed.
   effortless_config_example: Resolved scaffolding dependency 'chef/scaffolding-chef-infra' to /hab/pkgs/chef/scaffolding-chef-infra/0.22.1/20210217161644
   effortless_config_example: Loading Scaffolding /hab/pkgs/chef/scaffolding-chef-infra/0.22.1/20210217161644/lib/scaffolding.sh
   effortless_config_example: Resolving build dependencies
» Installing chef/scaffolding-chef-infra
☁ Determining latest version of chef/scaffolding-chef-infra in the 'stable' channel
→ Using chef/scaffolding-chef-infra/0.22.1/20210217161644
★ Install of chef/scaffolding-chef-infra/0.22.1/20210217161644 complete with 0 new packages installed.
   effortless_config_example: Resolved build dependency 'chef/scaffolding-chef-infra' to /hab/pkgs/chef/scaffolding-chef-infra/0.22.1/20210217161644
» Installing core/git/2.26.2/20200601121014
→ Using core/git/2.26.2/20200601121014
★ Install of core/git/2.26.2/20200601121014 complete with 0 new packages installed.
   effortless_config_example: Resolved build dependency 'core/git/2.26.2/20200601121014' to /hab/pkgs/core/git/2.26.2/20200601121014
» Installing core/ruby27/2.7.0/20200404045319
→ Using core/ruby27/2.7.0/20200404045319
★ Install of core/ruby27/2.7.0/20200404045319 complete with 0 new packages installed.
   effortless_config_example: Resolved build dependency 'core/ruby27/2.7.0/20200404045319' to /hab/pkgs/core/ruby27/2.7.0/20200404045319
» Installing core/make/4.2.1/20200306002515
→ Using core/make/4.2.1/20200306002515
★ Install of core/make/4.2.1/20200306002515 complete with 0 new packages installed.
   effortless_config_example: Resolved build dependency 'core/make/4.2.1/20200306002515' to /hab/pkgs/core/make/4.2.1/20200306002515
» Installing core/gcc/9.1.0/20200305180723
→ Using core/gcc/9.1.0/20200305180723
★ Install of core/gcc/9.1.0/20200305180723 complete with 0 new packages installed.
   effortless_config_example: Resolved build dependency 'core/gcc/9.1.0/20200305180723' to /hab/pkgs/core/gcc/9.1.0/20200305180723
» Installing core/git
☁ Determining latest version of core/git in the 'stable' channel
→ Using core/git/2.26.2/20200601121014
★ Install of core/git/2.26.2/20200601121014 complete with 0 new packages installed.
   effortless_config_example: Resolved build dependency 'core/git' to /hab/pkgs/core/git/2.26.2/20200601121014
   effortless_config_example: Resolving run dependencies
» Installing chef/chef-infra-client
☁ Determining latest version of chef/chef-infra-client in the 'stable' channel
→ Using chef/chef-infra-client/17.0.242/20210427031645
★ Install of chef/chef-infra-client/17.0.242/20210427031645 complete with 0 new packages installed.
   effortless_config_example: Resolved dependency 'chef/chef-infra-client' to /hab/pkgs/chef/chef-infra-client/17.0.242/20210427031645
» Installing core/cacerts
☁ Determining latest version of core/cacerts in the 'stable' channel
→ Using core/cacerts/2020.01.01/20200306005234
★ Install of core/cacerts/2020.01.01/20200306005234 complete with 0 new packages installed.
   effortless_config_example: Resolved dependency 'core/cacerts' to /hab/pkgs/core/cacerts/2020.01.01/20200306005234
   effortless_config_example: Setting up environment
   effortless_config_example: Populating runtime environment from dependencies
   effortless_config_example: Populating buildtime environment from dependencies
   effortless_config_example: Layering runtime environment on top of system environment
   effortless_config_example: Layering buildtime environment on top of system environment
   effortless_config_example: Setting PATH=/hab/pkgs/chef/scaffolding-chef-infra/0.22.1/20210217161644/vendor/bin:/hab/pkgs/core/git/2.26.2/20200601121014/bin:/hab/pkgs/core/ruby27/2.7.0/20200404045319/bin:/hab/pkgs/core/make/4.2.1/20200306002515/bin:/hab/pkgs/core/gcc/9.1.0/20200305180723/bin:/hab/pkgs/chef/chef-infra-client/17.0.242/20210427031645/bin:/hab/pkgs/chef/chef-infra-client/17.0.242/20210427031645/vendor/bin:/hab/pkgs/core/grep/3.3/20200305232635/bin:/hab/pkgs/core/libtool/2.4.6/20200305233901/bin:/hab/pkgs/core/binutils/2.32/20200305174809/bin:/hab/pkgs/core/acl/2.2.53/20200305230628/bin:/hab/pkgs/core/attr/2.4.48/20200305230504/bin:/hab/pkgs/core/bzip2/1.0.8/20200305225842/bin:/hab/pkgs/core/coreutils/8.30/20200305231640/bin:/hab/pkgs/core/curl/7.68.0/20200601114640/bin:/hab/pkgs/core/db/5.3.28/20200305234355/bin:/hab/pkgs/core/expat/2.2.7/20200305234221/bin:/hab/pkgs/core/gdbm/1.18.1/20200305234038/bin:/hab/pkgs/core/gettext/0.20.1/20200306001518/bin:/hab/pkgs/core/glibc/2.29/20200305172459/bin:/hab/pkgs/core/less/530/20200305235121/bin:/hab/pkgs/core/libcap/2.27/20200305230759/bin:/hab/pkgs/core/ncurses/6.1/20200305230210/bin:/hab/pkgs/core/openssh/7.5p1/20200319192011/bin:/hab/pkgs/core/openssh/7.5p1/20200319192011/sbin:/hab/pkgs/core/openssh/7.5p1/20200319192011/libexec:/hab/pkgs/core/openssl-fips/2.0.16/20200306005307/bin:/hab/pkgs/core/openssl/1.0.2t/20200306005450/bin:/hab/pkgs/core/pcre/8.42/20200305232429/bin:/hab/pkgs/core/perl/5.30.0/20200305235250/bin:/hab/pkgs/core/sed/4.5/20200305230928/bin:/hab/pkgs/core/xz/5.2.4/20200306001321/bin:/hab/pkgs/core/ruby30/3.0.1/20210422195921/bin:/hab/pkgs/core/libxslt/1.1.34/20200404024142/bin:/hab/pkgs/core/libxml2/2.9.10/20200319193941/bin:/hab/pkgs/core/hab-plan-build/1.6.288/20210402194206/bin:/hab/pkgs/core/bash/5.0.16/20200305233030/bin:/hab/pkgs/core/binutils/2.32/20200305174809/bin:/hab/pkgs/core/coreutils/8.30/20200305231640/bin:/hab/pkgs/core/file/5.37/20200305174635/bin:/hab/pkgs/core/findutils/4.6.0/20200306000932/bin:/hab/pkgs/core/gawk/5.0.1/20200305233704/bin:/hab/pkgs/core/grep/3.3/20200305232635/bin:/hab/pkgs/core/gzip/1.10/20200306002325/bin:/hab/pkgs/core/hab/1.6.288/20210402191717/bin:/hab/pkgs/core/rq/0.10.4/20200306011144/bin:/hab/pkgs/core/sed/4.5/20200305230928/bin:/hab/pkgs/core/tar/1.32/20200305233447/bin:/hab/pkgs/core/unzip/6.0/20200306011037/bin:/hab/pkgs/core/wget/1.19.5/20200306010801/bin:/hab/pkgs/core/xz/5.2.4/20200306001321/bin:/hab/pkgs/core/libcap/2.27/20200305230759/bin:/hab/pkgs/core/less/530/20200305235121/bin:/hab/pkgs/core/ncurses/6.1/20200305230210/bin:/hab/pkgs/core/acl/2.2.53/20200305230628/bin:/hab/pkgs/core/attr/2.4.48/20200305230504/bin:/hab/pkgs/core/bzip2/1.0.8/20200305225842/bin:/hab/pkgs/core/libidn2/2.0.4/20200306010601/bin:/hab/pkgs/core/openssl-fips/2.0.16/20200306005307/bin:/hab/pkgs/core/openssl/1.0.2t/20200306005450/bin:/hab/pkgs/core/pcre/8.42/20200305232429/bin:/hab/pkgs/core/glibc/2.29/20200305172459/bin:/hab/bin:/hab/pkgs/core/hab-plan-build/1.6.288/20210402194206/bin:/hab/pkgs/core/diffutils/3.7/20200306000423/bin:/hab/pkgs/core/less/530/20200305235121/bin:/hab/pkgs/core/make/4.2.1/20200306002515/bin:/hab/pkgs/core/mg/20180408/20200306015846/bin:/hab/pkgs/core/util-linux/2.34/20200306003119/bin:/hab/pkgs/core/vim/8.1.1694/20200306015156/bin:/hab/pkgs/core/ncurses/6.1/20200305230210/bin:/hab/pkgs/core/bash/5.0.16/20200305233030/bin:/hab/pkgs/core/binutils/2.32/20200305174809/bin:/hab/pkgs/core/coreutils/8.30/20200305231640/bin:/hab/pkgs/core/file/5.37/20200305174635/bin:/hab/pkgs/core/findutils/4.6.0/20200306000932/bin:/hab/pkgs/core/gawk/5.0.1/20200305233704/bin:/hab/pkgs/core/gzip/1.10/20200306002325/bin:/hab/pkgs/core/hab/1.6.288/20210402191717/bin:/hab/pkgs/core/rq/0.10.4/20200306011144/bin:/hab/pkgs/core/sed/4.5/20200305230928/bin:/hab/pkgs/core/tar/1.32/20200305233447/bin:/hab/pkgs/core/unzip/6.0/20200306011037/bin:/hab/pkgs/core/wget/1.19.5/20200306010801/bin:/hab/pkgs/core/xz/5.2.4/20200306001321/bin:/hab/pkgs/core/libcap/2.27/20200305230759/bin:/hab/pkgs/core/grep/3.3/20200305232635/bin:/hab/pkgs/core/bzip2/1.0.8/20200305225842/bin:/hab/pkgs/core/libidn2/2.0.4/20200306010601/bin:/hab/pkgs/core/openssl-fips/2.0.16/20200306005307/bin:/hab/pkgs/core/openssl/1.0.2t/20200306005450/bin:/hab/pkgs/core/pcre/8.42/20200305232429/bin:/hab/pkgs/core/acl/2.2.53/20200305230628/bin:/hab/pkgs/core/attr/2.4.48/20200305230504/bin:/hab/pkgs/core/glibc/2.29/20200305172459/bin:/hab/bin
   effortless_config_example: Clean the cache
   effortless_config_example: Setting build environment
mkdir: created directory '/hab/cache/src/effortless_config_example-0.2.3'
   effortless_config_example: Setting PREFIX=/hab/pkgs/collinmcneese/effortless_config_example/0.2.3/20210430183026
   effortless_config_example: Setting LD_RUN_PATH=
   effortless_config_example: Setting CFLAGS=-I/hab/pkgs/core/ruby27/2.7.0/20200404045319/include -I/hab/pkgs/core/make/4.2.1/20200306002515/include -I/hab/pkgs/core/gcc/9.1.0/20200305180723/include
   effortless_config_example: Setting CXXFLAGS=-I/hab/pkgs/core/ruby27/2.7.0/20200404045319/include -I/hab/pkgs/core/make/4.2.1/20200306002515/include -I/hab/pkgs/core/gcc/9.1.0/20200305180723/include
   effortless_config_example: Setting CPPFLAGS=-I/hab/pkgs/core/ruby27/2.7.0/20200404045319/include -I/hab/pkgs/core/make/4.2.1/20200306002515/include -I/hab/pkgs/core/gcc/9.1.0/20200305180723/include
   effortless_config_example: Setting LDFLAGS=-L/hab/pkgs/core/git/2.26.2/20200601121014/lib -L/hab/pkgs/core/ruby27/2.7.0/20200404045319/lib -L/hab/pkgs/core/gcc/9.1.0/20200305180723/lib -L/hab/pkgs/core/git/2.26.2/20200601121014/lib
   effortless_config_example: Setting PKG_CONFIG_PATH=/hab/pkgs/core/ruby27/2.7.0/20200404045319/lib/pkgconfig
   effortless_config_example: Preparing to build
   effortless_config_example: Building
Ignoring ffi-yajl-2.4.0 because its extensions are not built. Try: gem pristine ffi-yajl --version 2.4.0
Ignoring libyajl2-2.1.0 because its extensions are not built. Try: gem pristine libyajl2 --version 2.1.0
Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0
Ignoring ffi-yajl-2.4.0 because its extensions are not built. Try: gem pristine ffi-yajl --version 2.4.0
Ignoring libyajl2-2.1.0 because its extensions are not built. Try: gem pristine libyajl2 --version 2.1.0
Ignoring bcrypt_pbkdf-1.1.0 because its extensions are not built. Try: gem pristine bcrypt_pbkdf --version 1.1.0
-- truncated a lot of these repeating -- 
Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0
Ignoring ffi-yajl-2.4.0 because its extensions are not built. Try: gem pristine ffi-yajl --version 2.4.0
Ignoring libyajl2-2.1.0 because its extensions are not built. Try: gem pristine libyajl2 --version 2.1.0
Ignoring ruby-prof-1.4.3 because its extensions are not built. Try: gem pristine ruby-prof --version 1.4.3
Ignoring ruby-shadow-2.5.0 because its extensions are not built. Try: gem pristine ruby-shadow --version 2.5.0
Building policy effortless_config_example
Expanded run list: recipe[cb_effortless::default]
Caching Cookbooks...
Installing cb_effortless >= 0.0.0 from path
failed to load the ffi-yajl c-extension, falling back to ffi interface
FATAL: to use the ffi extension instead of the compiled C extension, the ffi gem must be installed
       (it is optional, so you must include it in your bundle manually)
   effortless_config_example: Build time: 0m17s
   effortless_config_example: Exiting on error