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

Re: vim 7.2.376 builds fine with MinGW and ruby support

Expand Messages
  • Bram Moolenaar
    ... Thanks. Unless someone complains I ll include this soon. -- Experience is what you get when you don t get what you want. /// Bram Moolenaar --
    Message 1 of 26 , Mar 1 2:29 PM
    • 0 Attachment
      Cesar Romani wrote:

      > With the following patch for Make_ming.mak, vim 7.2.376 builds fine for
      > ruby 1.8.6 and even for ruby 1.9.1 with DYNAMIC_RUBY=yes
      > For Make_cyg.mak and Make_mvc.mak, it could be possible to make a
      > similar change.
      >
      > --------------------
      > --- Make_ming.old.mak 2010-02-20 17:47:22 -0500
      > +++ Make_ming.new.mak 2010-02-28 17:05:14 -0500
      > @@ -229,9 +229,7 @@
      > endif
      >
      > RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
      > -ifeq (no, $(DYNAMIC_RUBY))
      > RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
      > -endif
      >
      > endif # RUBY
      > --------------------

      Thanks. Unless someone complains I'll include this soon.

      --
      Experience is what you get when you don't get what you want.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.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
    • Sergey Khorev
      ... Bram, I do not use Ruby integration but the patch seems defeating the very point of dynamic loading, making Vim dependent on Ruby dll. Unless someone more
      Message 2 of 26 , Mar 1 11:57 PM
      • 0 Attachment
        > Thanks.  Unless someone complains I'll include this soon.

        Bram,

        I do not use Ruby integration but the patch seems defeating the very
        point of dynamic loading, making Vim dependent on Ruby dll.
        Unless someone more knowledgeable outruns me, I am going to have a
        look into this.

        Cesar,

        Have you checked that Vim works when there is no ruby dll in the PATH?

        --
        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
      • Cesar Romani
        ... I myself don t use Ruby integration but it d be better if vim can work with all modules integrated on windows and the only problem at the moment is the
        Message 3 of 26 , Mar 2 7:17 AM
        • 0 Attachment
          On 02/03/2010 02:57 a.m., Sergey Khorev wrote:
          >> Thanks. Unless someone complains I'll include this soon.
          >
          > Bram,
          >
          > I do not use Ruby integration but the patch seems defeating the very
          > point of dynamic loading, making Vim dependent on Ruby dll.
          > Unless someone more knowledgeable outruns me, I am going to have a
          > look into this.
          >
          > Cesar,
          >
          > Have you checked that Vim works when there is no ruby dll in the PATH?

          I myself don't use Ruby integration but it'd be better if vim can
          work with all modules integrated on windows and the only problem at the
          moment is the dynamic loading of Ruby.

          If I remove ruby dll from the PATH, vim won't work.

          If I build with true dynamic loading of ruby I get:

          --------------------
          gobjZ/if_ruby.o:if_ruby.c:(.text+0x9b5): undefined reference to
          `rb_string_value_ptr'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xae3): undefined reference to
          `rb_string_value_ptr'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xb0d): undefined reference to
          `rb_string_value_ptr'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xbee): undefined reference to
          `rb_float_new'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xbfd): undefined reference to `rb_ary_new'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xc1c): undefined reference to
          `rb_ary_push'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xc3d): undefined reference to
          `rb_string_value_ptr'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xf38): undefined reference to
          `rb_string_value_ptr'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0x1157): undefined reference to
          `rb_string_value_ptr'
          collect2: ld returned 1 exit status
          make: *** [gvim.exe] Error 1
          --------------------

          If I apply the patch:

          --------------------
          --- if_ruby.c 2010-02-24 12:43:07 -0500
          +++ if_ruby.new.c 2010-03-02 09:20:25 -0500
          @@ -74,9 +74,7 @@
          * Ruby 1.9 does not provide RXXX(s)->len and RXXX(s)->ptr, instead
          * RXXX_LEN(s) and RXXX_PTR(s) are provided.
          */
          -#ifndef StringValuePtr
          # define StringValuePtr(s) STR2CSTR(s)
          -#endif
          #ifndef RARRAY_LEN
          # define RARRAY_LEN(s) RARRAY(s)->len
          #endif
          --------------------

          I get only:

          --------------------
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xbee): undefined reference to
          `rb_float_new'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xbfd): undefined reference to `rb_ary_new'
          gobjZ/if_ruby.o:if_ruby.c:(.text+0xc1c): undefined reference to
          `rb_ary_push'
          --------------------

          which were introduced with patch 7.2.374

          Best regards,

          --
          Cesar

          --
          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
        • Sergey Khorev
          Ok, here is a patch to build Vim with dynamic Ruby loading. I ve tested it with Ruby 1.8.7 and 1.9.1 from http://rubyinstaller.org/download.html I believe
          Message 4 of 26 , Mar 2 9:23 PM
          • 0 Attachment
            Ok, here is a patch to build Vim with dynamic Ruby loading.

            I've tested it with Ruby 1.8.7 and 1.9.1 from
            http://rubyinstaller.org/download.html
            I believe there might be other distros, so if anyone has problems with
            the patch, please provide download link and command line you used to
            build Vim.

            --
            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
          • Cesar Romani
            ... It works fine for both ruby 1.8 and ruby 1.9 on Win XP. Best regards -- Cesar -- You received this message from the vim_dev maillist. Do not top-post!
            Message 5 of 26 , Mar 3 12:55 PM
            • 0 Attachment
              On 03/03/2010 12:23 a.m., Sergey Khorev wrote:
              > Ok, here is a patch to build Vim with dynamic Ruby loading.
              >
              > I've tested it with Ruby 1.8.7 and 1.9.1 from
              > http://rubyinstaller.org/download.html
              > I believe there might be other distros, so if anyone has problems with
              > the patch, please provide download link and command line you used to
              > build Vim.
              >

              It works fine for both ruby 1.8 and ruby 1.9 on Win XP.

              Best regards

              --
              Cesar

              --
              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
            • Cesar Romani
              ... If I build vim with ruby 1.9.1 using your patch, config.h won t be found. It only builds if I copy:
              Message 6 of 26 , Mar 3 3:02 PM
              • 0 Attachment
                On 03/03/2010 03:55 p.m., Cesar Romani wrote:
                > On 03/03/2010 12:23 a.m., Sergey Khorev wrote:
                > > Ok, here is a patch to build Vim with dynamic Ruby loading.
                > >
                > > I've tested it with Ruby 1.8.7 and 1.9.1 from
                > > http://rubyinstaller.org/download.html
                > > I believe there might be other distros, so if anyone has problems with
                > > the patch, please provide download link and command line you used to
                > > build Vim.
                > >
                >
                > It works fine for both ruby 1.8 and ruby 1.9 on Win XP.

                If I build vim with ruby 1.9.1 using your patch, config.h won't be found.
                It only builds if I copy:
                $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)/ruby/config.h
                to
                $(RUBY)/include/ruby-$(RUBY_VER_LONG)/ruby/

                Has anybody else the same problem building with mingw or cygwin for
                windows?
                The patch for cygwin should be similar to mingw.

                Regards,

                --
                Cesar

                --
                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
              • Sergey Khorev
                ... In your case, I believe you need to add to your build line RUBY_PLATFORM=i386-mingw32. If it does not work, let me quote myself: please provide download
                Message 7 of 26 , Mar 3 9:19 PM
                • 0 Attachment
                  > If I build vim with ruby 1.9.1 using your patch, config.h won't be found.
                  > It only builds if I copy:
                  > $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)/ruby/config.h
                  > to
                  > $(RUBY)/include/ruby-$(RUBY_VER_LONG)/ruby/

                  In your case, I believe you need to add to your build line
                  RUBY_PLATFORM=i386-mingw32.

                  If it does not work, let me quote myself: "please provide download
                  link and command line you used to build Vim"

                  --
                  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
                • Yongwei Wu
                  ... Thanks. It works for me too (Windows XP, MSVC 7.1, Ruby 1.8.6). Yongwei -- You received this message from the vim_dev maillist. Do not top-post! Type
                  Message 8 of 26 , Mar 4 5:15 AM
                  • 0 Attachment
                    On Mar 3, 1:23 pm, Sergey Khorev <sergey.kho...@...> wrote:
                    > Ok, here is a patch to build Vim with dynamic Ruby loading.
                    >
                    > I've tested it with Ruby 1.8.7 and 1.9.1 fromhttp://rubyinstaller.org/download.html
                    > I believe there might be other distros, so if anyone has problems with
                    > the patch, please provide download link and command line you used to
                    > build Vim.
                    >
                    >  ruby_dyn.txt

                    Thanks. It works for me too (Windows XP, MSVC 7.1, Ruby 1.8.6).

                    Yongwei

                    --
                    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
                  • Cesar Romani
                    ... found. ... You are right, it should be RUBY_PLATFORM=i386-mingw32 for ruby 1.9.1 The default value RUBY_PLATFORM=i386-mswin32 should be changed for ruby
                    Message 9 of 26 , Mar 4 7:15 AM
                    • 0 Attachment
                      On 04/03/2010 12:19 a.m., Sergey Khorev wrote:
                      >> If I build vim with ruby 1.9.1 using your patch, config.h won't be
                      found.
                      >> It only builds if I copy:
                      >> $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)/ruby/config.h
                      >> to
                      >> $(RUBY)/include/ruby-$(RUBY_VER_LONG)/ruby/
                      >
                      > In your case, I believe you need to add to your build line
                      > RUBY_PLATFORM=i386-mingw32.
                      >
                      > If it does not work, let me quote myself: "please provide download
                      > link and command line you used to build Vim"

                      You are right, it should be
                      RUBY_PLATFORM=i386-mingw32
                      for ruby 1.9.1

                      The default value
                      RUBY_PLATFORM=i386-mswin32
                      should be changed for ruby 1.9.1

                      Regards

                      --
                      Cesar

                      --
                      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
                    • Sergey Khorev
                      ... Thanks for the confirmation. -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to.
                      Message 10 of 26 , Mar 4 9:29 PM
                      • 0 Attachment
                        > Thanks.  It works for me too (Windows XP, MSVC 7.1, Ruby 1.8.6).

                        Thanks for the confirmation.

                        --
                        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
                      • Sergey Khorev
                        Cesar, ... Ruby 1.8.7 from rubyinstaller.org also uses i386-mingw32. Can you confirm this is default value for all 1.8.x versions? If not, I suggest to leave
                        Message 11 of 26 , Mar 4 9:32 PM
                        • 0 Attachment
                          Cesar,

                          > The default value
                          > RUBY_PLATFORM=i386-mswin32
                          > should be changed for ruby 1.9.1

                          Ruby 1.8.7 from rubyinstaller.org also uses i386-mingw32. Can you
                          confirm this is default value for all 1.8.x versions? If not, I
                          suggest to leave it as it currently is, because there is no way to
                          detect exact ruby version in the makefile.

                          --
                          Sergey Khorev
                          http://sites.google.com/site/khorser
                          Can anybody think of a good tagline I can steal?

                          --
                          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
                        • Cesar Romani
                          ... The installer for ruby 1.8.6 use i386-mswin32 The installers for ruby 1.8.7 and 1.9.1 use i386-mingw32 but their binaries use i386-mswin32 Regards, --
                          Message 12 of 26 , Mar 5 1:22 PM
                          • 0 Attachment
                            On 05/03/2010 12:32 a.m., Sergey Khorev wrote:
                            > Cesar,
                            >
                            >> The default value
                            >> RUBY_PLATFORM=i386-mswin32
                            >> should be changed for ruby 1.9.1
                            >
                            > Ruby 1.8.7 from rubyinstaller.org also uses i386-mingw32. Can you
                            > confirm this is default value for all 1.8.x versions? If not, I
                            > suggest to leave it as it currently is, because there is no way to
                            > detect exact ruby version in the makefile.

                            The installer for ruby 1.8.6 use i386-mswin32
                            The installers for ruby 1.8.7 and 1.9.1 use i386-mingw32
                            but their binaries use i386-mswin32

                            Regards,

                            --
                            Cesar

                            --
                            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
                          • Sergey Khorev
                            ... Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is a version which check for existence of lib ruby i386-mingw32 directory.
                            Message 13 of 26 , Mar 6 7:38 AM
                            • 0 Attachment
                              >> Ruby 1.8.7 from rubyinstaller.org also uses i386-mingw32. Can you
                              >> confirm this is default value for all 1.8.x versions? If not, I
                              >> suggest to leave it as it currently is, because there is no way to
                              >> detect exact ruby version in the makefile.
                              >
                              > The installer for ruby 1.8.6 use i386-mswin32
                              > The installers for ruby 1.8.7 and 1.9.1 use i386-mingw32
                              > but their binaries use i386-mswin32

                              Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is
                              a version which check for existence of
                              lib\ruby\<long-ver>\i386-mingw32 directory. The patch should be
                              applied to clean Vim without old patch for Ruby integration.

                              --
                              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
                            • Tom Link
                              ... When adding the following two directories to Ming_cyg.mak, this also makes it possible to build a no-cygwin build. INCLUDES +=
                              Message 14 of 26 , Mar 8 10:09 AM
                              • 0 Attachment
                                > Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is
                                > a version which check for existence of
                                > lib\ruby\<long-ver>\i386-mingw32 directory. The patch should be
                                > applied to clean Vim without old patch for Ruby integration.

                                When adding the following two directories to Ming_cyg.mak, this also
                                makes it possible to build a no-cygwin build.

                                INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
                                INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)

                                For current windows builds, the following variable has to be set too:

                                RUBY_PLATFORM=i386-mingw32

                                BTW the current version of cygwin uses gcc4, which doesn't support the
                                -mno-cygwin command line option. I.e. when USEDLL=no, the following
                                two variables should be set too:

                                CC=gcc-3
                                CXX=g++-3

                                No diff file. Sorry.

                                --
                                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
                              • Tom Link
                                ... When using ruby 1.9.1 though set RUBY_VER=191 set RUBY_VER_LONG=1.9.1 set RUBY_PLATFORM=i386-mingw32 ... With ruby 1.8.7 everything is okay. Another thing
                                Message 15 of 26 , Mar 8 11:57 AM
                                • 0 Attachment
                                  > > Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is
                                  > > a version which check for existence of
                                  > > lib\ruby\<long-ver>\i386-mingw32 directory. The patch should be
                                  > > applied to clean Vim without old patch for Ruby integration.

                                  When using ruby 1.9.1 though

                                  set RUBY_VER=191
                                  set RUBY_VER_LONG=1.9.1
                                  set RUBY_PLATFORM=i386-mingw32

                                  at least on my computer, vim crashes when evaluating this line:

                                  :ruby require 'e2mmap'

                                  With ruby 1.8.7 everything is okay.

                                  Another thing I noticed (now with ruby 1.8.7 or 1.8.6). When you try

                                  :ruby p VIM::evaluate("input('Foo')")

                                  And press <esc>, you get an error message:

                                  ArgumentError:(eval):1240: in `evaluate`: NULL pointer given

                                  I get this message with vim 7.2-385 and this patch applied. I don't
                                  see this message with vim version 7.2-119 without this patch.

                                  --
                                  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
                                • Antal Budai
                                  2010/3/8 Tom Link ... -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are
                                  Message 16 of 26 , Mar 8 12:35 PM
                                  • 0 Attachment
                                    2010/3/8 Tom Link <micathom@...>
                                    > > Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is
                                    > > a version which check for existence of
                                    > > lib\ruby\<long-ver>\i386-mingw32 directory. The patch should be
                                    > > applied to clean Vim without old patch for Ruby integration.

                                    When using ruby 1.9.1 though

                                       set RUBY_VER=191
                                       set RUBY_VER_LONG=1.9.1
                                       set RUBY_PLATFORM=i386-mingw32

                                    at least on my computer, vim crashes when evaluating this line:

                                       :ruby require 'e2mmap'

                                    With ruby 1.8.7 everything is okay.

                                    Another thing I noticed (now with ruby 1.8.7 or 1.8.6). When you try

                                       :ruby p VIM::evaluate("input('Foo')")

                                    And press <esc>, you get an error message:

                                       ArgumentError:(eval):1240: in `evaluate`: NULL pointer given

                                    I get this message with vim 7.2-385 and this patch applied. I don't
                                    see this message with vim version 7.2-119 without this patch.

                                    --
                                    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 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
                                  • Cesar Romani
                                    ... I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win XP. ... Microsoft Visual C++ Runtime Library Runtime Error! Program:
                                    Message 17 of 26 , Mar 8 6:20 PM
                                    • 0 Attachment
                                      On 08/03/2010 02:57 p.m., Tom Link wrote:
                                      >>> Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is
                                      >>> a version which check for existence of
                                      >>> lib\ruby\<long-ver>\i386-mingw32 directory. The patch should be
                                      >>> applied to clean Vim without old patch for Ruby integration.
                                      >
                                      > When using ruby 1.9.1 though
                                      >
                                      > set RUBY_VER=191
                                      > set RUBY_VER_LONG=1.9.1
                                      > set RUBY_PLATFORM=i386-mingw32
                                      >
                                      > at least on my computer, vim crashes when evaluating this line:
                                      >
                                      > :ruby require 'e2mmap'
                                      >
                                      > With ruby 1.8.7 everything is okay.
                                      >
                                      > Another thing I noticed (now with ruby 1.8.7 or 1.8.6). When you try
                                      >
                                      > :ruby p VIM::evaluate("input('Foo')")
                                      >
                                      > And press<esc>, you get an error message:
                                      >
                                      > ArgumentError:(eval):1240: in `evaluate`: NULL pointer given
                                      >
                                      > I get this message with vim 7.2-385 and this patch applied. I don't
                                      > see this message with vim version 7.2-119 without this patch.

                                      I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win
                                      XP.
                                      In my case, it crashes with both lines with the same message:

                                      --------------------
                                      Microsoft Visual C++ Runtime Library

                                      Runtime Error!

                                      Program: C:\Programmi\Vim\vim72\gvim.exe

                                      This application has requested the Runtime to terminate it in an unusual
                                      way.
                                      Please contact the application's support team for more information.
                                      --------------------

                                      Regards

                                      --
                                      Cesar

                                      --
                                      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
                                    • Cesar Romani
                                      ... I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win XP. ... Microsoft Visual C++ Runtime Library Runtime Error! Program:
                                      Message 18 of 26 , Mar 8 9:45 PM
                                      • 0 Attachment
                                        On 08/03/2010 02:57 p.m., Tom Link wrote:
                                        >>> Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is
                                        >>> a version which check for existence of
                                        >>> lib\ruby\<long-ver>\i386-mingw32 directory. The patch should be
                                        >>> applied to clean Vim without old patch for Ruby integration.
                                        >
                                        > When using ruby 1.9.1 though
                                        >
                                        > set RUBY_VER=191
                                        > set RUBY_VER_LONG=1.9.1
                                        > set RUBY_PLATFORM=i386-mingw32
                                        >
                                        > at least on my computer, vim crashes when evaluating this line:
                                        >
                                        > :ruby require 'e2mmap'
                                        >
                                        > With ruby 1.8.7 everything is okay.
                                        >
                                        > Another thing I noticed (now with ruby 1.8.7 or 1.8.6). When you try
                                        >
                                        > :ruby p VIM::evaluate("input('Foo')")
                                        >
                                        > And press<esc>, you get an error message:
                                        >
                                        > ArgumentError:(eval):1240: in `evaluate`: NULL pointer given
                                        >
                                        > I get this message with vim 7.2-385 and this patch applied. I don't
                                        > see this message with vim version 7.2-119 without this patch.

                                        I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win
                                        XP.
                                        In my case, it crashes with both lines with the same message:

                                        --------------------
                                        Microsoft Visual C++ Runtime Library

                                        Runtime Error!

                                        Program: C:\Programmi\Vim\vim72\gvim.exe

                                        This application has requested the Runtime to terminate it in an unusual
                                        way.
                                        Please contact the application's support team for more information.
                                        --------------------

                                        Regards

                                        --
                                        Cesar

                                        --
                                        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
                                      • Cesar
                                        ... I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win XP. ... Microsoft Visual C++ Runtime Library Runtime Error! Program:
                                        Message 19 of 26 , Mar 9 7:13 AM
                                        • 0 Attachment
                                          On 08/03/2010 02:57 p.m., Tom Link wrote:
                                          >>> Ok, it seems the rule cannot be implemented in Make_ming.mak. Here is
                                          >>> a version which check for existence of
                                          >>> lib\ruby\<long-ver>\i386-mingw32 directory. The patch should be
                                          >>> applied to clean Vim without old patch for Ruby integration.
                                          >
                                          > When using ruby 1.9.1 though
                                          >
                                          > set RUBY_VER=191
                                          > set RUBY_VER_LONG=1.9.1
                                          > set RUBY_PLATFORM=i386-mingw32
                                          >
                                          > at least on my computer, vim crashes when evaluating this line:
                                          >
                                          > :ruby require 'e2mmap'
                                          >
                                          > With ruby 1.8.7 everything is okay.
                                          >
                                          > Another thing I noticed (now with ruby 1.8.7 or 1.8.6). When you try
                                          >
                                          > :ruby p VIM::evaluate("input('Foo')")
                                          >
                                          > And press<esc>, you get an error message:
                                          >
                                          > ArgumentError:(eval):1240: in `evaluate`: NULL pointer given
                                          >
                                          > I get this message with vim 7.2-385 and this patch applied. I don't
                                          > see this message with vim version 7.2-119 without this patch.

                                          I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win
                                          XP.
                                          In my case, it crashes with both lines with the same message:

                                          --------------------
                                          Microsoft Visual C++ Runtime Library

                                          Runtime Error!

                                          Program: C:\Programmi\Vim\vim72\gvim.exe

                                          This application has requested the Runtime to terminate it in an
                                          unusual way.
                                          Please contact the application's support team for more information.
                                          --------------------

                                          Regards

                                          --
                                          Cesar

                                          --
                                          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
                                        • Sergey Khorev
                                          ... It seems there are two issues here: 1) dynamic Ruby is not initialised properly for version 1.9.1 2) Ruby cannot create strings from NULL (perhaps after
                                          Message 20 of 26 , Mar 13 3:44 AM
                                          • 0 Attachment
                                            >> at least on my computer, vim crashes when evaluating this line:
                                            >>
                                            >>      :ruby require 'e2mmap'
                                            >>
                                            >> With ruby 1.8.7 everything is okay.
                                            >>
                                            >> Another thing I noticed (now with ruby 1.8.7 or 1.8.6). When you try
                                            >>
                                            >>      :ruby p VIM::evaluate("input('Foo')")
                                            >>
                                            >> And press<esc>, you get an error message:
                                            >>
                                            >>      ArgumentError:(eval):1240: in `evaluate`: NULL pointer given
                                            > I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win
                                            > XP.

                                            It seems there are two issues here:
                                            1) dynamic Ruby is not initialised properly for version 1.9.1
                                            2) Ruby cannot create strings from NULL (perhaps after 7.2.374)

                                            Attached patch provides clean up required.

                                            --
                                            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
                                          • Bram Moolenaar
                                            ... Thanks, I ll add it to the todo list. -- Seen on the back of a biker s vest: If you can read this, my wife fell off. /// Bram Moolenaar --
                                            Message 21 of 26 , Mar 13 5:10 AM
                                            • 0 Attachment
                                              Sergey Khorev wrote:

                                              > >> at least on my computer, vim crashes when evaluating this line:
                                              > >>
                                              > >> :ruby require 'e2mmap'
                                              > >>
                                              > >> With ruby 1.8.7 everything is okay.
                                              > >>
                                              > >> Another thing I noticed (now with ruby 1.8.7 or 1.8.6). When you try
                                              > >>
                                              > >> :ruby p VIM::evaluate("input('Foo')")
                                              > >>
                                              > >> And press<esc>, you get an error message:
                                              > >>
                                              > >> ArgumentError:(eval):1240: in `evaluate`: NULL pointer given
                                              > > I confirm this with vim 7.2-385 and ruby 1.9.1 built with mingw on Win
                                              > > XP.
                                              >
                                              > It seems there are two issues here:
                                              > 1) dynamic Ruby is not initialised properly for version 1.9.1
                                              > 2) Ruby cannot create strings from NULL (perhaps after 7.2.374)
                                              >
                                              > Attached patch provides clean up required.

                                              Thanks, I'll add it to the todo list.

                                              --
                                              Seen on the back of a biker's vest: If you can read this, my wife fell off.

                                              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                                              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                                              \\\ download, build and distribute -- http://www.A-A-P.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
                                            • Tom Link
                                              ... This seems to work. I had to make a few changes to Make_cyg.mak in order to compile it with USE_DLL=no. BTW since ruby 1.9 tends to break code ruby written
                                              Message 22 of 26 , Mar 13 5:21 AM
                                              • 0 Attachment
                                                > Attached patch provides clean up required.
                                                >
                                                >  ruby_dyn3.txt

                                                This seems to work. I had to make a few changes to Make_cyg.mak in
                                                order to compile it with USE_DLL=no.

                                                BTW since ruby 1.9 tends to break code ruby written for ruby 1.8, I
                                                think there should be an easy way to query ruby's version number.

                                                Regards,
                                                Tom


                                                diff -r 6c3c2e464a96 src/Make_cyg.mak
                                                --- a/src/Make_cyg.mak Wed Mar 10 16:12:48 2010 +0100
                                                +++ b/src/Make_cyg.mak Sat Mar 13 14:16:16 2010 +0100
                                                @@ -179,7 +179,9 @@
                                                RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
                                                endif
                                                else
                                                -ifndef RUBY_PLATFORM
                                                +ifneq ("X$(wildcard, $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-
                                                mingw32)", X)
                                                +RUBY_PLATFORM = i386-mingw32
                                                +else
                                                RUBY_PLATFORM = i386-mswin32
                                                endif
                                                ifndef RUBY_INSTALL_NAME
                                                @@ -189,6 +191,8 @@

                                                DEFINES += -DFEAT_RUBY
                                                INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
                                                +INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)
                                                +INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
                                                EXTRA_OBJS += $(OUTDIR)/if_ruby.o

                                                ifeq (yes, $(DYNAMIC_RUBY))
                                                @@ -334,6 +338,8 @@
                                                DEFINES += -D_MAX_PATH=256 -D__CYGWIN__
                                                else
                                                INCLUDES += -mno-cygwin
                                                +CC = gcc-3
                                                +CXX = g++-3
                                                endif

                                                ##############################
                                                @@ -474,7 +480,7 @@
                                                $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL)

                                                GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/
                                                gvimext.h
                                                - $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE)
                                                + $(MAKE) -C GvimExt -f Make_ming.mak CXX=$(CXX) CROSS_COMPILE=$
                                                (CROSS_COMPILE)

                                                vimrun.exe: vimrun.c
                                                $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS)

                                                --
                                                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
                                              • Sergey Khorev
                                                ... I am not sure I understood you correctly. Compiler detects Ruby version at compile time already (see numerous #ifdefs in if_ruby.c). And I do not think
                                                Message 23 of 26 , Mar 13 6:47 AM
                                                • 0 Attachment
                                                  > BTW since ruby 1.9 tends to break code ruby written for ruby 1.8, I
                                                  > think there should be an easy way to query ruby's version number.

                                                  I am not sure I understood you correctly. Compiler detects Ruby
                                                  version at compile time already (see numerous #ifdefs in if_ruby.c).
                                                  And I do not think there is a point in detecting version at run-time:
                                                  it looks Ruby developers do not care of C code compatibility.

                                                  > @@ -334,6 +338,8 @@
                                                  >  DEFINES += -D_MAX_PATH=256 -D__CYGWIN__
                                                  >  else
                                                  >  INCLUDES += -mno-cygwin
                                                  > +CC = gcc-3
                                                  > +CXX = g++-3
                                                  >  endif
                                                  >
                                                  >  ##############################

                                                  It seems implicitly requiring the latest Cygwin. I am not sure all
                                                  users upgraded to 1.7 already.

                                                  --
                                                  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
                                                • Chris Sutcliffe
                                                  ... It actually would require a current gcc/g++, not specifically Cygwin 1.7. The final gcc / g++ release for 1.5 also made this differentiation. Chris --
                                                  Message 24 of 26 , Mar 13 6:58 AM
                                                  • 0 Attachment
                                                    >> @@ -334,6 +338,8 @@
                                                    >>  DEFINES += -D_MAX_PATH=256 -D__CYGWIN__
                                                    >>  else
                                                    >>  INCLUDES += -mno-cygwin
                                                    >> +CC = gcc-3
                                                    >> +CXX = g++-3
                                                    >>  endif
                                                    >>
                                                    >>  ##############################
                                                    >
                                                    > It seems implicitly requiring the latest Cygwin. I am not sure all
                                                    > users upgraded to 1.7 already.

                                                    It actually would require a current gcc/g++, not specifically Cygwin
                                                    1.7. The final gcc / g++ release for 1.5 also made this
                                                    differentiation.

                                                    Chris

                                                    --
                                                    Chris Sutcliffe
                                                    http://emergedesktop.org
                                                    http://www.google.com/profiles/ir0nh34d

                                                    --
                                                    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
                                                  • Tom Link
                                                    ... I currently use has( ruby ) to check if vim has ruby support compiled in. With the move from ruby 1.8 to ruby 1.9, this doesn t guarantee that old ruby
                                                    Message 25 of 26 , Mar 13 7:42 AM
                                                    • 0 Attachment
                                                      > I am not sure I understood you correctly. Compiler detects Ruby
                                                      > version at compile time already (see numerous #ifdefs in if_ruby.c).
                                                      > And I do not think there is a point in detecting version at run-time:
                                                      > it looks Ruby developers do not care of C code compatibility.

                                                      I currently use has('ruby') to check if vim has ruby support compiled
                                                      in. With the move from ruby 1.8 to ruby 1.9, this doesn't guarantee
                                                      that old ruby code works. I could check the ruby version from ruby of
                                                      course by looking at the value of the RUBY_VERSION constant but I
                                                      though it would preferable to check the version right from vim, e.g.
                                                      with has('ruby19') or has('ruby18') or so. It was just an idea.

                                                      --
                                                      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.