Ruby Issue Tracking System: Issueshttps://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112017-12-27T12:29:12ZRuby Issue Tracking System
Redmine Ruby master - Bug #14248 (Closed): configure fails to detect fd_mask type on OS Xhttps://bugs.ruby-lang.org/issues/142482017-12-27T12:29:12Zdrkaes (Stefan Kaes)stkaes@googlemail.com
<p>When running configure on trunk and/or 2.5.0, configure fails to detect that the type fd_mask exists.</p>
<p>As a consequence, HAVE_RB_FD_INIT gets no set to 1, which leads to rb_fdset_t not being defined.</p>
<p>The bug was introduced with this commit: <a href="https://github.com/ruby/ruby/commit/3215b27a9abd8de793cf517f32d8901fd421eb1c" class="external">https://github.com/ruby/ruby/commit/3215b27a9abd8de793cf517f32d8901fd421eb1c</a></p> Ruby master - Bug #14192 (Closed): rb_frame_method_id_and_class not exported, breaks ruby-prof an...https://bugs.ruby-lang.org/issues/141922017-12-16T10:52:43Zdrkaes (Stefan Kaes)stkaes@googlemail.com
<p>rb_frame_method_id_and_class is currently available in the header files as deprecated, but the corresponding symbol is not exported from the library.</p>
<p>Witness the following compile and execution log excerpts:</p>
<pre><code>../../../../ext/ruby_prof/ruby_prof.c:209:9: warning: 'rb_frame_method_id_and_class' is deprecated [-Wdeprecated-declarations]
rb_frame_method_id_and_class(&mid, &klass);
^
/Users/stefan.kaes/.rvm/rubies/ruby-head/include/ruby-2.5.0/ruby/backward.h:53:1: note: 'rb_frame_method_id_and_class' has been explicitly marked deprecated here
DEPRECATED(int rb_frame_method_id_and_class(ID *idp, VALUE *klassp));
^
/Users/stefan.kaes/.rvm/rubies/ruby-head/include/ruby-2.5.0/x86_64-darwin16/ruby/config.h:126:39: note: expanded from macro 'DEPRECATED'
....................
dyld: lazy symbol binding failed: Symbol not found: _rb_frame_method_id_and_class
Referenced from: /Users/stefan.kaes/src/ruby-prof/lib/2.5.0/ruby_prof.bundle
Expected in: flat namespace
dyld: Symbol not found: _rb_frame_method_id_and_class
Referenced from: /Users/stefan.kaes/src/ruby-prof/lib/2.5.0/ruby_prof.bundle
Expected in: flat namespace
</code></pre> Ruby master - Bug #10710 (Closed): can't compile ruby 2.2.0 with gcc versions older than 4.4.0https://bugs.ruby-lang.org/issues/107102015-01-07T18:50:51Zdrkaes (Stefan Kaes)stkaes@googlemail.com
<p>compilation stops because gcc before 4.4.0 does not support the flag -Wno-packed-bitfield-compat.</p>
<p>patch can be found here: <a href="https://github.com/skaes/rvm-patchsets/blob/master/patches/ruby/2.2.0/railsexpress/05-fix-packed-bitfield-compat-warning-for-older-gccs.patch" class="external">https://github.com/skaes/rvm-patchsets/blob/master/patches/ruby/2.2.0/railsexpress/05-fix-packed-bitfield-compat-warning-for-older-gccs.patch</a></p> Ruby master - Bug #10667 (Closed): thread_variable_set/get doesn't work for dynamically created s...https://bugs.ruby-lang.org/issues/106672014-12-28T20:26:15Zdrkaes (Stefan Kaes)stkaes@googlemail.com
<p>Adding the following test to thread_test.rb shows the problem:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">def</span> <span class="nf">test_thread_variables_work_for_dynamically_created_symbols</span>
<span class="n">t</span> <span class="o">=</span> <span class="no">Thread</span><span class="p">.</span><span class="nf">new</span> <span class="p">{}.</span><span class="nf">join</span>
<span class="n">key_str</span> <span class="o">=</span> <span class="s2">"foo</span><span class="si">#{</span><span class="nb">rand</span><span class="si">}</span><span class="s2">"</span>
<span class="n">key_sym</span> <span class="o">=</span> <span class="n">key_str</span><span class="p">.</span><span class="nf">to_sym</span>
<span class="n">t</span><span class="p">.</span><span class="nf">thread_variable_set</span><span class="p">(</span><span class="n">key_sym</span><span class="p">,</span> <span class="s2">"bar"</span><span class="p">)</span>
<span class="n">assert_equal</span> <span class="s2">"bar"</span><span class="p">,</span> <span class="n">t</span><span class="p">.</span><span class="nf">thread_variable_get</span><span class="p">(</span><span class="n">key_str</span><span class="p">)</span>
<span class="n">assert_equal</span> <span class="s2">"bar"</span><span class="p">,</span> <span class="n">t</span><span class="p">.</span><span class="nf">thread_variable_get</span><span class="p">(</span><span class="n">key_sym</span><span class="p">)</span>
<span class="k">end</span>
</code></pre>
<p>Test output:</p>
<pre><code>[15045/15894] TestThread#test_thread_variables_work_for_dynamically_created_symbols = 0.00
1) Failure:
TestThread#test_thread_variables_work_for_dynamically_created_symbols [/Users/stefan.kaes/src/ruby/test/ruby/test_thread.rb:94]:
<"bar"> expected but was
<nil>.
</code></pre> Ruby master - Bug #9321 (Closed): rb_mod_const_missing does not generate a c-return eventhttps://bugs.ruby-lang.org/issues/93212013-12-30T18:23:32Zdrkaes (Stefan Kaes)stkaes@googlemail.com
<p>We have had an issue reported for ruby-prof where execution times were attributed incorrectly in the call graph.</p>
<p>It turned out that the problem is caused by a missing c-return event for Module#const_missing.</p>
<p>ruby-prof simulates the ruby call stack by subscribing to line, call, c-call, return and c-return events.</p>
<p>Obviously, the missing return throws ruby-prof off the track.</p> Ruby master - Bug #6379 (Closed): inconsistent configuration of core extensions linking against l...https://bugs.ruby-lang.org/issues/63792012-04-29T20:02:17Zdrkaes (Stefan Kaes)stkaes@googlemail.com
<p>ext/openssl/extconf.rb was change some time ago to prefer compile settings via a pkconfig("openssl") directive.</p>
<p>See <a href="https://github.com/ruby/ruby/commit/f6b49243eb0c21bea1c4198cdd52a549e6ead075" class="external">https://github.com/ruby/ruby/commit/f6b49243eb0c21bea1c4198cdd52a549e6ead075</a></p>
<p>However, ext/digest/{md5,rmd160,sha1,sha2}/extconf.rb have not been changed.</p>
<p>This can result in multiple versions of libcrypto and libssl being linked into ruby, which in turn can lead to strange behavior/crashes.</p>
<p>For example, on OS X, with macports installed and its pkg-config binary in the search path, you will get the following list of libraries:</p>
<pre><code>/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 15.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.44.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility version 8.5.0, current version 8.5.7)
/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 8.5.0, current version 8.5.7)
/opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libffi.5.dylib (compatibility version 6.0.0, current version 6.10.0)
/opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/local/lib/libreadline.6.2.dylib (compatibility version 6.0.0, current version 6.2.0)
/usr/local/lib/libyaml-0.2.dylib (compatibility version 3.0.0, current version 3.2.0)
</code></pre>
<p>This happens with a plain ./configure (no arguments given).</p>
<p>If instead you pass --with-opt-dir=/opt/local to ./configure, you get a consistent set of libraries.</p>
<p>I think this is problematic, because it means rvm and ruby-build are broken out of the box for users of MacPorts.</p>
<p>There are two ways to fix this:</p>
<ol>
<li>revert the commit, as it it seems to cause more problems than it fixes</li>
<li>add corresponding pkgconfig directives to all the mentioned extconf.rb files</li>
</ol>
<p>I'm for reverting the patch.</p>
<p>What do you think?</p>
<p>PS:</p>
<p>I used<br>
find . -name '*.bundle' -exec otool -L {} ; | sort | uniq | grep -v ':'<br>
to create the list.</p>