bundle update doesn't work in centos image with 2.2.7
t0ffel opened this issue · 1 comments
t0ffel commented
Checklist
- Upgrade Terraspace: Are you using the latest version of Terraspace? This allows Terraspace to fix issues fast. There's an Upgrading Guide: https://terraspace.cloud/docs/misc/upgrading/
- Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.boltops.com
- Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
Software | Version |
---|---|
Operating System | centos terraspace docker image |
Terraform | |
Terraspace | 2.2.7 |
Ruby |
Expected Behaviour
Running bundle update
inside centos docker image in order to install the aws plugin works without errors
Current Behavior
bundle update
inside centos docker image fails:
bundle update
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Using aws-eventstream 1.2.0
Using memoist 0.16.2
Using bundler 2.4.6
Fetching concurrent-ruby 1.2.2
Fetching aws-partitions 1.776.0
Using jmespath 1.6.2
Using text-table 1.2.4
Fetching minitest 5.18.0
Fetching zeitwerk 2.6.8
Using deep_merge 1.2.2
Using diff-lcs 1.5.0
Using dotenv 2.8.1
Using rainbow 3.1.1
Using eventmachine 1.2.7
Using graph 2.11.0
Using rexml 3.2.5
Using rspec-support 3.12.0
Using rubyzip 2.3.2
Fetching tilt 2.2.0
Fetching thor 1.2.2
Using tty-tree 0.4.0
Fetching racc 1.7.0
Using aws-sigv4 1.5.2
Using rhcl 0.1.0
Using eventmachine-tail 0.6.5
Fetching rspec-core 3.12.2
Installing zeitwerk 2.6.8
Installing tilt 2.2.0
Installing aws-partitions 1.776.0
Installing minitest 5.18.0
Installing thor 1.2.2
Installing racc 1.7.0 with native extensions
Installing rspec-core 3.12.2
Fetching rspec-expectations 3.12.3
Using zip_folder 0.1.0
Using hcl_parser 0.2.2
Fetching rspec-mocks 3.12.5
Fetching aws-sdk-core 3.174.0
Installing concurrent-ruby 1.2.2
Installing rspec-mocks 3.12.5
Installing rspec-expectations 3.12.3
Installing aws-sdk-core 3.174.0
Using rspec 3.12.0
Fetching aws_data 0.1.1
Fetching aws-sdk-dynamodb 1.85.0
Fetching aws-sdk-kms 1.66.0
Fetching aws-sdk-ssm 1.151.0
Fetching aws-sdk-secretsmanager 1.76.0
Using tzinfo 2.0.6
Fetching i18n 1.14.1
Installing aws_data 0.1.1
Installing aws-sdk-secretsmanager 1.76.0
Installing i18n 1.14.1
Installing aws-sdk-dynamodb 1.85.0
Installing aws-sdk-kms 1.66.0
Installing aws-sdk-ssm 1.151.0
Fetching aws-sdk-s3 1.123.1
Fetching activesupport 7.0.5
Installing activesupport 7.0.5
Installing aws-sdk-s3 1.123.1
Using rspec-terraspace 0.3.2
Using cli-format 0.2.2
Using dsl_evaluator 0.3.1
Fetching render_me_pretty 0.9.0
Fetching s3-secure 0.6.1
Installing s3-secure 0.6.1
Installing render_me_pretty 0.9.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/racc-1.7.0/ext/racc/cparse
/opt/terraspace/embedded/bin/ruby -I /opt/terraspace/embedded/lib/ruby/3.0.0 -r
./siteconf20230608-18-6z42gt.rb extconf.rb
checking for rb_block_call()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/terraspace/embedded/bin/$(RUBY_BASE_NAME)
/opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:482:in `try_do': The compiler
failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:575:in `try_link0'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:593:in `try_link'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:805:in `try_func'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:1094:in `block in
have_func'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:982:in `block in
checking_for'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:361:in `block (2 levels)
in postpone'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:361:in `block in postpone'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:357:in `postpone'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:981:in `checking_for'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:1093:in `have_func'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/racc-1.7.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/racc-1.7.0 for inspection.
Results logged to
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/racc-1.7.0/gem_make.out
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:93:in `run'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/opt/terraspace/embedded/lib/ruby/3.0.0/tempfile.rb:317:in `open'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:26:in
`build'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:159:in
`build_extension'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:193:in `block
in build_extensions'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `each'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in
`build_extensions'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/installer.rb:845:in
`build_extensions'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/source/rubygems.rb:200:in
`install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:54:in
`install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:155:in
`do_install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:146:in
`block in worker_pool'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:62:in
`apply_func'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:57:in
`block in process_queue'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in
`loop'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in
`process_queue'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'
An error occurred while installing racc (1.7.0), and Bundler cannot continue.
In Gemfile:
terraspace was resolved to 2.2.7, which depends on
terraspace-bundler was resolved to 0.5.0, which depends on
nokogiri was resolved to 1.15.2, which depends on
racc
it was working fine prior to 2.2.7.
Also alpine works fine.
Step-by-step reproduction instructions
- pull boltops/terraspace:centos
- run bundle update inside of it.
Code Sample
Solution Suggestion
fl-max commented
Does not work in terraspace:2.2.3
either:
current directory: /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/racc-1.7.1/ext/racc/cparse
/opt/terraspace/embedded/bin/ruby -I /opt/terraspace/embedded/lib/ruby/3.0.0 -r ./siteconf20230719-17-512m6r.rb extconf.rb
checking for rb_block_call()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/terraspace/embedded/bin/$(RUBY_BASE_NAME)
/opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:482:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:575:in `try_link0'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:593:in `try_link'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:805:in `try_func'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:1094:in `block in have_func'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:982:in `block in checking_for'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:361:in `block in postpone'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:357:in `postpone'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:981:in `checking_for'
from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:1093:in `have_func'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/racc-1.7.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/racc-1.7.1 for inspection.
Results logged to /opt/terraspace/embedded/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/racc-1.7.1/gem_make.out
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:93:in `run'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build'
/opt/terraspace/embedded/lib/ruby/3.0.0/tempfile.rb:317:in `open'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:159:in `build_extension'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:193:in `block in build_extensions'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `each'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `build_extensions'
/opt/terraspace/embedded/lib/ruby/3.0.0/rubygems/installer.rb:845:in `build_extensions'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/source/rubygems.rb:200:in `install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:54:in `install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:155:in `do_install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:146:in `block in worker_pool'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:62:in `apply_func'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:57:in `block in process_queue'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `loop'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `process_queue'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.6/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'
An error occurred while installing racc (1.7.1), and Bundler cannot continue.
In Gemfile:
terraspace was resolved to 2.2.8, which depends on
terraspace-bundler was resolved to 0.5.0, which depends on
nokogiri was resolved to 1.15.3, which depends on
racc