Project

General

Profile

Actions

Bug #10948

closed

When cross-compiling Ruby 2.2.1 for Win32, securerandom.rb fails while trying to use Win32 native libraries

Added by aaron@serendipity.cx (Aaron Stone) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
-
[ruby-core:68455]

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.


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #10995: 2.2.1 fails at make install with mingw-w64 on archlinuxClosedActions

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.

Actions #3

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
Actions #4

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)
Actions #5

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
Actions #6

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?

Actions #7

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.

Actions #8

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.

Actions #9

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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0