Forum: Ruby-core [Bug #3008] Can't compile ruby without ruby

C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 Christian Höltje (Guest)
on 2010-03-24 17:42
(Received via mailing list)
Bug #3008: Can't compile ruby without ruby
http://redmine.ruby-lang.org/issues/show/3008

Author: Christian Höltje
Status: Open, Priority: Immediate
Category: build
ruby -v: 1.9.1-p376

What happened:
 I tried to compile ruby 1.9.1-p376 on a new unix system(s). (Linux and
Solaris).
 I get the error:
executable host ruby is required. use --with-baseruby option.
make: *** [miniprelude.c] Error 1

What I expected:
 I expect that ruby should compile.

There are no docs for how to get around this.  How can I get ruby on a
system if I can't compile ruby?
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 Yusuke Endoh (Guest)
on 2010-03-24 18:02
(Received via mailing list)
Issue #3008 has been updated by Yusuke Endoh.

Status changed from Open to Rejected

Hi,

2010/3/25 Christian Holtje <redmine@ruby-lang.org>:
> I tried to compile ruby 1.9.1-p376 on a new unix system(s). (Linux and Solaris).
> I get the error:
> executable host ruby is required. use --with-baseruby option.
> make: *** [miniprelude.c] Error 1

Yes, compiling trunk requires ruby to preprocess and generate code.


> How can I get ruby on a system if I can't compile ruby?

Please build and install tarball package first.  It does not require
ruby to be built.

ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.bz2

--
Yusuke ENDOH <mame@tsg.ne.jp>
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3008
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 Christian Höltje (Guest)
on 2010-03-24 19:07
(Received via mailing list)
Issue #3008 has been updated by Christian Höltje.


I'm not using "trunk".

I'm using ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p376.tar.bz2
                                                                                                                    ^

I just re-downloaded it to compare and it is exactly the same source
code.

I'll try p378 and see if that fixes it.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3008
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 Christian Höltje (Guest)
on 2010-03-24 19:50
(Received via mailing list)
Issue #3008 has been updated by Christian Höltje.


Okay.  It seems the problem was that my sources didn't have their proper
timestamps.  I worked around this by adding this step *prior* to running
configure && make && make install

This "fixes" the timestamps for the files that would require ruby to be
pre-installed.  It also prevents autotools from trying to run again.

touch \
    .revision.time \
    ChangeLog \
    configure \
    enc/trans/big5.c \
    enc/trans/chinese.c \
    enc/trans/escape.c \
    enc/trans/gb18030.c \
    enc/trans/gbk.c \
    enc/trans/iso2022.c \
    enc/trans/japanese.c \
    enc/trans/japanese_euc.c \
    enc/trans/japanese_sjis.c \
    enc/trans/korean.c \
    enc/trans/newline.c \
    enc/trans/single_byte.c \
    enc/trans/utf_16_32.c \
    encdb.h \
    ext/ripper/eventids1.c \
    ext/ripper/eventids2table.c \
    ext/ripper/ripper.c \
    ext/ripper/ripper.y \
    ext/ripper/y.output \
    golf_prelude.c \
    insns.inc \
    insns_info.inc \
    known_errors.inc \
    lex.c \
    miniprelude.c \
    newline.c \
    node_name.inc \
    opt_sc.inc \
    optinsn.inc \
    optunifs.inc \
    parse.c \
    parse.h \
    revision.h \
    string.c \
    transdb.h \
    version.h \
    vm.inc \
    vmtc.inc
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3008
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 caleb clausen (Guest)
on 2010-03-24 19:52
(Received via mailing list)
Issue #3008 has been updated by caleb clausen.


Some of the ruby 1.9 build scripts are written in ruby. So, you must
have an existing ruby already in order to build ruby 1.9. I had thought
that the usual workaround was to build a ruby 1.8 release first (which
doesn't have this restriction) and then use that to bootstrap 1.9. (I
think perhaps Yusuke misspoke when he pointed you at a 1.9
tarball.....?)

This is a known limitation of ruby 1.9. It's not a terribly happy
situation, but its not likely to be fixed soon either.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3008
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 Jonathan Nielsen (Guest)
on 2010-03-24 19:55
(Received via mailing list)
Issue #3008 has been updated by Jonathan Nielsen.


I have built ruby 1.9.1 (p376 and p378) on several computers without an
existing ruby interpreter.  It has always successfully built a
'miniruby' to interpret scripts in the build process when I have used
it.  I have done this successfully in Cygwin, Ubuntu Linux and Debian
Linux.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3008
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 Nobuyoshi Nakada (Guest)
on 2010-03-24 20:47
(Received via mailing list)
Issue #3008 has been updated by Nobuyoshi Nakada.

Status changed from Open to Closed
% Done changed from 0 to 100

This issue was solved with changeset r27037.
Christian, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

----------------------------------------
http://redmine.ruby-lang.org/issues/show/3008
16e5c1033f342d45d131f98f94b2dc6b?d=identicon&s=25 Moru (Guest)
on 2010-04-18 18:00
(Received via mailing list)
This ticket is closed but I got a same error when I compiled ruby
which version is newest, ruby-1.9.1-p378, on my linux box.
And both bz2 and gzip was same. As he said, touch changed timestamp of
some files and then all phases done clearly, no errors.

Environment
  * Linux:
  > uname -a
  Linux linux-l8m3 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16
21:25:39 +0100 x86_64 x86_64 x86_64 GNU/Linux

  * CC: gcc version 4.4.1 [gcc-4_4-branch revision 150839] (SUSE Linux)

  * make:  GNU Make 3.81

  * ruby: ruby-1.9.1-p378

--
Moru
9233950674b793e7d3d77bb219baaa52?d=identicon&s=25 Joe A. (joe_a23)
on 2012-12-12 03:40
$ uname -a
Linux atz-VirtualBox 3.5.0-19-generic #30-Ubuntu SMP Tue Nov 13 17:49:53
UTC 2012 i686 i686 i686 GNU/Linux


Bug still evidenced on fresh Ubuntu 12.10 Desktop with ruby source
versions: 1.9.1.431 and 1.9.3.327

"make miniruby" fails with the same error, so that is not a solution.

I recommend reopening this ticket.
This topic is locked and can not be replied to.