Backport #6807

Can't compile ruby without ruby

Added by Paul Sherwood over 1 year ago. Updated about 1 year ago.

[ruby-core:46832]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga

Description

=begin
=== What happened:
I tried to compile on a new Linux systems (Ubuntu 12.04 and a current custom Linux build)
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.

This is a repeat of bug #3008, which was closed a couple of years ago. I tried checking out at the exact commit that fixed #3008 and got the same result, so I'm thinking either something has changed outside of ruby since the fix, or possibly the fix never worked for Linux (the comment in the commit says ...for HP UX")?

There are no docs for how to get around this. How can I get ruby on a system if I can't compile ruby?
=end


Related issues

Duplicated by ruby-trunk - Bug #7943: Can't build from source or snapshots without pre-existing... Rejected 02/24/2013

Associated revisions

Revision 39705
Added by Tomoyuki Chikanaga about 1 year ago

merge revision(s) 39492: [Backport #6807]

* common.mk (realclean-local): miniprelude.c is made by srcs, so it
  should not removed by distclean but by realclean.  [Bug #6807]

History

#1 Updated by Luis Lavena over 1 year ago

AFAIK, if you build from trunk (a direct checkout) you need Ruby.

Release packages do not need a base Ruby since the specific files that depend on installed Ruby has already been generated and packaged in the file.

Perhaps you can try the nightly snapshots which I believe meet this scenario.

From download page:

http://www.ruby-lang.org/en/downloads/

Downloaded http://ftp.ruby-lang.org/pub/ruby/snapshot.tar.gz

That should work without an installed Ruby.

#2 Updated by Yusuke Endoh over 1 year ago

  • Status changed from Open to Rejected

Please follow Luis's advice, and reopen if you find another issue. Thanks.

Yusuke Endoh mame@tsg.ne.jp

#3 Updated by Paul Sherwood about 1 year ago

I'd like to reopen this, but I don't see how to do that. I'll raise a new one.

On a Linux system with autotools, GCC etc,
but no pre-existing Ruby, make fails for the following snapshots:

http://ftp.ruby-lang.org/pub/ruby/snapshot.tar.gz
http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz

#4 Updated by Luis Lavena about 1 year ago

  • Category set to build
  • Status changed from Rejected to Assigned
  • Assignee set to Yusuke Endoh
  • Target version set to 2.0.0

#5 Updated by Luis Lavena about 1 year ago

  • Priority changed from Low to Normal

#6 Updated by Luis Lavena about 1 year ago

=begin
Reported error:

make
CC = gcc
LD = ld
LDSHARED =
CFLAGS =
XCFLAGS = -include ruby/config.h -include ruby/missing.h -DFORTIFYSOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBYEXPORT -fPIE
CPPFLAGS = -I. -I.ext/include/x86
64-linux -I./include -I.
DLDFLAGS = -fstack-protector -pie

SOLIBS =
generating miniprelude.c
executable host ruby is required. use --with-baseruby option.
uncommon.mk:900: recipe for target `miniprelude.c' failed
make: *** [miniprelude.c] Error 1

=end

#7 Updated by Paul Sherwood about 1 year ago

Sorry, Luis, I crossed with you - please feel free to close the new bug

On 24/02/2013 13:41, luislavena (Luis Lavena) wrote:

Issue #6807 has been updated by luislavena (Luis Lavena).

Category set to build
Status changed from Rejected to Assigned
Assignee set to mame (Yusuke Endoh)
Target version set to 2.0.0


Bug #6807: Can't compile ruby without ruby
https://bugs.ruby-lang.org/issues/6807#change-36925

Author: devcurmudgeon (Paul Sherwood)
Status: Assigned
Priority: Low
Assignee: mame (Yusuke Endoh)
Category: build
Target version: 2.0.0
ruby -v: current trunk

=begin
What happened:
I tried to compile on a new Linux systems (Ubuntu 12.04 and a current custom Linux build)
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.

This is a repeat of bug 3008, which was closed a couple of years ago. I tried checking out at the exact commit that fixed 3008 and got the same result, so I'm thinking either something has changed outside of ruby since the fix, or possibly the fix never worked for Linux (the comment in the commit says ...for HP UX")?

There are no docs for how to get around this. How can I get ruby on a system if I can't compile ruby?
=end

#8 Updated by Yusuke Endoh about 1 year ago

  • Status changed from Assigned to Feedback

Could you elaborate what you did exactly?

I could not reproduce it with a Ubuntu 12.10 sandbox created by debootstrap.

$ sudo debootstrap --arch amd64 quantal /srv/ubuntu http://archive.ubuntu.com/ubuntu
$ sudo cp ruby-2.0.0-p0.tar.bz2 /srv/ubuntu/tmp
$ sudo cp /etc/apt/sources.list /srv/ubuntu/etc/apt
$ sudo chdoor /srv/ubuntu
# apt-get install autoconf make gcc
# cd /tmp
# tar xjf ruby-2.0.0-p0.tar.bz2
# cd /ruby-2.0.0-p0
# ruby # ruby: command not found
# ./configure
# make # succeeded

Yusuke Endoh mame@tsg.ne.jp

#9 Updated by Paul Sherwood about 1 year ago

I'm working on a custom Linux appliance build, in a chroot, so it is possible the problem is at my end. I'll follow your steps when I have access to an Ubuntu machine and update then

Thank you
Paul

#10 Updated by Nobuyoshi Nakada about 1 year ago

  • Description updated (diff)

#11 Updated by Nobuyoshi Nakada about 1 year ago

  • % Done changed from 100 to 0

#12 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

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


common.mk: clean miniprelude.c

  • common.mk (realclean-local): miniprelude.c is made by srcs, so it should not removed by distclean but by realclean. [Bug #6807]

#13 Updated by Nobuyoshi Nakada about 1 year ago

The only situation which we could thought of was that you did make distclean' beforemake'.

If it's not the case, please reopen this ticket.

#14 Updated by Nobuyoshi Nakada about 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Category deleted (build)
  • Status changed from Closed to Assigned
  • Assignee changed from Yusuke Endoh to Tomoyuki Chikanaga
  • Target version deleted (2.0.0)

#15 Updated by Tomoyuki Chikanaga about 1 year ago

  • Status changed from Assigned to Closed

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


merge revision(s) 39492: [Backport #6807]

* common.mk (realclean-local): miniprelude.c is made by srcs, so it
  should not removed by distclean but by realclean.  [Bug #6807]

Also available in: Atom PDF