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

Workaround for mingw build error #9808

Merged
merged 1 commit into from May 17, 2021

Conversation

koic
Copy link
Member

@koic koic commented May 17, 2021

This PR skips mingw build matrix due to the following build error.

D:/ruby-mingw/lib/ruby/3.1.0/yaml.rb:3: warning: It seems your ruby
installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
LoadError: 126: The specified module could not be found.   -
D:/ruby-mingw/lib/ruby/3.1.0/x64-mingw32/psych.so
<internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in
`require': 126: The specified module could not be found.   -
D:/ruby-mingw/lib/ruby/3.1.0/x64-mingw32/psych.so (LoadError)
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from D:/ruby-mingw/lib/ruby/3.1.0/psych.rb:13:in `<top (required)>'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from D:/ruby-mingw/lib/ruby/3.1.0/yaml.rb:4:in `<top (required)>'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/psyched_yaml.rb:12:in `<top (required)>'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/rubygems_integration.rb:114:in `require_relative'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/rubygems_integration.rb:114:in `configuration'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/fetcher.rb:247:in `connection'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/fetcher.rb:89:in `initialize'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:273:in `new'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:273:in `block in fetchers'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:271:in `map'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:271:in `fetchers'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:407:in `block in remote_specs'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/index.rb:9:in `build'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:406:in `remote_specs'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:104:in `specs'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:296:in `block (2 levels) in index'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:294:in `each'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:294:in `block in index'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/index.rb:9:in `build'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:291:in `index'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:913:in `source_requirements'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:285:in `resolve'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:176:in `resolve_remotely!'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:291:in `resolve_if_needed'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:83:in `block in run'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/process_lock.rb:12:in `block in lock'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/process_lock.rb:9:in `open'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/process_lock.rb:9:in `lock'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:72:in `run'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:24:in `install'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli/install.rb:60:in `run'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:259:in `block in install'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/settings.rb:133:in `temporary'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:258:in `install'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:30:in `dispatch'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:24:in `start'
    from
    D:/ruby-mingw/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:49:in `block in <top (required)>'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
    from
    D:/ruby-mingw/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:37:in
    `<top (required)>'
    from D:/ruby-mingw/bin/bundle:31:in `load'
    from D:/ruby-mingw/bin/bundle:31:in `<main>'

https://github.com/rubocop/rubocop/pull/9806/checks?check_run_id=2601617298

I reported the issue to ruby/psych#494.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

This PR skips mingw build matrix due to the following build error.

```console
D:/ruby-mingw/lib/ruby/3.1.0/yaml.rb:3: warning: It seems your ruby
installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
LoadError: 126: The specified module could not be found.   -
D:/ruby-mingw/lib/ruby/3.1.0/x64-mingw32/psych.so
<internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in
`require': 126: The specified module could not be found.   -
D:/ruby-mingw/lib/ruby/3.1.0/x64-mingw32/psych.so (LoadError)
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from D:/ruby-mingw/lib/ruby/3.1.0/psych.rb:13:in `<top (required)>'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from D:/ruby-mingw/lib/ruby/3.1.0/yaml.rb:4:in `<top (required)>'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from
    <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/psyched_yaml.rb:12:in `<top (required)>'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/rubygems_integration.rb:114:in `require_relative'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/rubygems_integration.rb:114:in `configuration'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/fetcher.rb:247:in `connection'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/fetcher.rb:89:in `initialize'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:273:in `new'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:273:in `block in fetchers'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:271:in `map'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:271:in `fetchers'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:407:in `block in remote_specs'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/index.rb:9:in `build'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:406:in `remote_specs'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/source/rubygems.rb:104:in `specs'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:296:in `block (2 levels) in index'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:294:in `each'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:294:in `block in index'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/index.rb:9:in `build'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:291:in `index'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:913:in `source_requirements'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:285:in `resolve'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/definition.rb:176:in `resolve_remotely!'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:291:in `resolve_if_needed'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:83:in `block in run'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/process_lock.rb:12:in `block in lock'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/process_lock.rb:9:in `open'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/process_lock.rb:9:in `lock'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:72:in `run'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/installer.rb:24:in `install'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli/install.rb:60:in `run'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:259:in `block in install'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/settings.rb:133:in `temporary'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:258:in `install'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:30:in `dispatch'
    from
    D:/ruby-mingw/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/cli.rb:24:in `start'
    from
    D:/ruby-mingw/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:49:in `block in <top (required)>'
    from D:/ruby-mingw/lib/ruby/3.1.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
    from
    D:/ruby-mingw/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:37:in
    `<top (required)>'
    from D:/ruby-mingw/bin/bundle:31:in `load'
    from D:/ruby-mingw/bin/bundle:31:in `<main>'
```

https://github.com/rubocop/rubocop/pull/9806/checks?check_run_id=2601617298
@koic koic merged commit ac00a83 into rubocop:master May 17, 2021
@koic koic deleted the workaournd_for_mingw_build_error branch May 17, 2021 16:31
@MSP-Greg
Copy link
Contributor

MSP-Greg commented Jun 4, 2021

@koic

I came across this somehow... Anyway, the issue has been fixed with the mingw build, I just reverted the commit for this in my fork. See:

https://github.com/MSP-Greg/rubocop/actions/runs/907498063

I can do a PR or you can revert the commit.

Feel free to ping me if you see mingw issues anywhere. The MSYS2 org has had many changes recently, things like new gpg keys, changes to the sites hosting the packages, etc. I prefer to not update all the MSYS2 packages (can take a long time), and partial updates occasionally failed in the past.

I adjusted code for it in ruby-loco and setup-ruby-pkgs, I doubt there will be problems in the future. Thanks.

@koic
Copy link
Member Author

koic commented Jun 5, 2021

@MSP-Greg Great! Thank you for the mention! Can you open a pull request?

MSP-Greg added a commit to MSP-Greg/rubocop that referenced this pull request Jun 5, 2021
…w_build_error"

This reverts commit ac00a83, reversing
changes made to 5f64524.
@MSP-Greg
Copy link
Contributor

MSP-Greg commented Jun 5, 2021

@koic Thanks also. See PR #9856

koic added a commit that referenced this pull request Jun 5, 2021
Revert "Merge pull request #9808" - fix MinGW CI
@koic
Copy link
Member Author

koic commented Jul 3, 2021

@MSP-Greg It seems that x64-mingw32/psych.so (LoadError) error is occurring again in the mingw using Ruby 3.1.0-dev. Could you confirm it?

D:/ruby-mingw/lib/ruby/3.1.0/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
LoadError: 126: The specified module could not be found.   - D:/ruby-mingw/lib/ruby/3.1.0/x64-mingw32/psych.so
<internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': 126: The specified module could not be found.   - D:/ruby-mingw/lib/ruby/3.1.0/x64-mingw32/psych.so (LoadError)
	from <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from D:/ruby-mingw/lib/ruby/3.1.0/psych.rb:13:in `<top (required)>'
	from <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:D:/ruby-mingw/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from D:/ruby-mingw/lib/ruby/3.1.0/yaml.rb:4:in `<top (required)>'

https://github.com/rubocop/rubocop/runs/2979268599

@MSP-Greg
Copy link
Contributor

MSP-Greg commented Jul 3, 2021

I think I just fixed it, the job is running right now (16:47 UTC)... Sorry. About 35 minutes I should be able to verify the fix

@koic
Copy link
Member Author

koic commented Jul 3, 2021

Awesome! Thank you for the quick fix!

@MSP-Greg
Copy link
Contributor

MSP-Greg commented Jul 3, 2021

It's still not fixed. I'm working on it...

@MSP-Greg
Copy link
Contributor

MSP-Greg commented Jul 3, 2021

@koic

I guess when you make changes to speed things up when working locally, and then you accidentally commit them, the fix for the original problem won't work in CI...

Anyway, it's fixed. Sorry for the delay.

@koic
Copy link
Member Author

koic commented Jul 4, 2021

I confirmed that CI build has been recovered. Thank you again!

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

Successfully merging this pull request may close these issues.

None yet

2 participants