rb-sys icon indicating copy to clipboard operation
rb-sys copied to clipboard

windows eh-frame-header option

Open dsisnero opened this issue 2 years ago • 7 comments

trying bundle gem --ext=rust hello_rust example on windows after ridk enable to get environment

bundle exec rake compile gives me the following error = note: c:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: unrecognized option '--eh-frame-hdr' c:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: use the --help option for usage information collect2.exe: error: ld returned 1 exit status

Googling this error and arriving at https://github.com/avr-rust/blink/issues/23

For anyone else encountering this: The solution is to add "eh-frame-header": false to the target-json file.

dsisnero avatar Jan 31 '23 20:01 dsisnero

Thanks for the report. Which ruby version are you using?

ianks avatar Feb 01 '23 00:02 ianks

F:\windows\scoop\apps\alacritty\current>gem env RubyGems Environment:

  • RUBYGEMS VERSION: 3.4.6
  • RUBY VERSION: 3.2.0 (2022-12-25 patchlevel 0) [x64-mingw-ucrt]
  • INSTALLATION DIRECTORY: f:/windows/tools/ruby/Ruby3.2/lib/ruby/gems/3.2.0
  • USER INSTALLATION DIRECTORY: f:\windows_home.local\share/gem/ruby/3.2.0
  • RUBY EXECUTABLE: f:/windows/tools/ruby/Ruby3.2/bin/ruby.exe
  • GIT EXECUTABLE: F:\windows\scoop\shims/git.EXE
  • EXECUTABLE DIRECTORY: f:/windows/tools/ruby/Ruby3.2/bin
  • SPEC CACHE DIRECTORY: f:\windows_home.local\share/gem/specs
  • SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
  • RUBYGEMS PLATFORMS:
    • ruby
    • x64-mingw-ucrt
  • GEM PATHS:
    • f:/windows/tools/ruby/Ruby3.2/lib/ruby/gems/3.2.0
    • f:\windows_home.local\share/gem/ruby/3.2.0
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => true
    • :bulk_threshold => 1000
    • :sources => ["https://rubygems.org/"]
    • :concurrent_downloads => 8
    • "gem" => "--document=yri"
  • REMOTE SOURCES:
    • https://rubygems.org/

On Tue, Jan 31, 2023 at 5:10 PM Ian Ker-Seymer @.***> wrote:

Thanks for the report. Which ruby version are you using?

— Reply to this email directly, view it on GitHub https://github.com/oxidize-rb/rb-sys/issues/139#issuecomment-1411247616, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABQRLTXNYEX6WYA2RBKLDWVGSWHANCNFSM6AAAAAAUM4AAVU . You are receiving this because you authored the thread.Message ID: @.***>

dsisnero avatar Feb 01 '23 15:02 dsisnero

Any other info you need on this?

dsisnero avatar Feb 06 '23 16:02 dsisnero

Last couple of things:

  1. Can you post the full error output of rake compile?
  2. Also, the output of ruby -rrbconfig -e 'pp RbConfig::CONFIG'?

Also, question for @MSP-Greg, is x64-mingw-ucrt a valid platform for Ruby 3.2? I know it is for 3.1, but does the added support for mswin / msvc make this obsolete?

ianks avatar Feb 06 '23 19:02 ianks

x64-mingw-ucrt a valid platform for Ruby 3.2?

Yes, it's the only platform that's widely available.

does the added support for mswin / msvc make this obsolete?

At present, no. It probably won't be replaced by mswin in the immediate future, as there are at least a few popular extension gems that won't compile on mswin.

MSP-Greg avatar Feb 06 '23 20:02 MSP-Greg

bundle exec rake compile 2>&1

pp RbConfig::CONFIG

This is after I ran 'ridk enable`

dsisnero avatar Feb 08 '23 00:02 dsisnero

I’m not sure how to fix this issue. Are you still having it?

ianks avatar Dec 10 '23 19:12 ianks