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

Re: Can't compile latest Vim using Make_cyg.mak

Expand Messages
  • Christian J. Robinson
    ... I was able to get Make_ming.mak to compile a native Windows gvim.exe using Cygwin s MinGW packages as long as I don t try to include Ruby. When I try to
    Message 1 of 13 , Nov 20, 2012
    View Source
    • 0 Attachment
      On Thu, 15 Nov 2012, Christian J. Robinson wrote:

      > I would like to note that I have /never/ been able to get
      > Make_ming.mak to work under Cygwin, although other people appear to
      > know the "magic incantations." If someone could give me a hint,
      > perhaps it would work where Make_cyg.mak now fails.

      I was able to get Make_ming.mak to compile a native Windows gvim.exe
      using Cygwin's MinGW packages as long as I don't try to include Ruby.

      When I try to include Ruby I get the following errors:

      i686-w64-mingw32-gcc -c -Iproto -DWIN32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DHAVE_PATHDEF -DFEAT_BIG -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DMSWINPS -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -I/cygdrive/c/strawberry/perl/lib/Core -DFEAT_PERL -L/cygdrive/c/strawberry/perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl56.dll\" -DFEAT_RUBY -I /cygdrive/c/Ruby192/lib/ruby/1.9.1/i386-mingw32 -I /cygdrive/c/Ruby192/include/ruby-1.9.1 -I /cygdrive/c/Ruby192/include/ruby-1.9.1/i386-mingw32 -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby191.dll\" -DDYNAMIC_RUBY_VER=191 -DFEAT_PYTHON -DDYNAMIC_PYTHON -DFEAT_XPM_W32 -I xpm/x86/include -I xpm/x86/../include -O3 -fomit-frame-pointer -freg-struct-return -s if_ruby.c -o gobji386/if_ruby.o
      In file included from /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/defines.h:205:0,
      from /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/ruby.h:74,
      from /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby.h:32,
      from if_ruby.c:88:
      /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/win32.h:376:18: error: conflicting types for ‘fseeko’
      /usr/i686-w64-mingw32/sys-root/mingw/include/stdio.h:473:7: note: previous declaration of ‘fseeko’ was here
      /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/win32.h:377:18: error: conflicting types for ‘ftello’
      /usr/i686-w64-mingw32/sys-root/mingw/include/stdio.h:484:10: note: previous declaration of ‘ftello’ was here
      In file included from /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/ruby.h:1326:0,
      from /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby.h:32,
      from if_ruby.c:88:
      /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/missing.h:35:8: error: redefinition of ‘struct timespec’
      /usr/i686-w64-mingw32/sys-root/mingw/include/sys/types.h:89:8: note: originally defined here
      /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/missing.h:42:8: error: redefinition of ‘struct timezone’
      /usr/i686-w64-mingw32/sys-root/mingw/include/time.h:260:8: note: originally defined here
      if_ruby.c:339:21: error: static declaration of ‘rb_num2long_stub’ follows non-static declaration
      /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/ruby.h:478:14: note: previous declaration of ‘rb_num2long_stub’ was here
      if_ruby.c:343:14: error: static declaration of ‘rb_int2big_stub’ follows non-static declaration
      /cygdrive/c/Ruby192/include/ruby-1.9.1/ruby/intern.h:85:7: note: previous declaration of ‘rb_int2big_stub’ was here
      Make_ming.mak:715: recipe for target `gobji386/if_ruby.o' failed
      make: *** [gobji386/if_ruby.o] Error 1


      I wonder if this would be a problem if I used a non-Cygwin MinGW
      distribution, but this has become too much trouble already. Hopefully
      someone can suggest a fix, or I'll just live without the Ruby
      interpreter. (+perl/dyn and +python/dyn were included without issue.)

      - Christian

      --
      "Once," adverb: Enough.
      Christian J. Robinson <heptite@...> http://christianrobinson.name/

      --
      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
    • Steve Hall
      On Tue, Nov 20, 2012 at 4:53 PM, Christian J. Robinson ... [...] ... I ve been seeing this for a year with a Cygwin GCC build, starting with the Ruby 1.9
      Message 2 of 13 , Nov 20, 2012
      View Source
      • 0 Attachment
        On Tue, Nov 20, 2012 at 4:53 PM, Christian J. Robinson
        <heptite@...> wrote:
        >
        > I was able to get Make_ming.mak to compile a native Windows gvim.exe
        > using Cygwin's MinGW packages as long as I don't try to include
        > Ruby.
        >
        > When I try to include Ruby I get the following errors:
        [...]
        >
        > I wonder if this would be a problem if I used a non-Cygwin MinGW
        > distribution, but this has become too much trouble already.
        > Hopefully someone can suggest a fix, or I'll just live without the
        > Ruby interpreter. (+perl/dyn and +python/dyn were included without
        > issue.)

        I've been seeing this for a year with a Cygwin GCC build, starting
        with the Ruby 1.9 series. Something changed so that Vim's build no
        longer finds the necessary Ruby libraries, for me starting with
        ruby.h. I've spent hours (one today!), but never could track it down.

        --
        Steve Hall [ digitect dancingpaper com ]

        --
        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
      • Christian J. Robinson
        ... I think in my case it s not a problem of finding the libraries (or includes) but that the .h files included for Ruby have collisions with files already
        Message 3 of 13 , Nov 20, 2012
        View Source
        • 0 Attachment
          On Tue, 20 Nov 2012, Steve Hall wrote:

          > On Tue, Nov 20, 2012 at 4:53 PM, Christian J. Robinson
          > <heptite@...> wrote:
          >>
          >> I was able to get Make_ming.mak to compile a native Windows
          >> gvim.exe using Cygwin's MinGW packages as long as I don't try to
          >> include Ruby.
          >>
          >> When I try to include Ruby I get the following errors:
          > [...]
          >
          > I've been seeing this for a year with a Cygwin GCC build, starting
          > with the Ruby 1.9 series. Something changed so that Vim's build no
          > longer finds the necessary Ruby libraries, for me starting with
          > ruby.h. I've spent hours (one today!), but never could track it
          > down.

          I think in my case it's not a problem of finding the libraries (or
          includes) but that the .h files included for Ruby have "collisions"
          with files already included by Cygwin's standard .h files, so the
          compile errors out.

          I did some Googling, and found that this problem doesn't only exist
          with compiling Vim, and someone suggested that it's the fault of the
          Ruby .h files, which should only be defining these things if they're
          not already defined. If this is the case, I wonder if the Vim sources
          could somehow be tweaked to work around this problem. My C is getting
          increasingly rusty, and my competence was never beyond a beginner's
          level anyway, so at this point I'm not really sure how to attempt it.

          - Christian

          --
          "If you choose not to decide, you still have made a choice." -- Rush
          Christian J. Robinson <heptite@...> http://christianrobinson.name/

          --
          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
        • Ken Takata
          Hi, I think that Make_cyg.mak needs some additional include dirs for ruby 1.9. After applying the attached patch, I can compile with the following command: $
          Message 4 of 13 , Nov 22, 2012
          View Source
          • 0 Attachment
            Hi,

            I think that Make_cyg.mak needs some additional include dirs for ruby 1.9.
            After applying the attached patch, I can compile with the following command:

            $ make -f Make_cyg.mak CC=gcc-3 CXX=g++-3 RUBY='/path/to/ruby1.9.3' RUBY_VER=19 RUBY_VER_LONG=1.9.1

            Using i686-pc-mingw32-gcc instead of gcc-3 also works,
            but i686-w64-mingw32-gcc doesn't seem to work for ruby interface.

            Best regards,
            Ken Takata

            --
            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
          • Christian J. Robinson
            ... And yet I still get the undefined reference to _pow error, regardless of which version of gcc I use. - Christian -- We are what we pretend to be, so we
            Message 5 of 13 , Nov 22, 2012
            View Source
            • 0 Attachment
              On Thu, 22 Nov 2012, Ken Takata wrote:

              > I think that Make_cyg.mak needs some additional include dirs for
              > ruby 1.9.
              > After applying the attached patch, I can compile with the following command:
              >
              > $ make -f Make_cyg.mak CC=gcc-3 CXX=g++-3 RUBY='/path/to/ruby1.9.3' RUBY_VER=19 RUBY_VER_LONG=1.9.1
              >
              > Using i686-pc-mingw32-gcc instead of gcc-3 also works,
              > but i686-w64-mingw32-gcc doesn't seem to work for ruby interface.

              And yet I still get the undefined reference to _pow error, regardless
              of which version of gcc I use.

              - Christian

              --
              "We are what we pretend to be, so we must be careful what we pretend to be."
              -- Kurt Vonnegut
              Christian J. Robinson <heptite@...> http://christianrobinson.name/

              --
              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
              ... Looking at Make_mvc.mak, the extra directories are only used when the Ruby version is 1.9 or later. Not for 1.8. -- hundred-and-one symptoms of being an
              Message 6 of 13 , Nov 23, 2012
              View Source
              • 0 Attachment
                Ken Takata wrote:

                > I think that Make_cyg.mak needs some additional include dirs for ruby 1.9.
                > After applying the attached patch, I can compile with the following command:
                >
                > $ make -f Make_cyg.mak CC=gcc-3 CXX=g++-3 RUBY='/path/to/ruby1.9.3' RUBY_VER=19 RUBY_VER_LONG=1.9.1
                >
                > Using i686-pc-mingw32-gcc instead of gcc-3 also works,
                > but i686-w64-mingw32-gcc doesn't seem to work for ruby interface.

                Looking at Make_mvc.mak, the extra directories are only used when the
                Ruby version is 1.9 or later. Not for 1.8.


                --
                hundred-and-one symptoms of being an internet addict:
                58. You turn on your computer and turn off your wife.

                /// Bram Moolenaar -- Bram@... -- 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
              • Ken Takata
                Hi Bram, ... Oh, I didn t notice that. How about this patch? Thanks, Ken Takata -- You received this message from the vim_dev maillist. Do not top-post! Type
                Message 7 of 13 , Nov 23, 2012
                View Source
                • 0 Attachment
                  Hi Bram,

                  Bram Moolenaar wrote:
                  > Looking at Make_mvc.mak, the extra directories are only used when the
                  > Ruby version is 1.9 or later. Not for 1.8.

                  Oh, I didn't notice that.
                  How about this patch?

                  Thanks,
                  Ken Takata

                  --
                  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
                • Ken Takata
                  Hi Bram, ... And I think this is the same for Make_ming.mak. Thanks, Ken Takata -- You received this message from the vim_dev maillist. Do not top-post! Type
                  Message 8 of 13 , Nov 23, 2012
                  View Source
                  • 0 Attachment
                    Hi Bram,

                    Ken Takata wrote:
                    > Bram Moolenaar wrote:
                    > > Looking at Make_mvc.mak, the extra directories are only used when the
                    > > Ruby version is 1.9 or later. Not for 1.8.
                    >
                    > Oh, I didn't notice that.
                    > How about this patch?

                    And I think this is the same for Make_ming.mak.

                    Thanks,
                    Ken Takata

                    --
                    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
                  • Ken Takata
                    Hi Christian, ... Hmm, strange. The symbol _pow is usually defined in a library libmsvcrt.a which is linked by default. Can you compile a program just using
                    Message 9 of 13 , Nov 23, 2012
                    View Source
                    • 0 Attachment
                      Hi Christian,

                      2012/11/23 Fri 11:50:49 UTC+9 Heptite:

                      > And yet I still get the undefined reference to _pow error, regardless
                      > of which version of gcc I use.

                      Hmm, strange.
                      The symbol _pow is usually defined in a library libmsvcrt.a which
                      is linked by default.
                      Can you compile a program just using pow()?

                      For example:
                      $ cat a.c
                      #include <math.h>
                      int main()
                      {
                      return (int) pow(2, 3);
                      }

                      $ i686-pc-mingw32-gcc a.c (or gcc-3 -mno-cygwin a.c)

                      $ ./a; echo $?
                      8

                      Thanks,
                      Ken Takata

                      --
                      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
                    • Christian J. Robinson
                      ... Yes, this works fine. -- Please avoid sending me Word or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html Christian J.
                      Message 10 of 13 , Nov 24, 2012
                      View Source
                      • 0 Attachment
                        On Fri, 23 Nov 2012, Ken Takata wrote:

                        > Can you compile a program just using pow()?
                        >
                        > For example:
                        > $ cat a.c
                        > #include <math.h>
                        > int main()
                        > {
                        > return (int) pow(2, 3);
                        > }
                        >
                        > $ i686-pc-mingw32-gcc a.c (or gcc-3 -mno-cygwin a.c)
                        >
                        > $ ./a; echo $?
                        > 8

                        Yes, this works fine.


                        --
                        Please avoid sending me Word or PowerPoint attachments.
                        See http://www.fsf.org/philosophy/no-word-attachments.html
                        Christian J. Robinson <heptite@...> http://christianrobinson.name/

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