Backport #7333

VS2012でリンクエラー

Added by Yoshida Masato over 1 year ago. Updated over 1 year ago.

[ruby-dev:46484]
Status:Closed
Priority:Normal
Assignee:Usaku NAKAMURA

Description

=begin
VS2012でビルドすると未解決のシンボルでリンクエラーになります。

generating x64-msvcr110-ruby200.def
linking import-library x64-msvcr110-ruby200.lib
ライブラリ x64-msvcr110-ruby200.lib とオブジェクト x64-msvcr110-ruby200.exp を作成中
compiling x64-msvcr110-ruby200.rc
dmyext.obj
linking shared-library x64-msvcr110-ruby200.dll
ライブラリ dummy.lib とオブジェクト dummy.exp を作成中
dummy.exp : error LNK2001: 外部シンボル "_xmm@7fffffffffffffff7fffffffffffffff" は未解決です。
x64-msvcr110-ruby200.dll : fatal error LNK1120: 1 件の未解決の外部参照

dumpbin.exeの出力フォーマットが多少変更されたため不要なシンボルが.defファイルに出力されるようです。

diff -u win32/mkexports.rb.org win32/mkexports.rb
--- win32/mkexports.rb.org 2012-11-12 09:55:13.210314600 +0900
+++ win32/mkexports.rb 2012-11-12 10:19:47.935357700 +0900
@@ -115,7 +115,7 @@
next unless l.sub!(/.?\s(()\s+)?External\s+|\s+/, '')
isdata = !$1
if noprefix or /[@
]/ =~ l
- next if /(?!)@.
@/ =~ l || /@[[:xdigit:]]{8,16}$/ =~ l ||
+ next if /(?!)@.*@/ =~ l || /@[[:xdigit:]]{8,32}$/ =~ l ||
/?(?:Init|.*threadptr|DllMain\b)/ =~ l
l.sub!(/[@_]/, '') if /@\d+$/ !~ l
elsif !l.sub!(/\+) ([@?`\']*)$/, '\1')

=end

Associated revisions

Revision 38320
Added by Usaku NAKAMURA over 1 year ago

merge revision(s) 37625: [Backport #7333]

* win32/mkexports.rb (each_export): skip garbages generated by VS2012's
  nmake.
  reported and patched by Yoshida Masato at [Bug #7333] 

History

#1 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37625.
Yoshida, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • win32/mkexports.rb (each_export): skip garbages generated by VS2012's nmake. reported and patched by Yoshida Masato at [Bug #7333]

#2 Updated by Usaku NAKAMURA over 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport93
  • Status changed from Closed to Assigned
  • Assignee set to Usaku NAKAMURA

#3 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r38320.
Yoshida, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 37625: [Backport #7333]

* win32/mkexports.rb (each_export): skip garbages generated by VS2012's
  nmake.
  reported and patched by Yoshida Masato at [Bug #7333] 

Also available in: Atom PDF