https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112010-05-15T12:07:07ZRuby Issue Tracking SystemRuby 1.8 - Bug #3299: revision.h rule in common.mk is broken for MSVChttps://bugs.ruby-lang.org/issues/3299?journal_id=110322010-05-15T12:07:07Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>=begin<br>
This issue was solved with changeset r27798.<br>
Romulo, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<p>=end</p> Ruby 1.8 - Bug #3299: revision.h rule in common.mk is broken for MSVChttps://bugs.ruby-lang.org/issues/3299?journal_id=110582010-05-17T00:00:46Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>=begin<br>
Sorry Nobuyoshi, but now (after commit r27799) ruby doesn't compile anymore:</p>
<pre><code> cl -nologo -MD -O2b2xty- -DRUBY_EXPORT -I. -I. -I./missing -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -c -Tcversion.c
</code></pre>
<p>version.c<br>
version.c(45) : error C2229: struct '' has an illegal zero-sized array<br>
NMAKE : fatal error U1077: '"C:\Arquivos de programas\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'<br>
Stop.</p>
<p>Somehow the new rules are generating an empty revision.h. Also, the sed statement still has improperly escaped characters and fails on Windows (this was tested separately, not through the Makefile). I don't think it's possible to have the sed expressions escaped correctly for both Windows and Posix systems (due to different semantics of characteres ' and " in both platforms). That's why I proposed moving the expressions to a separate file.<br>
=end</p> Ruby 1.8 - Bug #3299: revision.h rule in common.mk is broken for MSVChttps://bugs.ruby-lang.org/issues/3299?journal_id=110592010-05-17T01:00:15Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>At Mon, 17 May 2010 00:00:46 +0900,<br>
Romulo Ceccon wrote in <a href="https://blade.ruby-lang.org/ruby-core/30268">[ruby-core:30268]</a>:</p>
<blockquote>
<p>Sorry Nobuyoshi, but now (after commit r27799) ruby doesn't compile anymore:</p>
</blockquote>
<p>Fixed.</p>
<blockquote>
<p>Somehow the new rules are generating an empty<br>
revision.h. Also, the sed statement still has improperly<br>
escaped characters and fails on Windows (this was tested<br>
separately, not through the Makefile).</p>
</blockquote>
<p>It works fine with cygwin sed for me, what version of sed do<br>
you use?</p>
<blockquote>
<p>That's why I proposed moving the expressions to a separate<br>
file.</p>
</blockquote>
<p>Note that : is a label, not a matching address.</p>
<p>--<br>
Nobu Nakada</p>
<p>=end</p> Ruby 1.8 - Bug #3299: revision.h rule in common.mk is broken for MSVChttps://bugs.ruby-lang.org/issues/3299?journal_id=110602010-05-17T02:08:15Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>=begin</p>
<blockquote>
<p>It works fine with cygwin sed for me, what version of sed do<br>
you use?</p>
</blockquote>
<p>I use the version from <a href="http://gnuwin32.sourceforge.net" class="external">http://gnuwin32.sourceforge.net</a> (Sed-4.2). But the likely problem is that you're testing under a Cygwin shell, while I'm testing from the native Windows shell (cmd.exe). So the sed command line works for you, but not for me. For example, the first expression ('/^URL:/{') is understood by the Cygwin shell as a quoted string, and sed receives /^URL:/{ (without quotes) as the argument. Cmd.exe does not interpret ' as a special character, so it passes '/^URL:/{' (with quotes) as the argument to sed. Sed.exe then fails with:</p>
<p>sed: -e expression #1, character 1: unknown command: ''' [translated from Portuguese]</p>
<p>Replacing ' by " would be enough if the third expression didn't have a " inside. I couldn't come up with an inline string which would work in both Windows and Posix systems. (Well, actually I did come up with one, but it worked only when executed from the shell, and not through the Makefile. At that point I thought that adding an additional layer of character escaping (to satisfy make/nmake rules) would make the expressions unreadable.) So I moved them to a separate file.</p>
<p>=end</p> Ruby 1.8 - Bug #3299: revision.h rule in common.mk is broken for MSVChttps://bugs.ruby-lang.org/issues/3299?journal_id=110932010-05-19T02:42:27Zromuloceccon (Rômulo Ceccon)
<ul></ul><p>=begin<br>
Now (r27854) the makefile looks correct on Windows and Linux. Thank you, Nobu.</p>
<p>However, invoking "autoconf & ./configure & make" (or "win32\configure & nmake" on Windows) produces an empty revision.h. I guess this is as designed? How am I supposed to generate revision.h so that a "ruby -v" will return something like "ruby 1.8.8dev (2010-05-16 ruby_1_8 27854) [...]"?</p>
<p>=end</p>