From: Charlie Savage Date: 2011-09-17T10:44:32+09:00 Subject: [ruby-core:39599] [Ruby 1.9 - Bug #5193] ruby_thread_data_type linker errors fixed with RUBY_EXTERN Issue #5193 has been updated by Charlie Savage. > So we had requested the API proposal and its use cases > long before, but no response till the last month and >just "it can't build". First, is there anything else we need to do for ruby 1.9.3? The current status is that both ruby-debug-base19 and ruby-debug-base19x (JetBrain's fork) both compile now. ruby-debug-base19x works for me, but ruby-debug-base19 does not due to segmentation faults when evaluating expressions. I assume that is due to an issue in ruby-debug-base19 and not ruby. So my original goal for this ticket has been met, thank you. Second: > We had requested the API proposal and its use cases > long before, but no response till the last month > and just "it can't build". Who is in charge of this? Is ruby-core supposed to propose an API? If so, who? Or is it the ruby-debug developers (Mark and JetBrains)? Remember I'm just a user of ruby-debug who was alarmed when it stopped working last month. Having said that, it is important enough to me that I am happy to help with whatever is needed. But instead of discussing that here, should a new ticket be opened for a creating an official debugger api for 1.9.4? ---------------------------------------- Bug #5193: ruby_thread_data_type linker errors fixed with RUBY_EXTERN http://redmine.ruby-lang.org/issues/5193 Author: Charlie Savage Status: Third Party's Issue Priority: Normal Assignee: Nobuyoshi Nakada Category: core Target version: 1.9.3 ruby -v: - ruby-debug-base19x fails to compile with VC++ 2010 with this error: ruby_debug.obj : error LNK2001: unresolved external symbol _ruby_thread_data_type ruby_thread_data_type is declared in vm_core.h as: extern const rb_data_type_t ruby_thread_data_type; ruby-debug calls GetThreadPtr which is defined as: #define GetThreadPtr(obj, ptr) \ TypedData_Get_Struct((obj), rb_thread_t, &ruby_thread_data_type, (ptr)) What makes this interesting is that ruby_thread_data_type is properly included in the msvcr100-ruby191.def file and is exported from msvcr100-ruby191.dll. Somehow the &ruby_thread_data_type causes problems for VC++ (mingw works correctly). Some Ubuntu users seem to be having a similar issue. See: http://rubyforge.org/tracker/index.php?func=detail&aid=29222&group_id=8883&atid=34290 The problem is resolved for VC++ by changing the definition to: RUBY_EXTERN const rb_data_type_t ruby_thread_data_type; Any chance this change could be made? Thanks - Charlie -- http://redmine.ruby-lang.org