From: hsbt@... Date: 2018-02-08T00:22:09+00:00 Subject: [ruby-core:85471] [Ruby trunk Bug#14457] --jit outputs error when script changes $TMPDIR Issue #14457 has been updated by hsbt (Hiroshi SHIBATA). Assignee set to k0kubun (Takashi Kokubun) Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: DONTNEED, 2.4: DONTNEED, 2.5: DONTNEED I also confirmed to fix my error report. ---------------------------------------- Bug #14457: --jit outputs error when script changes $TMPDIR https://bugs.ruby-lang.org/issues/14457#change-70263 * Author: k0kubun (Takashi Kokubun) * Status: Closed * Priority: Normal * Assignee: k0kubun (Takashi Kokubun) * Target version: 2.6 * ruby -v: ruby 2.6.0dev (2018-02-07 trunk 62260) [x86_64-linux] * Backport: 2.3: DONTNEED, 2.4: DONTNEED, 2.5: DONTNEED ---------------------------------------- Shibata-san reported the following output when running bundler's test with --jit (it looks implicitly passed). ~~~ ~/D/g/b/bundler (master) > rspec spec/resolver/basic_spec.rb Run options: exclude {:bundler=>"=< 2.0", :rubygems_master=>true, :git=>"=< 2.16.1", :rubygems=>"=< 2.7.3", :ruby=>"=< 2.6.0", :realworld=>true, :sudo=>true} Resolving error: unable to open output file '/Users/hsbt/Documents/github.com/bundler/bundler/tmp/tmpdir/_ruby_mjitp36578u588-067cfe.o': 'No such file or directory' 1 error generated. resolves a single gem resolves a gem with dependencies resolves a conflicting index resolves a complex conflicting index resolves a index with conflict on child prefers explicitly requested dependencies when resolving an index which would otherwise be ambiguous prefers non-prerelease resolutions in sort order resolves a index with root level conflict on child resolves a gem specified with a pre-release version doesn't select a pre-release if not specified in the Gemfile error: unable to rename temporary '/Users/hsbt/Documents/github.com/bundler/bundler/tmp/tmpdir/_ruby_mjitp36578u581-0e0a36.o-fb2ebbf9' to output file '/Users/hsbt/Documents/github.com/bundler/bundler/tmp/tmpdir/_ruby_mjitp36578u581-0e0a36.o': 'No such file or directory' 1 error generated. doesn't select a pre-release for sub-dependencies selects a pre-release for sub-dependencies if it's the only option raises an exception if a child dependency is not resolved raises an exception with the minimal set of conflicting dependencies should throw error in case of circular dependencies should install the latest possible version of a direct requirement with no constraints given error: unable to rename temporary '/Users/hsbt/Documents/github.com/bundler/bundler/tmp/tmpdir/_ruby_mjitp36578u21-cdf150.o-5817670c' to output file '/Users/hsbt/Documents/github.com/bundler/bundler/tmp/tmpdir/_ruby_mjitp36578u21-cdf150.o': 'No such file or directory' 1 error generated. should install the latest possible version of a direct requirement with constraints given takes into account required_ruby_version conservative resolves all gems to latest patch resolves all gems to latest patch strict resolves foo only to latest patch - same dependency case resolves foo only to latest patch - changing dependency not declared case resolves foo only to latest patch - changing dependency declared case resolves foo only to latest patch strict resolves bar only to latest patch resolves all gems to latest minor resolves all gems to latest minor strict resolves all gems to latest major resolves all gems to latest major strict revert to previous could revert to a previous version level patch cannot revert to a previous version in strict mode level patch could revert to a previous version level minor error: unable to rename temporary '/Users/hsbt/Documents/github.com/bundler/bundler/tmp/tmpdir/_ruby_mjitp36578u29-1ac956.o-5abdcabb' to output file '/Users/hsbt/Documents/github.com/bundler/bundler/tmp/tmpdir/_ruby_mjitp36578u29-1ac956.o': 'No such file or directory' cannot revert to a previous version in strict mode level minor 1 error generated. Retried examples: 0 Finished in 1.97 seconds (files took 0.74158 seconds to load) 33 examples, 0 failures ~/D/g/b/bundler (master) > ~~~ The cause is that bundler's test is modifying $TMPDIR and gcc (or probably clang in the above example) is affected by it. We should call execvpe with TMPDIR=/tmp (and PATH=xxx for cc1, etc.) instead of execvp to start compiler process. I'm not sure about what other environment variables are needed when we spawn the compiler process. -- https://bugs.ruby-lang.org/ Unsubscribe: