Re: [PATCH] Fix compilation failure with Ruby 2.0.0
Ben Fritz wrote: On Tuesday, May 21, 2013 3:01:05 PM UTC-5, Bram Moolenaar wrote: Skeept wrote: Also for the next release, if possible would it be possible to distribute a 64 bit for windows as well a 32 bit? It's not all that useful. It uses more memory, is probably a bit slower. I haven't heard real practical advantages. But perhaps that changed with Windows 8? From http://vim.wikia.com/wiki/Where_to_download_Vim, reasons one might want a 64-bit version: 1. Editing files 4GB in size. Isn't that already possible? It's going to be slow anyway. 2. 64-bit WinPE does not have a WOW64 subsystem, hence you cannot run a 32-bit executable. What is WinPE? 3. Windows Server 2008 R2 (i.e. Win7 Server) also does not have the WOW64 subsystem, by default, although it is an optional component you can install. Not a very common system. 4. Potential for performance gains, particularly in heavy memory operations like memcpy and memcmp which can be optimized for the 64-bit word size. But moving 64 bits things arounds is slower, net gain or loss needs to be measured. 5. Getting 32-bit Vim into a 64-bit Edit with Vim context menu entry is tricky. Also, related to WOW64, accessing native commands which only have a 64-bit version (like chcp) will fail without a workaround. I wonder how many downloads the 64 bit version currently has. -- Any resemblance between the above views and those of my employer, my terminal, or the view out my window are purely coincidental. Any resemblance between the above and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader. The question of the existence of the reader is left as an exercise for the second god coefficient. (A discussion of non-orthogonal, non-integral polytheism is beyond the scope of this article.) (Ralph Jennings) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
2. 64-bit WinPE does not have a WOW64 subsystem, hence you cannot run a 32-bit executable. What is WinPE? Windows Preinstallation Environment http://en.wikipedia.org/wiki/Windows_Preinstallation_Environment http://technet.microsoft.com/en-us/library/hh825110.aspx Basically, a live CD. -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
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 : http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/ 2. Get MinGW and unpack to c:\mingw64 : http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/64-bit/threads-win32/sjlj/ 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: http://www.ruby-lang.org/en/downloads/ 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 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
On Wednesday, May 22, 2013 5:05:23 AM UTC-5, Andrei Olsen wrote: 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 : http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/ 2. Get MinGW and unpack to c:\mingw64 : http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/64-bit/threads-win32/sjlj/ 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: http://www.ruby-lang.org/en/downloads/ 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 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. Thanks! For me compiling ruby with visual studio was the way to go since I have tried to build with mingw and python and for some reason it did not link correctly (the 32 bit version works fine). Jorge -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
For me compiling ruby with visual studio was the way to go since I have tried to build with mingw and python and for some reason it did not link correctly (the 32 bit version works fine). Oh, I forgot that I had a slightly modified make file. It will work if you add -DMS_WIN64 to DEFINES on line 329 (Make_ming.mak) -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
Thanks. I hope a few people can try it out. Was this patch applied already? I tried compiling a 64 bit windows but if failed complaining that some include file could not be found. If possible could this patch be included for the next release? A small example on how to use rubydo (similar to the example on how to use perldo) would be useful for people like me, that don't know much about ruby but would like to learn. Also for the next release, if possible would it be possible to distribute a 64 bit for windows as well a 32 bit? Thanks! -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
Skeept wrote: Thanks. I hope a few people can try it out. Was this patch applied already? I tried compiling a 64 bit windows but if failed complaining that some include file could not be found. If possible could this patch be included for the next release? AFAIK this was included in patch 7.3.889. A small example on how to use rubydo (similar to the example on how to use perldo) would be useful for people like me, that don't know much about ruby but would like to learn. Also for the next release, if possible would it be possible to distribute a 64 bit for windows as well a 32 bit? It's not all that useful. It uses more memory, is probably a bit slower. I haven't heard real practical advantages. But perhaps that changed with Windows 8? -- Clothes make the man. Naked people have little or no influence on society. -- Mark Twain (Samuel Clemens) (1835-1910) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
On Tuesday, May 21, 2013 3:01:05 PM UTC-5, Bram Moolenaar wrote: Skeept wrote: Thanks. I hope a few people can try it out. Was this patch applied already? I tried compiling a 64 bit windows but if failed complaining that some include file could not be found. If possible could this patch be included for the next release? AFAIK this was included in patch 7.3.889. A small example on how to use rubydo (similar to the example on how to use perldo) would be useful for people like me, that don't know much about ruby but would like to learn. Also for the next release, if possible would it be possible to distribute a 64 bit for windows as well a 32 bit? It's not all that useful. It uses more memory, is probably a bit slower. I haven't heard real practical advantages. But perhaps that changed with Windows 8? From http://vim.wikia.com/wiki/Where_to_download_Vim, reasons one might want a 64-bit version: 1. Editing files 4GB in size. 2. 64-bit WinPE does not have a WOW64 subsystem, hence you cannot run a 32-bit executable. 3. Windows Server 2008 R2 (i.e. Win7 Server) also does not have the WOW64 subsystem, by default, although it is an optional component you can install. 4. Potential for performance gains, particularly in heavy memory operations like memcpy and memcmp which can be optimized for the 64-bit word size. 5. Getting 32-bit Vim into a 64-bit Edit with Vim context menu entry is tricky. Also, related to WOW64, accessing native commands which only have a 64-bit version (like chcp) will fail without a workaround. -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
Was this patch applied already? I tried compiling a 64 bit windows but if failed complaining that some include file could not be found. If possible could this patch be included for the next release? AFAIK this was included in patch 7.3.889. 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? A small example on how to use rubydo (similar to the example on how to use perldo) would be useful for people like me, that don't know much about ruby but would like to learn. Also for the next release, if possible would it be possible to distribute a 64 bit for windows as well a 32 bit? It's not all that useful. It uses more memory, is probably a bit slower. I haven't heard real practical advantages. But perhaps that changed with Windows 8? I am not sure how much bigger the memory usage will be, but I would not think it would be that big. 64 bit windows users will probably already use 64 bit python and perl so if there is a 64 bit vim they won't have to install additional 32 bit versions. Jorge -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
On Tuesday, March 26, 2013 8:30:48 PM UTC+9, Bram Moolenaar wrote: eagletmt wrote: I found that Vim cannot be compiled with --enable-rubyinterp=dynamic on 64bit platform if the Ruby's version is 2.0.0. I attached a patch to fix it. Please check it. Thanks. I hope a few people can try it out. Please give us your name. I do not include code from anonymous sources. -- The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change. -- FORTRAN manual for Xerox Computers /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// Sorry, my name is Kohei Suzuki. I have tested my patch on 32bit/64bit Linux with Ruby 1.9.3 and 2.0.0. -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[PATCH] Fix compilation failure with Ruby 2.0.0
Hi list, I found that Vim cannot be compiled with --enable-rubyinterp=dynamic on 64bit platform if the Ruby's version is 2.0.0. I attached a patch to fix it. Please check it. -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. diff -ur vim-7-3-875.orig/src/if_ruby.c vim-7-3-875/src/if_ruby.c --- vim-7-3-875.orig/src/if_ruby.c 2013-03-22 06:53:50.0 +0900 +++ vim-7-3-875/src/if_ruby.c 2013-03-25 03:35:47.87239 +0900 @@ -88,6 +88,13 @@ # define rb_int2big rb_int2big_stub #endif +#if defined(DYNAMIC_RUBY_VER) DYNAMIC_RUBY_VER = 20 SIZEOF_INT SIZEOF_LONG +/* Ruby 2.0 defines a number of static functions which use rb_fix2int and + * rb_num2int if SIZEOF_INT SIZEOF_LONG (64bit) */ +# define rb_fix2int rb_fix2int_stub +# define rb_num2int rb_num2int_stub +#endif + #include ruby.h #ifdef RUBY19_OR_LATER # include ruby/encoding.h @@ -352,6 +359,16 @@ { return dll_rb_int2big(x); } +#if defined(DYNAMIC_RUBY_VER) DYNAMIC_RUBY_VER = 20 SIZEOF_INT SIZEOF_LONG +long rb_fix2int_stub(VALUE x) +{ +return dll_rb_fix2int(x); +} +long rb_num2int_stub(VALUE x) +{ +return dll_rb_num2int(x); +} +#endif #if defined(DYNAMIC_RUBY_VER) DYNAMIC_RUBY_VER = 20 VALUE rb_float_new_in_heap(double d)
Re: [PATCH] Fix compilation failure with Ruby 2.0.0
eagletmt wrote: I found that Vim cannot be compiled with --enable-rubyinterp=dynamic on 64bit platform if the Ruby's version is 2.0.0. I attached a patch to fix it. Please check it. Thanks. I hope a few people can try it out. Please give us your name. I do not include code from anonymous sources. -- The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change. -- FORTRAN manual for Xerox Computers /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.