Bug #4455

rubygem's test fails when source directory and build directory differ

Added by Yui NARUSE about 3 years ago. Updated almost 3 years ago.

[ruby-dev:43282]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
Category:lib
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-03-01 trunk 30998) [x86_64-freebsd8.2] Backport:

Description

=begin
In lib/rubygems/testcase.rb, it sets @projectdir as Dir.pwd.
But the use cases of @project_dir are both top of source and build directory.
It breaks when they differ.

This happens when:

cd $HOME
mkdir bin-ruby
svn co http://svn.ruby-lang.org/repos/ruby/trunk src-ruby
cd ruby
autoconf
mkdir ../build-ruby
cd ../build-ruby
../ruby/configure --prefix=$HOME/bin-ruby
make
make install
make test-all

The error messages are following:
2) Failure:
testselfprefix(TestGem) [/home/naruse/ruby/test/rubygems/test_gem.rb:779]:
Expected "/home/naruse/obj/ruby", not "/home/naruse/ruby".

3) Failure:
testselfprefixlibdir(TestGem) [/home/naruse/ruby/test/rubygems/testgem.rb:786]:
Expected "/home/naruse/ruby" to be nil.

4) Failure:
testselffindfiles(TestGem) [/home/naruse/ruby/test/rubygems/testgem.rb:655]:
Expected ["/home/naruse/obj/ruby/test/rubygems/sff/discover.rb",
"/tmp/test-all/testrubygems56936/gemhome/gems/sff-2/lib/sff/discover.rb",
"/tmp/test-all/testrubygems56936/gemhome/gems/sff-1/lib/sff/discover.rb"], not ["/home/naruse/ruby/test/rubygems/sff/discover.rb",
"/tmp/test-all/testrubygems56936/gemhome/gems/sff-2/lib/sff/discover.rb",
"/tmp/test-all/testrubygems56936/gemhome/gems/sff-1/lib/sff/discover.rb"].

5) Failure:
testselfprefixsitelibdir(TestGem) [/home/naruse/ruby/test/rubygems/testgem.rb:795]:
Expected "/home/naruse/ruby" to be nil.

6) Error:
testexecuteremoves_executable(TestGemCommandsUninstallCommand):
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/naruse/obj/ruby/ruby mkrf_conf.rb

rake RUBYARCHDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib RUBYLIBDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib
/home/naruse/obj/ruby/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)
from /home/naruse/ruby/lib/rubygems.rb:36:in require'
from /home/naruse/ruby/lib/rubygems.rb:36
from /usr/local/bin/rake:9:in
require'
from /usr/local/bin/rake:9

Gem files will remain installed in /tmp/test-all/testrubygems56936/gemhome/gems/a-2 for inspection.
Results logged to /tmp/test-all/testrubygems56936/gemhome/gems/a-2/ext/a/gem_make.out

/home/naruse/ruby/test/rubygems/test_gem_commands_uninstall_command.rb:32:in `block (2 levels) in test_execute_removes_executable'
/home/naruse/ruby/test/rubygems/test_gem_commands_uninstall_command.rb:31:in `block in test_execute_removes_executable'
/home/naruse/ruby/test/rubygems/test_gem_commands_uninstall_command.rb:30:in `test_execute_removes_executable'
../../ruby/test/runner.rb:10:in `<main>'

7) Error:
testexecuteprerelease(TestGemCommandsUninstallCommand):
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/naruse/obj/ruby/ruby mkrf_conf.rb

rake RUBYARCHDIR=/tmp/test-all/testrubygems56936/gemhome/gems/pre-2.b/lib RUBYLIBDIR=/tmp/test-all/testrubygems56936/gemhome/gems/pre-2.b/lib
/home/naruse/obj/ruby/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)
from /home/naruse/ruby/lib/rubygems.rb:36:in require'
from /home/naruse/ruby/lib/rubygems.rb:36
from /usr/local/bin/rake:9:in
require'
from /usr/local/bin/rake:9

Gem files will remain installed in /tmp/test-all/testrubygems56936/gemhome/gems/pre-2.b for inspection.
Results logged to /tmp/test-all/testrubygems56936/gemhome/gems/pre-2.b/ext/a/gem_make.out

/home/naruse/ruby/test/rubygems/test_gem_commands_uninstall_command.rb:100:in `block (2 levels) in test_execute_prerelease'
/home/naruse/ruby/test/rubygems/test_gem_commands_uninstall_command.rb:99:in `block in test_execute_prerelease'
/home/naruse/ruby/test/rubygems/test_gem_commands_uninstall_command.rb:98:in `test_execute_prerelease'
../../ruby/test/runner.rb:10:in `<main>'

8) Error:
testclassbuild(TestGemExtRakeBuilder):
Gem::InstallError: rake failed:

/home/naruse/obj/ruby/ruby mkrf_conf.rb

rake RUBYARCHDIR=/tmp/test-all/testrubygems56936/prefix RUBYLIBDIR=/tmp/test-all/testrubygems56936/prefix
/home/naruse/obj/ruby/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)
from /home/naruse/ruby/lib/rubygems.rb:36:in require'
from /home/naruse/ruby/lib/rubygems.rb:36
from /usr/local/bin/rake:9:in
require'
from /usr/local/bin/rake:9

/home/naruse/ruby/test/rubygems/test_gem_ext_rake_builder.rb:36:in `block (2 levels) in test_class_build'
/home/naruse/ruby/test/rubygems/test_gem_ext_rake_builder.rb:34:in `chdir'
/home/naruse/ruby/test/rubygems/test_gem_ext_rake_builder.rb:34:in `block in test_class_build'
/home/naruse/ruby/test/rubygems/test_gem_ext_rake_builder.rb:33:in `test_class_build'
../../ruby/test/runner.rb:10:in `<main>'

9) Error:
testinstallignore_dependencies(TestGemInstaller):
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/naruse/obj/ruby/ruby mkrf_conf.rb --build_arg1 --build_arg2

rake RUBYARCHDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib RUBYLIBDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib
/home/naruse/obj/ruby/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)
from /home/naruse/ruby/lib/rubygems.rb:36:in require'
from /home/naruse/ruby/lib/rubygems.rb:36
from /usr/local/bin/rake:9:in
require'
from /usr/local/bin/rake:9

Gem files will remain installed in /tmp/test-all/testrubygems56936/gemhome/gems/a-2 for inspection.
Results logged to /tmp/test-all/testrubygems56936/gemhome/gems/a-2/ext/a/gem_make.out

/home/naruse/ruby/test/rubygems/test_gem_installer.rb:698:in `block (2 levels) in test_install_ignore_dependencies'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:697:in `block in test_install_ignore_dependencies'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:696:in `test_install_ignore_dependencies'
../../ruby/test/runner.rb:10:in `<main>'

10) Error:
testinstallwithnoprior_files(TestGemInstaller):
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/naruse/obj/ruby/ruby mkrf_conf.rb --build_arg1 --build_arg2

rake RUBYARCHDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib RUBYLIBDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib
/home/naruse/obj/ruby/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)
from /home/naruse/ruby/lib/rubygems.rb:36:in require'
from /home/naruse/ruby/lib/rubygems.rb:36
from /usr/local/bin/rake:9:in
require'
from /usr/local/bin/rake:9

Gem files will remain installed in /tmp/test-all/testrubygems56936/gemhome/gems/a-2 for inspection.
Results logged to /tmp/test-all/testrubygems56936/gemhome/gems/a-2/ext/a/gem_make.out

/home/naruse/ruby/test/rubygems/test_gem_installer.rb:594:in `block (2 levels) in test_install_with_no_prior_files'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:593:in `block in test_install_with_no_prior_files'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:592:in `test_install_with_no_prior_files'
../../ruby/test/runner.rb:10:in `<main>'

11) Error:
testinstallcheckdependenciesinstall_dir(TestGemInstaller):
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/naruse/obj/ruby/ruby mkrf_conf.rb --build_arg1 --build_arg2

rake RUBYARCHDIR=/tmp/test-all/testrubygems56936/gemhome2/gems/a-2/lib RUBYLIBDIR=/tmp/test-all/testrubygems56936/gemhome2/gems/a-2/lib
/home/naruse/obj/ruby/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)
from /home/naruse/ruby/lib/rubygems.rb:36:in require'
from /home/naruse/ruby/lib/rubygems.rb:36
from /usr/local/bin/rake:9:in
require'
from /usr/local/bin/rake:9

Gem files will remain installed in /tmp/test-all/testrubygems56936/gemhome2/gems/a-2 for inspection.
Results logged to /tmp/test-all/testrubygems56936/gemhome2/gems/a-2/ext/a/gem_make.out

/home/naruse/ruby/test/rubygems/test_gem_installer.rb:673:in `block (2 levels) in test_install_check_dependencies_install_dir'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:672:in `block in test_install_check_dependencies_install_dir'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:671:in `test_install_check_dependencies_install_dir'
../../ruby/test/runner.rb:10:in `<main>'

12) Error:
test_install(TestGemInstaller):
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/naruse/obj/ruby/ruby mkrf_conf.rb --build_arg1 --build_arg2

rake RUBYARCHDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib RUBYLIBDIR=/tmp/test-all/testrubygems56936/gemhome/gems/a-2/lib
/home/naruse/obj/ruby/rbconfig.rb:7: ruby lib version (1.9.3) doesn't match executable version (1.8.7) (RuntimeError)
from /home/naruse/ruby/lib/rubygems.rb:36:in require'
from /home/naruse/ruby/lib/rubygems.rb:36
from /usr/local/bin/rake:9:in
require'
from /usr/local/bin/rake:9

Gem files will remain installed in /tmp/test-all/testrubygems56936/gemhome/gems/a-2 for inspection.
Results logged to /tmp/test-all/testrubygems56936/gemhome/gems/a-2/ext/a/gem_make.out

/home/naruse/ruby/test/rubygems/test_gem_installer.rb:560:in `block (2 levels) in test_install'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:559:in `block in test_install'
/home/naruse/ruby/test/rubygems/test_gem_installer.rb:558:in `test_install'
../../ruby/test/runner.rb:10:in `<main>'

=end

History

#1 Updated by Yui NARUSE about 3 years ago

  • Target version set to 1.9.3

=begin
You can't fix this?
=end

#2 Updated by Yui NARUSE about 3 years ago

  • Status changed from Assigned to Closed

=begin
r31147 and r31151.
=end

Also available in: Atom PDF