https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112013-05-22T23:03:18ZRuby Issue Tracking SystemRuby master - Bug #8435: Can't build tcl/tk extensions after updating Debian/Ubuntu packagehttps://bugs.ruby-lang.org/issues/8435?journal_id=394882013-05-22T23:03:18Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>Workaround is to specify actual location of tcl/tk files:</p>
<pre><code>./configure --with-tclConfig-file=/usr/lib/x86_64-linux-gnu/tclConfig.sh --with-tkConfig-file=/usr/lib/x86_64-linux-gnu/tkConfig.sh
</code></pre>
<p>It looks like the change in the *.sh scripts intend to improve support for DEB_HOST_MULTIARCH. I don't know how prevalent the problem will be for other platforms, or what the policy is for Ruby regarding that kind of workaround.</p> Ruby master - Bug #8435: Can't build tcl/tk extensions after updating Debian/Ubuntu packagehttps://bugs.ruby-lang.org/issues/8435?journal_id=395022013-05-23T11:42:58Zzzak (zzak _)
<ul></ul><p>Seems like third party issue</p> Ruby master - Bug #8435: Can't build tcl/tk extensions after updating Debian/Ubuntu packagehttps://bugs.ruby-lang.org/issues/8435?journal_id=395102013-05-24T10:10:33Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Category</strong> set to <i>ext</i></li><li><strong>Assignee</strong> set to <i>nagai (Hidetoshi Nagai)</i></li><li><strong>Target version</strong> set to <i>2.1.0</i></li></ul> Ruby master - Bug #8435: Can't build tcl/tk extensions after updating Debian/Ubuntu packagehttps://bugs.ruby-lang.org/issues/8435?journal_id=395312013-05-26T09:44:11Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>A possible fix:</p>
<p>--- a/ext/tk/extconf.rb 2013-01-10 05:47:20.000000000 -0200<br>
+++ b/ext/tk/extconf.rb 2013-05-25 21:32:54.230020034 -0300<br>
@@ -117,6 +117,11 @@<br>
/64|universal/ =~ RUBY_PLATFORM<br>
end</p>
<p>+def multiarch_supported?</p>
<ul>
<li>dpkg_arch = <code>which dpkg-architecture</code>.strip</li>
<li>
<code>#{dpkg_arch} -qDEB_HOST_MULTIARCH</code>.strip unless dpkg_arch.empty?<br>
+end</li>
<li>
</ul>
<p>def check_tcltk_version(version)<br>
return [nil, nil] unless version.kind_of? String</p>
<p>@@ -466,7 +471,14 @@</p>
<pre><code> config_dir << RbConfig::CONFIG['libdir']
</code></pre>
<ul>
<li>((maybe_64bit?)? ['lib64', 'lib']: ['lib']).each{|dir|</li>
</ul>
<ul>
<li>if arch = multiarch_supported?</li>
<li>
<pre><code> lib_dirs = ["lib/#{arch}", 'lib']
</code></pre>
</li>
<li>elsif maybe_64bit?</li>
<li>
<pre><code> lib_dirs = ['lib64', 'lib']
</code></pre>
</li>
<li>else</li>
<li>
<pre><code> lib_dirs = ['lib']
</code></pre>
</li>
<li>end</li>
<li>lib_dirs.each{|dir|<br>
config_dir.concat [<br>
File.join(RbConfig::CONFIG['exec_prefix'], dir),<br>
File.join(RbConfig::CONFIG['prefix'], dir),</li>
</ul> Ruby master - Bug #8435: Can't build tcl/tk extensions after updating Debian/Ubuntu packagehttps://bugs.ruby-lang.org/issues/8435?journal_id=395442013-05-28T00:08:10Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>romuloceccon (Romulo Ceccon) wrote:</p>
<blockquote>
<p>+def multiarch_supported?</p>
<ul>
<li>dpkg_arch = <code>which dpkg-architecture</code>.strip</li>
<li>
<code>#{dpkg_arch} -qDEB_HOST_MULTIARCH</code>.strip unless dpkg_arch.empty?<br>
+end</li>
</ul>
</blockquote>
<p>`` returns a string, that is true value.</p>
<p>Possibly,<br>
/\S/ =~ <code>dpkg-architecture -qDEB_HOST_MULTIARCH</code> rescue false<br>
?</p> Ruby master - Bug #8435: Can't build tcl/tk extensions after updating Debian/Ubuntu packagehttps://bugs.ruby-lang.org/issues/8435?journal_id=395452013-05-28T02:27:15Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>The idea is that the method would also return the architecture as a string, but return false if dpkg-architecture is not available or is of an older version (DEB_HOST_MULTIARCH unsupported). So a more comprehensive approach could be:</p>
<pre><code>def multiarch_supported?
cmd = `which dpkg-architecture 2>/dev/null`
return unless $?.success?
arch = `#{cmd.strip} -qDEB_HOST_MULTIARCH`
arch.strip if $?.success?
end
</code></pre> Ruby master - Bug #8435: Can't build tcl/tk extensions after updating Debian/Ubuntu packagehttps://bugs.ruby-lang.org/issues/8435?journal_id=399892013-06-17T14:20:13Znagai (Hidetoshi Nagai)nagai@ai.kyutech.ac.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Third Party's Issue</i></li></ul><p>It depends on Ubuntu packages. The patch may be able to avoid the "current" problem,<br>
but it cannot guarantee that it is available in the next version of Ubuntu.<br>
If the policy of Ubuntu is changed, extconf.rb must check the Tcl/Tk package version of Ubuntu.<br>
I think that it is not a good choice.<br>
Although it may be troble, please use configure options.</p>