Project

General

Profile

Actions

Bug #8432

closed

make install ruby 2.0.0 fails with undefined method `sub!'

Added by AndrewCPaterson (Andrew Paterson) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
Backport:
[ruby-core:55101]

Description

./tool/rbinstall.rb:468 is trying to reference shebang.sub! on command scripts destined for /usr/local/bin and that's failing.

Steps:
./configure --host="arm-xilinx-linux-gnueabi"
make
make install DESTDIR=../newramdisk_mnt
...
ruby --disable=gems -I/export/sata/home/apaterson/Xara/z_ZedBoard_Linux_sw/ruby-2.0.0-p0 -rarm-linux-eabi-fake ./tool/rbinstall.rb --make="make" --dest-dir="../newramdisk_mnt" --extout=".ext" --mflags="" --make-flags="DESTDIR=../newramdisk_mnt" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --install=all --rdoc-output=".ext/rdoc"
installing binary commands: /usr/local/bin
installing base libraries: /usr/local/lib
installing arch files: /usr/local/lib/ruby/2.0.0/arm-linux-eabi
installing pkgconfig data: /usr/local/lib/pkgconfig
installing extension objects: /usr/local/lib/ruby/2.0.0/arm-linux-eabi
installing extension objects: /usr/local/lib/ruby/site_ruby/2.0.0/arm-linux-eabi
installing extension objects: /usr/local/lib/ruby/vendor_ruby/2.0.0/arm-linux-eabi
installing extension headers: /usr/local/include/ruby-2.0.0/arm-linux-eabi
installing extension scripts: /usr/local/lib/ruby/2.0.0
installing extension scripts: /usr/local/lib/ruby/site_ruby/2.0.0
installing extension scripts: /usr/local/lib/ruby/vendor_ruby/2.0.0
installing extension headers: /usr/local/include/ruby-2.0.0/ruby
installing rdoc: /usr/local/share/ri/2.0.0/system
installing capi-docs: /usr/local/share/doc/ruby
installing command scripts: /usr/local/bin
./tool/rbinstall.rb:468:in block (2 levels) in <main>': undefined method sub!' for nil:NilClass (NoMethodError)
from ./tool/rbinstall.rb:248:in block in install_recursive' from ./tool/rbinstall.rb:242:in each'
from ./tool/rbinstall.rb:242:in install_recursive' from ./tool/rbinstall.rb:456:in block in '
from ./tool/rbinstall.rb:758:in call' from ./tool/rbinstall.rb:758:in block (2 levels) in '
from ./tool/rbinstall.rb:755:in each' from ./tool/rbinstall.rb:755:in block in '
from ./tool/rbinstall.rb:751:in each' from ./tool/rbinstall.rb:751:in '
make: *** [do-install-all] Error 1

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

  • Category changed from platform/linux to build
  • Status changed from Open to Feedback

It probably occurs when an empty file exists under bin directory.
Do you have it?

Updated by AndrewCPaterson (Andrew Paterson) almost 11 years ago

There are no empty files in the bin directory:

[apaterson@xerxes ruby-2.0.0]$ ls -l bin
total 52
drwxr-xr-x 3 apaterson apaterson 4096 May 22 05:03 ./
drwxr-xr-x 28 apaterson apaterson 12288 May 22 05:47 ../
drwxrwxr-x 2 apaterson apaterson 4096 May 22 05:03 CVS/
-rwxr-xr-x 1 apaterson apaterson 4397 Apr 2 2010 erb*
-rwxr-xr-x 1 apaterson apaterson 546 Mar 7 2011 gem*
-rwxrwxr-x 1 apaterson apaterson 316 May 22 00:43 irb*
-rwxr-xr-x 1 apaterson apaterson 1320 Nov 15 2012 rake*
-rwxr-xr-x 1 apaterson apaterson 938 Nov 26 23:28 rdoc*
-rwxr-xr-x 1 apaterson apaterson 188 Jul 30 2011 ri*
-rwxr-xr-x 1 apaterson apaterson 78 Nov 3 2012 testrb*

Updated by AndrewCPaterson (Andrew Paterson) almost 11 years ago

The problem is still present in p195

Updated by AndrewCPaterson (Andrew Paterson) almost 11 years ago

It is because there is a zero length file in a subdirectory under bin. There needs to be protection against this in rbinstall.rb

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

AndrewCPaterson (Andrew Paterson) wrote:

drwxrwxr-x 2 apaterson apaterson 4096 May 22 05:03 CVS/

Why is there CVS directory?

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

  • Priority changed from Normal to 3
Actions #7

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

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

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


rbinstall.rb: reject empty files

  • tool/rbinstall.rb (install_recursive): add maxdepth option.
  • tool/rbinstall.rb (bin-comm): limit depth of bindir and reject empty
    files. [ruby-core:55101] [Bug #8432]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0