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

Error during installation of dpl #1287

Open
Brenneisen opened this issue Sep 11, 2024 · 2 comments
Open

Error during installation of dpl #1287

Brenneisen opened this issue Sep 11, 2024 · 2 comments

Comments

@Brenneisen
Copy link

During the installation of dpl the following error occurred:

$ rvm use $(travis_internal_ruby) --fuzzy do ruby -S gem uninstall -aIx dpl
Gem 'dpl' is not installed
$ rvm use $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl --pre
Successfully installed mime-0.4.4
Successfully installed json_pure-2.7.2
Successfully installed excon-0.111.0
Successfully installed travis-packagecloud-ruby-1.1.0
Successfully installed regstry-1.0.15
Successfully installed travis-cl-1.2.4
Successfully installed dpl-2.0.5.beta.2
7 gems installed

Install deployment dependencies
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/travis/.rvm/gems/ruby-3.3.5/gems/racc-1.8.1/ext/racc/cparse

/home/travis/.rvm/rubies/ruby-3.3.5/bin/ruby extconf.rb
creating Makefile

current directory: /home/travis/.rvm/gems/ruby-3.3.5/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20240911-6569-l3m9wr sitelibdir\=./.gem.20240911-6569-l3m9wr clean

current directory: /home/travis/.rvm/gems/ruby-3.3.5/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20240911-6569-l3m9wr sitelibdir\=./.gem.20240911-6569-l3m9wr
compiling cparse.c
gcc: error: unrecognized command-line option ‘-fdeclspec’
gcc: error: unrecognized command-line option ‘-Wextra-tokens’; did you mean ‘-Wextra-semi’?
gcc: error: unrecognized command-line option ‘-Wdivision-by-zero’; did you mean ‘-Wdiv-by-zero’?
gcc: error: unrecognized command-line option ‘-Wshorten-64-to-32’
make: *** [Makefile:248: cparse.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/travis/.rvm/gems/ruby-3.3.5/gems/racc-1.8.1 for inspection.
Results logged to /home/travis/.rvm/gems/ruby-3.3.5/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out

  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:125:in `run'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:51:in `block in make'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:43:in `each'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:43:in `make'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/ext_conf_builder.rb:42:in `build'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:193:in `build_extension'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:227:in `block in build_extensions'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `each'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `build_extensions'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/3.3.0/rubygems/installer.rb:853:in `build_extensions'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/rubygems_gem_installer.rb:109:in `build_extensions'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/source/rubygems.rb:205:in `install'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/installer/gem_installer.rb:54:in `install'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/installer/parallel_installer.rb:132:in `do_install'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/installer/parallel_installer.rb:123:in `block in worker_pool'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/worker.rb:62:in `apply_func'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/worker.rb:57:in `block in process_queue'
  <internal:kernel>:187:in `loop'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/worker.rb:54:in `process_queue'
  /home/travis/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'

An error occurred while installing racc (1.8.1), and Bundler cannot continue.

In Gemfile:
  nokogiri was resolved to 1.16.7, which depends on
    racc
 (Bundler::InstallError)
failed to deploy
@duckstop
Copy link

duckstop commented Sep 12, 2024

Bump. This is happening for us as well.

os: linux
dist: focal

language: ruby

rvm:
  - "2.7.5"

services:
  - docker
deploy:
        - provider: elasticbeanstalk
          access_key_id: ${AWS_ACCESS_KEY_ID}
          secret_access_key: ${AWS_SECRET_ACCESS_KEY}
          region: eu-west-1
          app: {our app}
          env: {our env}
          bucket: {our bucket}
          edge: true
          on:
            branch: development

Error:

Install deployment dependencies
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    current directory: /home/travis/.rvm/gems/ruby-3.3.5/gems/racc-1.8.1/ext/racc/cparse

/home/travis/.rvm/rubies/ruby-3.3.5/bin/ruby extconf.rb

creating Makefile
current directory: /home/travis/.rvm/gems/ruby-3.3.5/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20240912-10121-9phwsw sitelibdir\=./.gem.20240912-10121-9phwsw clean
current directory: /home/travis/.rvm/gems/ruby-3.3.5/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20240912-10121-9phwsw sitelibdir\=./.gem.20240912-10121-9phwsw

compiling cparse.c
gcc: error: unrecognized command line option ‘-fdeclspec’
gcc: error: unrecognized command line option ‘-Wextra-tokens’; did you mean ‘-Wextra-semi’?
gcc: error: unrecognized command line option ‘-Wdivision-by-zero’; did you mean ‘-Wdiv-by-zero’?
gcc: error: unrecognized command line option ‘-Wshorten-64-to-32’

make: *** [Makefile:248: cparse.o] Error 1
make failed, exit code 2`

@duckstop
Copy link

duckstop commented Sep 13, 2024

EDIT: Apparently bionic, focal and jammy where updated to ruby v3.3.5 -> https://changelog.travis-ci.com/build-environments-updates-deployed-300293. So why changing the dist works, is beyond me.

Fixed by using a dist with an internal ruby version < 3.3.4.

So this will work:

os: linux
dist: bionic

language: ruby

As bionic comes with ruby v3.3.0

RVM seems to have an compiler version mismatch for prebuilt binaries in 3.3.4 and 3.3.5 -> rubygems/rubygems#8015 and rvm/rvm#5502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants