Project

General

Profile

Bug #12644

Support debug build on Windows with MSVC

Added by davispuh (Dāvis Mosāns) over 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-08-01 trunk 55789) [x64-mingw32]
[ruby-core:76644]

Description

When building debug build with MSVC (-MDd flag) then it will be linked to ucrtbased.dll where _isatty function obviously differs.

I've attached a patch which fixes this so that __pioinfo will be found for both debug and non-debug builds (x86 and x64)

Anyway I really really don't like this and I think Ruby should keep it's own fd <=> handle mapping and not use this hack, but for now this works until _isatty changes.


Files


Related issues

Related to Ruby master - Bug #14623: backport r54737, r54740 and r55792ClosedActions

Associated revisions

Revision 441cbf59
Added by usa (Usaku NAKAMURA) over 3 years ago

  • win32/win32.c (set_pioinfo_extra): use more reliable way to search the position of pioinfo of VC14, and also support debug library of it. patched by davispuh AT gmail.com [ruby-core:76644] [Bug #12644] this fixes also [Bug #12631]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 55792
Added by usa (Usaku NAKAMURA) over 3 years ago

  • win32/win32.c (set_pioinfo_extra): use more reliable way to search the position of pioinfo of VC14, and also support debug library of it. patched by davispuh AT gmail.com [ruby-core:76644] [Bug #12644] this fixes also [Bug #12631]

Revision 55792
Added by usa (Usaku NAKAMURA) over 3 years ago

  • win32/win32.c (set_pioinfo_extra): use more reliable way to search the position of pioinfo of VC14, and also support debug library of it. patched by davispuh AT gmail.com [ruby-core:76644] [Bug #12644] this fixes also [Bug #12631]

Revision 55792
Added by usa (Usaku NAKAMURA) over 3 years ago

  • win32/win32.c (set_pioinfo_extra): use more reliable way to search the position of pioinfo of VC14, and also support debug library of it. patched by davispuh AT gmail.com [ruby-core:76644] [Bug #12644] this fixes also [Bug #12631]

Revision 55792
Added by usa (Usaku NAKAMURA) over 3 years ago

  • win32/win32.c (set_pioinfo_extra): use more reliable way to search the position of pioinfo of VC14, and also support debug library of it. patched by davispuh AT gmail.com [ruby-core:76644] [Bug #12644] this fixes also [Bug #12631]

Revision 85ddcb93
Added by usa (Usaku NAKAMURA) over 1 year ago

merge revision(s) 54737,54740,55792: [Backport #14623]

    Support MSVC14 and 15 [Bug #11118]

    Search _pioinfo which is not exported after MSVC14.
    [Bug #12014] [GH-884]

    win32.c: suppress warnings

    * win32/win32.c (set_pioinfo_extra): remove "/*" within comment.
    * win32/win32.c (set_pioinfo_extra): use more reliable way to search
      the position of pioinfo of VC14, and also support debug library of it.
      patched by davispuh AT gmail.com
      [ruby-core:76644] [Bug #12644]
      this fixes also [Bug #12631]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 62884
Added by usa (Usaku NAKAMURA) over 1 year ago

merge revision(s) 54737,54740,55792: [Backport #14623]

Support MSVC14 and 15 [Bug #11118]

Search _pioinfo which is not exported after MSVC14.
[Bug #12014] [GH-884]

win32.c: suppress warnings

* win32/win32.c (set_pioinfo_extra): remove "/*" within comment.
* win32/win32.c (set_pioinfo_extra): use more reliable way to search
  the position of pioinfo of VC14, and also support debug library of it.
  patched by davispuh AT gmail.com
  [ruby-core:76644] [Bug #12644]
  this fixes also [Bug #12631]

History

#1

Updated by usa (Usaku NAKAMURA) over 3 years ago

  • Status changed from Open to Closed

Applied in changeset r55792.


  • win32/win32.c (set_pioinfo_extra): use more reliable way to search the position of pioinfo of VC14, and also support debug library of it. patched by davispuh AT gmail.com [ruby-core:76644] [Bug #12644] this fixes also [Bug #12631]

Updated by usa (Usaku NAKAMURA) over 3 years ago

Great work! Thank you!

Updated by usa (Usaku NAKAMURA) over 3 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED

Updated by rocifier (Ryan O'Connor) about 2 years ago

davispuh (Dāvis Mosāns) wrote:

When building debug build with MSVC (-MDd flag) then it will be linked to ucrtbased.dll where _isatty function obviously differs.

I've attached a patch which fixes this so that __pioinfo will be found for both debug and non-debug builds (x86 and x64)

Anyway I really really don't like this and I think Ruby should keep it's own fd <=> handle mapping and not use this hack, but for now this works until _isatty changes.

I'm running into a similar issue to this trying to build with VS2015. I am seeing this error unexpected ucrtbased.dll appearing when my debug (MDd) build runs miniruby.exe
Where can I find the exact version of this dll required by this assembly language code?

EDIT: I got it working, please see the separate issue I opened here for the answer: https://bugs.ruby-lang.org/issues/13920

Updated by davispuh (Dāvis Mosāns) about 2 years ago

Most likely your ucrtbased.dll differs in such way that can't locate that structure, so either need to update implementation to work for it (you'll need to look at disassembly)

or you will need to compile with probably older version of MSVC 2015 which worked.

#6

Updated by usa (Usaku NAKAMURA) over 1 year ago

  • Related to Bug #14623: backport r54737, r54740 and r55792 added

Also available in: Atom PDF