Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new project in Docker container fails #346

Open
gs-scooter opened this issue Jan 12, 2024 · 1 comment
Open

Creating a new project in Docker container fails #346

gs-scooter opened this issue Jan 12, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@gs-scooter
Copy link

Steps:

Ran the following Docker command per instructions:
docker run --rm -ti -v $HOME/.aws:/root/.aws ghcr.io/boltops-tools/terraspace

Attempted to create new project in container per instructions on same page:
terraspace new project infra --examples

This results in an error. See log below:

root@dc34a6ef4b9f:~# terraspace new project infra --examples
=> Creating new project called infra
       exist  infra
   identical  infra/.gitignore
   identical  infra/Gemfile
   identical  infra/README.md
   identical  infra/Terrafile
   identical  infra/config/app.rb
=> Installing dependencies with: bundle install
Don't run Bundler as root. Installing your bundle as root will break this application for all non-root users on this
machine.
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Installing bigdecimal 3.1.5 with native extensions
Installing racc 1.7.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bigdecimal-3.1.5/ext/bigdecimal
/opt/terraspace/embedded/bin/ruby -I /opt/terraspace/embedded/lib/ruby/3.0.0 -r ./siteconf20240112-108-269bq4.rb
extconf.rb
checking for __builtin_clz()... *** 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:608:in `block in try_compile'
        from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:557:in `with_werror'
        from /opt/terraspace/embedded/lib/ruby/3.0.0/mkmf.rb:608:in `try_compile'
        from extconf.rb:6:in `block in have_builtin_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 extconf.rb:5:in `have_builtin_func'
        from extconf.rb:18: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/bigdecimal-3.1.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bigdecimal-3.1.5 for inspection.
Results logged to
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/bigdecimal-3.1.5/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.21/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
  /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/source/rubygems.rb:203:in `install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/installer/gem_installer.rb:54:in
`install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/installer/parallel_installer.rb:130:in
`do_install'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/installer/parallel_installer.rb:121:in
`block in worker_pool'
  /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/worker.rb:62:in `apply_func'
  /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/worker.rb:57:in `block in process_queue'
  /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/worker.rb:54:in `loop'
  /opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/worker.rb:54:in `process_queue'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/bundler-2.4.21/lib/bundler/worker.rb:90:in `block (2 levels) in
create_threads'

An error occurred while installing bigdecimal (3.1.5), and Bundler cannot continue.

In Gemfile:
  terraspace_plugin_aws was resolved to 0.6.1, which depends on
    s3-secure was resolved to 0.7.0, which depends on
      cli-format was resolved to 0.5.0, which depends on
        activesupport was resolved to 7.1.2, which depends on
          bigdecimal
LoadError: cannot load such file -- terraspace_plugin_aws
ERROR: Unable to require plugin terraspace_plugin_aws
Are you sure you the plugin exists and you specified the right plugin option.
You specified --plugin aws
@gs-scooter gs-scooter added the bug Something isn't working label Jan 12, 2024
@tongueroo tongueroo added the help wanted Extra attention is needed label Jan 13, 2024
@tongueroo
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants