https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112010-02-17T20:34:32ZRuby Issue Tracking SystemBackport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83292010-02-17T20:34:32Zluislavena (Luis Lavena)luislavena@gmail.com
<ul></ul><p>=begin<br>
Hello Christian,</p>
<p>You're using MinGW and providing a MSYS/Cygwin PATH to an existing version. MinGW != MSYS path, you should be using standard Windows path for it.</p>
<p>Did you by chance tried RubyInstaller building recipes?</p>
<p>It is hosted on GitHub:</p>
<p><a href="http://github.com/oneclick/rubyinstaller" class="external">http://github.com/oneclick/rubyinstaller</a></p>
<p>--<br>
Luis Lavena</p>
<p>=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83402010-02-18T20:09:01Zsirk390 (Christian Bodt)sirk390@gmail.com
<ul></ul><p>=begin<br>
Hi Luis,</p>
<p>Thanks for your help,<br>
Could you tell me if I understood correctly what 'windows path' you mean? I am using msys+mingw and the standard bash shell to compile.</p>
<p>Folling your advice, I tried running the command (as in configue.in line 22) :<br>
"RUBYOPT=- 'c:\Programs\ruby-1.9\bin\ruby.exe' -e 'p 42'"</p>
<p>It fails in the same way as before (c:\Programs\ruby-1.9\bin\ruby.exe: invalid switch in RUBYOPT: -C (RuntimeError)).</p>
<p>The following fails also:</p>
<blockquote>
<p>export RUBYOPT=-<br>
ruby.exe -e 'p 42'<br>
c:\Programs\ruby-1.9\bin\ruby.exe: invalid switch in RUBYOPT: -C (RuntimeError)</p>
</blockquote>
<p>Using the windows "cmd.exe" shell, the - option seems to be accepted:</p>
<blockquote>
<p>set RUBYOPT=-<br>
ruby.exe -e 'p 42'<br>
42</p>
</blockquote>
<p>I think I will try RubyInstaller :) It sound quite simple.</p>
<p>Thanks a lot,<br>
Christian</p>
<p>=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83412010-02-18T20:54:29Zhgs (Hugh Sasse)hgs@dmu.ac.uk
<ul></ul><p>=begin<br>
What happens if you change the command line, rather<br>
than the RUBYOPT line:</p>
<p>./configure --with-baseruby='c:\Programs\ruby-1.9\bin\ruby.exe'</p>
<p>(I've never tried this, so don't know if it will work, it just seems to be in line with what Luis described, given yours didn't work.)</p>
<p>HTH, Hugh<br>
=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83422010-02-18T22:34:05Zsirk390 (Christian Bodt)sirk390@gmail.com
<ul></ul><p>=begin<br>
Hi,</p>
<p>I just tried it and it fails in the same way : 'executable host ruby is required. use --with-baseruby option.' during make.</p>
<p>The "RUBYOPT line" test is my isolation of that problem.</p>
<p>$ ./configure --with-baseruby='c:\Programs\ruby-1.9\bin\ruby.exe'<br>
(...)<br>
configure: creating ./config.status<br>
config.status: creating GNUmakefile<br>
config.status: creating Makefile</p>
<p>$ make<br>
gcc -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-<br>
strings -Wno-long-long -I. -I.ext/include/i386-mingw32 -I./include -I. -DRUBY_EX<br>
PORT -o main.o -c main.c<br>
gcc -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-<br>
strings -Wno-long-long -I. -I.ext/include/i386-mingw32 -I./include -I. -DRUBY_EX<br>
PORT -o dln.o -c dln.c<br>
gcc -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-<br>
strings -Wno-long-long -I. -I.ext/include/i386-mingw32 -I./include -I. -DRUBY_EX<br>
PORT -o dmydln.o -c dmydln.c<br>
gcc -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-<br>
strings -Wno-long-long -I. -I.ext/include/i386-mingw32 -I./include -I. -DRUBY_EX<br>
PORT -o dmyencoding.o -c dmyencoding.c<br>
gcc -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-<br>
strings -Wno-long-long -I. -I.ext/include/i386-mingw32 -I./include -I. -DRUBY_EX<br>
PORT -o version.o -c version.c<br>
gcc -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-<br>
strings -Wno-long-long -I. -I.ext/include/i386-mingw32 -I./include -I. -DRUBY_EX<br>
PORT -o dmyversion.o -c dmyversion.c<br>
echo executable host ruby is required. use --with-baseruby option.; false -I. .<br>
/tool/compile_prelude.rb ./prelude.rb miniprelude.c<br>
executable host ruby is required. use --with-baseruby option.<br>
make: *** [miniprelude.c] Error 1</p>
<p>=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83442010-02-18T22:38:48Zluislavena (Luis Lavena)luislavena@gmail.com
<ul></ul><p>=begin<br>
Christian,</p>
<p>Please indicate which source package of 1.9.1 are you using (and where you downloaded) in case was subversion, check if you have the latest release.</p>
<p>If using Subversion, also try with 1.9.2 (trunk) and see if the problem persist there.</p>
<p>A recommendation: if you have ruby in the path, baseruby will be determined automatically, no need to indicate it, only if you want to use a different ruby version than the one available in the system.</p>
<p>Second, please try this format to path:</p>
<p>./configure --with-baseruby="C:/Foo/Bar/Ruby-1.9/bin/ruby.exe"</p>
<p>And also verify that "Programs" is actually programs and not Program Files ;-)</p>
<a name="Good-luck"></a>
<h2 >Good luck,<a href="#Good-luck" class="wiki-anchor">¶</a></h2>
<p>Luis Lavena</p>
<p>=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83462010-02-19T00:16:48Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>=begin<br>
It's an issue of msys shell or the runtime library.<br>
Seems the first slash was mistakenly converted to a hyphen, as an option switch.<br>
=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83472010-02-19T00:17:10Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Rejected</i> to <i>Third Party's Issue</i></li></ul><p>=begin</p>
<p>=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83482010-02-19T00:32:10Zhgs (Hugh Sasse)hgs@dmu.ac.uk
<ul></ul><p>=begin<br>
That suggests something along the lines of:</p>
<p>./configure --with-baseruby=/c/Programs/ruby-1.9/bin/</p>
<p>or with maybe just one backslash might work....<br>
=end</p> Backport191 - Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is usedhttps://bugs.ruby-lang.org/issues/2750?journal_id=83492010-02-19T04:06:04Zsirk390 (Christian Bodt)sirk390@gmail.com
<ul></ul><p>=begin<br>
Yes, I agree it's an msys or runtime library issue.<br>
The following program shows the consequences on the RUBYOPT variable:</p>
<hr>
<p>#include <stdio.h></p>
<p>int main(int argc, char**argv)<br>
{<br>
printf("%s", getenv("RUBYOPT"));<br>
}</p>
<hr>
<blockquote>
<p>gcc main.c<br>
RUBYOPT=- a.exe<br>
-C:/Programs/msys1.0/r<br>
RUBYOPT=ABC a.exe<br>
ABC</p>
</blockquote>
<hr>
<p>Note: It doesn't seem to happen when current directory in top level or first level.</p>
<p>Thanks a lot,<br>
Christian</p>
<p>=end</p>