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

69994Re: [PATCH] Fix compilation failure with Ruby 2.0.0

Expand Messages
  • Andrei Olsen
    May 22, 2013
    • 0 Attachment
      kl. 23:40:01 UTC+2 tirsdag 21. mai 2013 skrev skeept følgende:
      > Well, I have downloaded the 64 bit 2.0-p195 rubyinstaller from http://rubyinstaller.org/downloads/
      > and configured ruby with
      > RUBY="C:\htemp\Ruby200-x64" DYNAMIC_RUBY=yes RUBY_VER=20 RUBY_VER_LONG=2.0.0 ^
      > when compiling I get the error:
      > c:\htemp\ruby200-x64\include\ruby-2.0.0\ruby/ruby.h(24) : fatal error C1083: Cannot open include file: 'ruby/c
      > onfig.h': No such file or directory
      > NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\x86_amd64\cl.EXE"' : r
      > eturn code '0x2'
      > Stop.
      > if I don't include the configuration for ruby then I can compile fine (Included patches 1-944).
      > Is there a different installer I should be using or different configuration options?

      I'm not so sure you can use rubyinstaller.org version to compile with Visual Studio. You need to either use MinGW compiler (probably the easiest) or recompile Ruby yourself with MS compiler.

      # To build with MinGW:

      1. Get MSYS and unpack to c:\msys :

      2. Get MinGW and unpack to c:\mingw64 :

      3. cd to c:\msys\etc and edit fstab (see fstab.sample). Basically, you need to add this line:

      c:/mingw64 /mingw

      4. Start MSYS (c:\msys\msys.bat) and cd to where you have Vim source (use forward slashes). Let's assume you have the source in c:\projects\vim and rubyinstaller.org Ruby is installed to c:\Ruby200:

      cd /c/projects/vim/src
      make -f Make_ming.mak RUBY="c:/Ruby200" DYNAMIC_RUBY=yes RUBY_VER=20 RUBY_VER
      _LONG=2.0.0 ARCH=x86-64

      # To build with MS compiler:

      1. Get Ruby source code:

      2. Unpack to let's say c:\projects\ruby

      3. Open Visual Studio / Windows SDK command prompt and cd to c:\projects\ruby or where your Ruby source code is and run this (see win32\README.win32 for more info):

      win32\configure.bat --prefix=/Ruby200-VC --target=x64-mswin64
      nmake test
      nmake install

      4. Now you should have VC++ compiled Ruby in c:\Ruby200-VC and can cd to Vim's src and build Vim with:

      nmake -f Make_mvc.mak RUBY="c:\Ruby200-VC" DYNAMIC_RUBY=yes RUBY_VER=20 RUBY_VER_LONG=2.0.0 RUBY_PLATFORM=x64-mswin64_100 RUBY_INSTALL_NAME=x64-msvcr100-ruby200

      Add c:\Ruby200-VC\bin to your PATH and you're good to go.

      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

      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 14 messages in this topic