From ce8a8c101a2864faeeae380cd06308a7ad50fdce Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 10 Dec 2018 00:05:43 +0000 Subject: Remove unnecessary require of fileutils MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Today I updated my ruby core clone, and I run the usual steps to compile ruby. When running "make", I run into the following error: ``` (... stuff ...) encdb.h unchanged Traceback (most recent call last): 5: from ./tool/mkconfig.rb:19:in `
' 4: from ./tool/mkconfig.rb:19:in `require' 3: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `' 2: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `require' 1: from /home/deivid/Code/ruby/rbconfig.rb:11:in `' /home/deivid/Code/ruby/rbconfig.rb:13:in `': ruby lib version (2.5.0) doesn't match executable version (2.6.0) (RuntimeError) uncommon.mk:780: recipe for target '.rbconfig.time' failed make: *** [.rbconfig.time] Error 1 ``` Apparently, the script that generates the root `rbconfig.rb` file requires `fileutils`, which in turn requires 'rbconfig' (for mjit-headers it says in a comment), which uses the `rbconfig.rb` config file in the root folder if it exists. In my case, this file existed but had been generated on 2.5.0, thus causing the error. I think we can avoid this sort of circular dependency by not requiring `fileutils`, since it does not seem to be used anywhere in the `tool/mkconfig.rb` script since r55338. [Fix GH-2045] From: David Rodríguez git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/mkconfig.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'tool') diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index e9bedc6e44..5da0e7da5a 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -16,7 +16,6 @@ version = $version or raise "missing -version" srcdir = File.expand_path('../..', __FILE__) $:.unshift(".") -require "fileutils" mkconfig = File.basename($0) fast = {'prefix'=>true, 'ruby_install_name'=>true, 'INSTALL'=>true, 'EXEEXT'=>true} -- cgit v1.2.3