https://redmine.ruby-lang.org/
https://redmine.ruby-lang.org/favicon.ico?1711330511
2009-01-27T17:39:01Z
Ruby Issue Tracking System
Ruby master - Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
https://redmine.ruby-lang.org/issues/1060?journal_id=2766
2009-01-27T17:39:01Z
cfis (Charlie Savage)
<ul><li><strong>File</strong> <a href="/attachments/216">mkmf_cfis.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/216/mkmf_cfis.patch">mkmf_cfis.patch</a> added</li></ul><p>=begin<br>
Ok, I figured out what is going on here.</p>
<p>I am building Ruby using msys plus mingw. I find that easier than just straight mingw (or vc++) because msys can easily build pdcurses, zlib, tlc, tk, etc.</p>
<p>The problem is that mkmf calls Kernel::Sytem, which runs commands in a subshell, which I'm going to guess is windows command.exe. That of course breaks the build because paths such as /usr/local/include no longer work.</p>
<p>This can be fixed by spawning bash instead. So something like this:</p>
<p>--- mkmf.rb 2009-01-27 01:29:14 -0700<br>
+++ mkmf.new.rb 2009-01-27 01:28:40 -0700<br>
@@ -295,6 +295,11 @@<br>
nil while command.gsub!(varpat) {vars[$1||$2]}<br>
end</p>
<ul>
<li>if /mingw/ =~ CONFIG['build_os'] and</li>
<li>
<pre><code> /sh/ =~ CONFIG['SHELL']
</code></pre>
</li>
<li>command = "sh -c '#{command}'"</li>
<li>end</li>
<li>Logging::open do<br>
puts command.quote<br>
system(command)</li>
</ul>
<hr>
<p>Its hardly perfect of course - I can see ways of breaking it (like not having sh in your patch).</p>
<p>Maybe a better approach is to patch mkmf so you can supply a shell as a command line parameter.</p>
<p>It does seem reasonable when building ruby with msys+mingw, that extensions should also be built using the same shell. Without this change, you can't effectively build ruby with mingw+msys since you get no 3rd party extensions. I would guess the same issue would affect cygwin when using -mno-cygwin, but I haven't checked (and have no plans too).</p>
<p>Thanks - Charlie</p>
<p>=end</p>
Ruby master - Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
https://redmine.ruby-lang.org/issues/1060?journal_id=2772
2009-01-28T02:15:48Z
cfis (Charlie Savage)
<ul></ul><p>=begin<br>
Ok, skip this. Obviously I can just use the full windows path via CPPFLAGS and LDFLAGS. So go ahead and close.<br>
=end</p>
Ruby master - Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
https://redmine.ruby-lang.org/issues/1060?journal_id=2774
2009-01-28T03:01:32Z
luislavena (Luis Lavena)
luislavena@gmail.com
<ul></ul><p>=begin<br>
On Tue, Jan 27, 2009 at 3:13 PM, Charlie Savage <a href="mailto:redmine@ruby-lang.org" class="email">redmine@ruby-lang.org</a> wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-6 priority-4 priority-default closed" title="Bug: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk (Rejected)" href="https://redmine.ruby-lang.org/issues/1060">#1060</a> has been updated by Charlie Savage.</p>
<p>Ok, skip this. Obviously I can just use the full windows path via CPPFLAGS and LDFLAGS. So go ahead and close.</p>
</blockquote>
<p>Hey Charlie.</p>
<p>In my case even I'm using msys for bash and msys-make, I always<br>
indicate full Windows PATHs instead of MSYS ones, so includes and<br>
libraries search locations are expressed with drive letters and full<br>
paths.</p>
<p>This is how One-Click Installer recipes are been building Ruby right now.</p>
<a name="HTH"></a>
<h2 >HTH,<a href="#HTH" class="wiki-anchor">¶</a></h2>
<h2>Luis Lavena<br>
AREA 17</h2>
<p>Perfection in design is achieved not when there is nothing more to add,<br>
but rather when there is nothing more to take away.<br>
Antoine de Saint-Exupéry</p>
<p>=end</p>
Ruby master - Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
https://redmine.ruby-lang.org/issues/1060?journal_id=2777
2009-01-28T10:33:44Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>At Tue, 27 Jan 2009 17:36:44 +0900,<br>
Charlie Savage wrote in <a href="https://blade.ruby-lang.org/ruby-core/21603">[ruby-core:21603]</a>:</p>
<blockquote>
<p>The problem is that mkmf calls Kernel::Sytem, which runs<br>
commands in a subshell, which I'm going to guess is windows<br>
command.exe. That of course breaks the build because paths<br>
such as /usr/local/include no longer work.</p>
</blockquote>
<p>try `RUBYSHELL=/bin/bash make'.</p>
<p>--<br>
Nobu Nakada</p>
<p>=end</p>
Ruby master - Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
https://redmine.ruby-lang.org/issues/1060?journal_id=2826
2009-01-31T00:04:18Z
yugui (Yuki Sonoda)
yugui@yugui.jp
<ul><li><strong>Target version</strong> changed from <i>1.9.1</i> to <i>1.9.2</i></li><li><strong>ruby -v</strong> set to <i>-</i></li></ul><p>=begin</p>
<p>=end</p>
Ruby master - Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
https://redmine.ruby-lang.org/issues/1060?journal_id=2849
2009-02-02T11:56:27Z
nobu (Nobuyoshi Nakada)
nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>=begin</p>
<p>=end</p>
Ruby master - Bug #1060: mkmf refuses to find 3rd party extensions - ruby 1.9.1 trunk
https://redmine.ruby-lang.org/issues/1060?journal_id=3000
2009-02-03T11:51:22Z
cfis (Charlie Savage)
<ul></ul><p>=begin</p>
<blockquote>
<p>At Tue, 27 Jan 2009 17:36:44 +0900,<br>
Charlie Savage wrote in <a href="https://blade.ruby-lang.org/ruby-core/21603">[ruby-core:21603]</a>:</p>
<blockquote>
<p>The problem is that mkmf calls Kernel::Sytem, which runs<br>
commands in a subshell, which I'm going to guess is windows<br>
command.exe. That of course breaks the build because paths<br>
such as /usr/local/include no longer work.</p>
</blockquote>
<p>try `RUBYSHELL=/bin/bash make'.</p>
</blockquote>
<p>Ah. Fantastic, thanks.</p>
<p>Charlie</p>
<p>Attachment: smime.p7s<br>
=end</p>