From: erik@... Date: 2020-05-10T15:58:08+00:00 Subject: [ruby-core:98251] [Ruby master Bug#16845] Building Ruby with system Ruby 1.8.7 results in make failing due to syntax error in ./tool/lib/vcs.rb Issue #16845 has been updated by ErikSwan (Erik Swan). File ruby_build_error_with_-p.log added Maybe I am missing something, but I get the same result with `-p`. Log is attached. The `tar` manpage suggests `-p` is about preserving permissions, not timestamps. And it looks like the timestamps are preserved even if I don't use the `-p` option: ``` 09:56 AM [eswan@rndssh1(RnD):/tmp/eswan]$ tar -xJf ruby-2.7.1.tar.xz 09:56 AM [eswan@rndssh1(RnD):/tmp/eswan]$ ll ruby-2.7.1/ | head total 12M -rw-r--r-- 1 eswan eswan 2.1K Mar 31 04:44 aclocal.m4 -rw-r--r-- 1 eswan eswan 71K Mar 31 04:44 addr2line.c -rw-r--r-- 1 eswan eswan 442 Mar 31 04:44 addr2line.h -rw-r--r-- 1 eswan eswan 3.8K Mar 31 04:44 appveyor.yml -rw-r--r-- 1 eswan eswan 179K Mar 31 04:44 array.c -rw-r--r-- 1 eswan eswan 22K Mar 31 04:44 ast.c -rw-r--r-- 1 eswan eswan 4.5K Mar 31 04:44 ast.rb -rw-r--r-- 1 eswan eswan 1.8K Mar 31 04:44 ast.rbinc drwxr-xr-x 2 eswan eswan 4.0K Mar 31 04:44 basictest/ ``` ---------------------------------------- Bug #16845: Building Ruby with system Ruby 1.8.7 results in make failing due to syntax error in ./tool/lib/vcs.rb https://bugs.ruby-lang.org/issues/16845#change-85491 * Author: ErikSwan (Erik Swan) * Status: Open * Priority: Normal * ruby -v: 2.7.1 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Hello, I am trying to build Ruby 2.7.1 from source on a RHEL 6.9 system, which has ruby 1.8.7 as the existing system Ruby. When I run `make`, I get an error about a syntax error in `./tool/lib/vcs.rb`, which is called by `./tool/file2lastrev.rb`. I am guessing this is because `vcs.rb` uses Ruby syntax that was introduced in a newer Ruby version, and is not valid in 1.8.7, resulting in a runtime error. Here is a snippet of the error: ``` ./tool/file2lastrev.rb:10:in `require': /tmp/eswan/ruby-2.7.1/tool/lib/vcs.rb:471: syntax error, unexpected ',', expecting ']' (SyntaxError) last = cmd_read_at(srcdir, [[*gitcmd, 'rev-parse', ref]]).rstrip ^ /tmp/eswan/ruby-2.7.1/tool/lib/vcs.rb:471: syntax error, unexpected ',', expecting kEND ``` # Steps to reproduce: 1. Obtain a RHEL 6.8 or 6.9 system (this is also reproducible on 6.8, and might be reproducible on all 6.x) 2. Confirm `/usr/bin/ruby --version` reports Ruby 1.8.7. 3. Download and extract the Ruby 2.7.1 source archive. 4. Run `./configure` 5. Run `./make` # Expected behavior: `make` should run correctly without any errors. # Actual behavior: The Makefile errors out when trying to run `./tool/file2lastrev.rb` with the existing system Ruby. A shell log showing steps to reproduce and the output of `configure` and `make` is attached. ---Files-------------------------------- ruby_build_error.log (573 KB) ruby_build_error_with_-p.log (572 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: