Loading ...
Sorry, an error occurred while loading the content.

Re: if_ruby.txt

Expand Messages
  • Jon
    FYI, all built well and ran last nite with RubyInstaller 1.9.2-p0, llvm-gcc v2.8 and the very complete :ruby puts hello vim test. ... @Leo, after diffing the
    Message 1 of 4 , Oct 28, 2010
    • 0 Attachment
      FYI, all built well and ran last nite with RubyInstaller 1.9.2-p0,
      llvm-gcc v2.8 and the very complete :ruby puts 'hello vim' test.

      > > One thing I found confusing at the start with compiling vim with ruby,
      > > is that while msvc compilation only works against ruby-mswin headers
      > > and vice-versa with mingw, that isn't the case when it comes to
      > > _running_ it, and indeed you can compile with msvc against mingw ruby
      > > by grafting on the mswin ruby headers from the ruby-lang links, and
      > > vice-versa.

      @Leo, after diffing the 1.9.2-p0 "include" dirs from [1] and [2] I now
      see what you're saying; the i386-mswin/ruby/config.h and i386-mingw/
      ruby/config.h differences are likely the cause of the issues you saw
      as well as the #ifdef _MSC_VER != 1200 (VC6) check. I wonder if the
      recommendation should be that, if you want to build dynamic MRI Ruby
      support on Windows into vim, use the same toolchain used to build the
      MRI Ruby you're using.

      @Bram...please reject this patch version as I want to check the
      following and update it for your review. BTW, do you see "If your
      program is using more than one version of the CRT, some care is needed
      when passing certain CRT objects (such as file handles, locales and
      environment variables) across DLL boundaries." as an issue if gvim.exe/
      vim.exe links against one Windows CRT version while the dynamically
      loaded DLLs (e.g. - lua, ruby, python, etc) link against another?
      (note: on my Win7 system my gvim/vim links against MSVCRT.DLL and the
      dynamically loaded system32\PYTHON27.DLL depends upon the side-by-side
      MSVCR90.DLL...things seem to run OK)

      1) Confirm that one should build vim with the same toolchain as used
      to build your Ruby distribution
      2) Confirm that both Ruby and vim need to link to the same MSFT CRT
      version to avoid [3]
      3) Similar to (2), review whether the "remove _MSC_VER from config.h"
      note in if_ruby.txt should be clarified
      4) Add note stating that when trying to use dynamic MRI Ruby 1.9.2,
      both RUBY_VER and RUBY_VER_LONG need to be set to 191 and 1.9.1
      respectively to deal with 1.9.2's "mostly compatible with 1.9.1" and
      "library compatibility version" peculiarities [4]

      Jon

      [1] http://rubyinstaller.org/downloads
      [2] http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
      [3] http://msdn.microsoft.com/en-US/library/ms235460(v=VS.100).aspx
      [4] http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.