Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[RBX20] Compilation error with --enable-version=2.0 #2086

Closed
hron84 opened this Issue · 14 comments

2 participants

@hron84

I just dropped a chance for it because I was curious.

/Users/hron/.rvm/src/rbx-head/staging/bin/rbx -X20 /Users/hron/.rvm/src/rbx-head/rakelib/preinstall_gems.rb
An exception occurred running /Users/hron/.rvm/src/rbx-head/rakelib/preinstall_gems.rb
    no such file to load -- tsort (LoadError)

Backtrace:
ESC[0;31m                Rubinius::CodeLoader#load_error at kernel/common/codeloader.rb:389ESC[0m
ESC[0;34m      Rubinius::CodeLoader#resolve_require_path at kernel/common/codeloader.rb:376ESC[0m
ESC[0;34m            { } in Rubinius::CodeLoader#require at kernel/common/codeloader.rb:104ESC[0m
ESC[0;34m                           Rubinius.synchronize at kernel/bootstrap/rubinius.rb:150ESC[0m
ESC[0;34m                   Rubinius::CodeLoader#require at kernel/common/codeloader.rb:103ESC[0m
ESC[0;34m                   Rubinius::CodeLoader.require at kernel/common/codeloader.rb:206ESC[0m
ESC[0;34m  Kernel(Object)#gem_original_require (require) at kernel/common/kernel.rb:648ESC[0m
                         Kernel(Object)#require at staging/lib/rubygems/custom_require.rb:36ESC[0m
                              Object#__script__ at staging/lib/rubygems/dependency_list.rb:7ESC[0m
ESC[0;34m                   Rubinius::CodeLoader.require at kernel/common/codeloader.rb:212ESC[0m
ESC[0;34m  Kernel(Object)#gem_original_require (require) at kernel/common/kernel.rb:648ESC[0m
                         Kernel(Object)#require at staging/lib/rubygems/custom_require.rb:36ESC[0m
                              Object#__script__ at staging/lib/rubygems/dependency_installer.rb:2ESC[0m
ESC[0;34m                   Rubinius::CodeLoader.require at kernel/common/codeloader.rb:212ESC[0m
ESC[0;34m  Kernel(Object)#gem_original_require (require) at kernel/common/kernel.rb:648ESC[0m
                         Kernel(Object)#require at staging/lib/rubygems/custom_require.rb:36ESC[0m
                              Object#__script__ at rakelib/preinstall_gems.rb:2ESC[0m
ESC[0;34m               Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:68ESC[0m
ESC[0;34m               Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:118ESC[0m
ESC[0;34m                        Rubinius::Loader#script at kernel/loader.rb:615ESC[0m
ESC[0;34m                          Rubinius::Loader#main at kernel/loader.rb:816ESC[0m
rake aborted!
Command failed with status (1): [/Users/hron/.rvm/src/rbx-head/staging/bin/...]
/Users/hron/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.1/lib/rake/file_utils.rb:53:in `create_shell_runner'
/Users/hron/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.1/lib/rake/file_utils.rb:45:in `call'
/Users/hron/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.1/lib/rake/file_utils.rb:45:in `sh'
/Users/hron/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.1/lib/rake/file_utils_ext.rb:40:in `sh'
/Users/hron/.rvm/src/rbx-head/rakelib/gems.rake:13
/Users/hron/.rvm/src/rbx-head/rakelib/gems.rake:12:in `each'
/Users/hron/.rvm/src/rbx-head/rakelib/gems.rake:12
@brixen
Owner

What command did you run?

I ran ./configure --enable-version=2.0; rake -q in a Rubinius clone with no issue. I also ran rbx rakelib/preinstalled_gems.rb with no issue.

Looks like this could be an RVM bug. Have you asked them?

@hron84

I tried rvm reinstall --enable-version=1.8,1.9,2.0 to have all language support installed.
I didn't asked RVM community yet because i tought it'a just some LOAD_PATH problem...

@hron84

I tried ./configure --enable-version=19,20 with following results:

LDSHARED rbx/melbourne20.bundle
/Users/hron/build/rubinius/vm/vm extconf.rb 
Building digest

FATAL ERROR: unable to find Rubinius runtime directories.
Rubinius was configured to find the directories relative to:

  /Users/hron/build/rubinius

Set the environment variable RBX_PREFIX_PATH to the directory
that is the prefix of the following runtime directories:

      BIN_PATH: /bin
  RUNTIME_PATH: /runtime
   KERNEL_PATH: /kernel
      LIB_PATH: /lib
     SITE_PATH: /site
   VENDOR_PATH: /vendor
     GEMS_PATH: /gems

rake aborted!
Command failed with status (1): [/Users/hron/build/rubinius/vm/vm extconf.r...]
/Users/hron/build/rubinius/rakelib/extensions.rake:64:in `build_extconf'
/Users/hron/build/rubinius/rakelib/extensions.rake:100:in `block (3 levels) in compile_ext'
/Users/hron/build/rubinius/rakelib/extensions.rake:94:in `chdir'
/Users/hron/build/rubinius/rakelib/extensions.rake:94:in `block (2 levels) in compile_ext'
Tasks: TOP => default => spec => spec19 => build => build:build => extensions => extensions:digest
(See full trace by running task with --trace)

This is without RVM.. I am on 5088b79 rev.
The problem is seems rubinius does not builds C extensions if 2.0 is enabled - even if only 2.0 is enabled.

Update: After digging I worked it around with following command:

for x in `find ${PWD}/lib/20/ -type f -iname extconf.rb -exec dirname {} \;`; do 
    cd ${x} && \
    /Users/hron/build/rubinius/vm/vm extconf.rb && \
    make
done

With other words: I manually built C exts...

@brixen
Owner

@hron84 run exactly the following commands in a new clone:

./configure --enable-version=2.0
rake build

After you do this, gist the entire build output, so you may need to set your terminal scrollback buffer large enough.

In a separate gist, add the output of ./configure --show after running the above commands.

@hron84

@brixen I get a better idea: i redirected the output of rake command: https://gist.github.com/37263e6e61cff40aff7c (I attached the configure.log too)

@brixen
Owner

@hron84 what version of ruby and rake are you using?

@hron84
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]
rake, version 10.0.0
@brixen brixen closed this in 146bdc0
@hron84

@brixen super-fast resolution, thanks!

@hron84

@brixen ehhm... could you please check building through rvm? It seems still have a problem with 2.0 by requiring 'tsort' - even if i do not have an idea what requires it...

The problematic task is the rake gems:install and I guess the problem is caused by https://github.com/rubinius/rubinius/blob/master/lib/rubygems/dependency_list.rb#L7

./configure --show

Using the following configuration to build
------------------------------------------
module Rubinius
  # Make this reload friendly without silly constant defined warnings.
  BUILD_CONFIG = {
    :command_line   => "--prefix=/Users/hron/.rvm/rubies/rbx-head --enable-version=1.8,1.9,2.0 --with-opt-dir=/Users/hron/.rvm/usr",
    :which_ruby     => :ruby,
    :build_ruby     => "/Users/hron/.rvm/rubies/ruby-1.8.7-p371/bin/ruby",
    :build_rake     => "rake",
    :build_perl     => "perl",
    :llvm           => :prebuilt,
    :llvm_configure => "perl /Users/hron/.rvm/src/rbx-head/vendor/llvm/Release/bin/llvm-config",
    :llvm_version   => "3.0",
    :cc             => "gcc",
    :cxx            => "g++",
    :gcc_major      => "4.2",
    :user_cflags    => "",
    :user_cppflags  => "",
    :user_ldflags   => "",
    :include_dirs   => ["/Users/hron/.rvm/usr/include", "/usr/local/include"],
    :lib_dirs       => ["/Users/hron/.rvm/usr/lib", "/usr/local/lib"],
    :defines        => ["HAS_EXECINFO", "HAVE_SPT_REUSEARGV", "HAVE_NL_LANGINFO", "HAVE_TM_GMTOFF", "HAVE_TM_ZONE", "HAVE_TIMEZONE", "HAVE_TZNAME", "HAVE_DAYLIGHT", "HAVE_ALLOCA_H", "HAVE_STRING_H", "HAVE_SYS_TIME_H", "HAVE_SYS_TIMES_H", "HAVE_SYS_TYPES_H", "HAVE_UNISTD_H", "HAVE_STDARG_H", "HAVE_VALGRIND_H"],
    :curses         => "curses",
    :host           => "x86_64-apple-darwin12.2.0",
    :cpu            => "x86_64",
    :vendor         => "apple",
    :os             => "darwin12.2.0",
    :little_endian  => true,
    :sizeof_long    => 8,
    :x86_32         => false,
    :x86_64         => true,
    :fibers         => true,
    :sourcedir      => "/Users/hron/.rvm/src/rbx-head",
    :stagingdir     => "/Users/hron/.rvm/src/rbx-head/staging",
    :prefixdir      => "/Users/hron/.rvm/rubies/rbx-head",
    :bindir         => "/bin",
    :libdir         => "/lib",
    :runtimedir     => "/runtime",
    :kerneldir      => "/kernel",
    :sitedir        => "/site",
    :vendordir      => "/vendor",
    :include18dir   => "/vm/capi/18/include",
    :include19dir   => "/vm/capi/19/include",
    :include20dir   => "/vm/capi/19/include",
    :mandir         => "/man",
    :gemsdir        => "/gems",
    :program_name   => "rbx",
    :bin_links      => ["ruby", "rake", "gem", "irb", "rdoc", "ri"],
    :use_bin_links  => true,
    :version        => "2.0.0rc1",
    :libversion     => "2.0",
    :release_date   => "2012-11-02",
    :config_version => 163,
    :windows        => false,
    :darwin         => true,
    :bsd            => false,
    :linux          => false,
    :version_list   => ["18", "19", "20"],
    :default_version => "18",
    :vendor_zlib    => false,
    :readline       => :c_readline,
  }
end

Setting the following defines for the VM
----------------------------------------
#define RBX_HOST             "x86_64-apple-darwin12.2.0"
#define RBX_CPU              "x86_64"
#define RBX_VENDOR           "apple"
#define RBX_OS               "darwin12.2.0"
#define RBX_PREFIX_PATH      "/Users/hron/.rvm/rubies/rbx-head"
#define RBX_BIN_PATH         "/bin"
#define RBX_GEMS_PATH        "/gems"
#define RBX_RUNTIME_PATH     "/runtime"
#define RBX_KERNEL_PATH      "/kernel"
#define RBX_LIB_PATH         "/lib"
#define RBX_HDR18_PATH       "/vm/capi/18/include"
#define RBX_HDR19_PATH       "/vm/capi/19/include"
#define RBX_HDR20_PATH       "/vm/capi/19/include"
#define RBX_SITE_PATH        "/site"
#define RBX_VENDOR_PATH      "/vendor"
#define RBX_VERSION          "2.0.0rc1"
#define RBX_LIB_VERSION      "2.0"
#define RBX_LDSHARED         "gcc -bundle -undefined suppress -flat_namespace"
#define RBX_RELEASE_DATE     "2012-11-02"
#define RBX_SIZEOF_LONG      8
#define RBX_LLVM_API_VER     300
#define RBX_LIBC             "libc.dylib"
#define RBX_DEFAULT_18       true
#define RBX_DEFAULT_19       false
#define RBX_DEFAULT_20       false
#define RBX_ENABLED_18       1
#define RBX_ENABLED_19       1
#define RBX_ENABLED_20       1
#define RBX_LITTLE_ENDIAN    1
#define RBX_HAVE_TR1_HASH    1
#define RBX_DARWIN           1
#define RBX_FIBER_ENABLED    1

#define HAS_EXECINFO         1
#define HAVE_SPT_REUSEARGV   1
#define HAVE_NL_LANGINFO     1
#define HAVE_TM_GMTOFF       1
#define HAVE_TM_ZONE         1
#define HAVE_TIMEZONE        1
#define HAVE_TZNAME          1
#define HAVE_DAYLIGHT        1
#define HAVE_ALLOCA_H        1
#define HAVE_STRING_H        1
#define HAVE_SYS_TIME_H      1
#define HAVE_SYS_TIMES_H     1
#define HAVE_SYS_TYPES_H     1
#define HAVE_UNISTD_H        1
#define HAVE_STDARG_H        1
#define HAVE_VALGRIND_H      1
@brixen
Owner

@hron84 what was the exact command line you used with RVM and what version of RVM?

@brixen
Owner

@hron84 should be fixed on master HEAD.

@hron84

@brixen tonight I'll try it out. And sorry for late response...

@hron84

@brixen It is fixed now. I dunno how can I thank you your great assistance :smiley: :+1:

@brixen
Owner

@hron84 I'm happy it is fixed. Please let me know if you have any further issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.