Bug #10948
closedWhen cross-compiling Ruby 2.2.1 for Win32, securerandom.rb fails while trying to use Win32 native libraries
Description
Between Ruby 2.1 and 2.2, lib/securerandom.rb was modified to assume that if /mswin|mingw/ =~ RUBY_PLATFORM then Win32 libraries are available. This is not true for a cross-compile environment, however. So the pre-Ruby-2.2 checks to use OpenSSL::Random need to be restored.
The problem is further described in https://github.com/tjschuck/rake-compiler-dev-box/pull/20
A pull request is available at https://github.com/ruby/ruby/pull/848 based on the change suggested by @unak and verified by @sodabrew.
Updated by aaron@serendipity.cx (Aaron Stone) over 9 years ago
Normally a PR would be against trunk, but trunk has moved all Win32-specific code out of lib/securerandom.rb, so if the same problem exists on trunk it will require a different solution.
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Status changed from Open to Closed
- Assignee changed from usa (Usaku NAKAMURA) to naruse (Yui NARUSE)
note: "Closed" of this ticket means that "it's already no problem on trunk, so fix stable branch(es)."
Naruse-san, please apply GH-848.
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Related to Bug #10995: 2.2.1 fails at make install with mingw-w64 on archlinux added
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Related to deleted (Bug #10995: 2.2.1 fails at make install with mingw-w64 on archlinux)
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Has duplicate Bug #10995: 2.2.1 fails at make install with mingw-w64 on archlinux added
Updated by aaron@serendipity.cx (Aaron Stone) over 9 years ago
This hasn't landed on ruby_2_2 yet, could you re-open the issue to track it until resolution?
Updated by usa (Usaku NAKAMURA) over 9 years ago
As I wrote before ( https://bugs.ruby-lang.org/issues/10948#note-2 ),
"Closed" with backport "REQUIED" means "please backport this."
Branch maintainers understand it.
Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE
The patch was applied to ruby_2_2 branch at r50281.
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE