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

Trying to build macvim from source with ruby interp enable fails in if_ruby.c: ~960

Expand Messages
  • Steven G. Harms
    Historically done: 1. Git clone the source (git://repo.or.cz/MacVim.git) In build attempt: 1. git pull 2. ./configure --with-features=huge
    Message 1 of 7 , Feb 19, 2010
    • 0 Attachment
      Historically done:
      1. Git clone the source (git://repo.or.cz/MacVim.git)

      In build attempt:
      1. git pull
      2. ./configure --with-features=huge --enable-rubyinterp
      3. make
      {copious output}

      and then....

      Starting make in the src directory.
      If there are problems, cd to the src directory and run make there
      cd src && make first
      gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-
      unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O2 -
      D_FORTIFY_SOURCE=1 -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0 -
      o objects/if_ruby.o if_ruby.c
      if_ruby.c:52:24: error: Ruby/ruby.h: No such file or directory
      if_ruby.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
      before ‘objtbl’
      if_ruby.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
      before ‘mVIM’
      if_ruby.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
      before ‘cBuffer’
      if_ruby.c:81: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
      before ‘cVimWindow’
      if_ruby.c:82: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
      before ‘eDeletedBufferError’
      if_ruby.c:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
      before ‘eDeletedWindowError’
      if_ruby.c: In function ‘ex_ruby’:
      if_ruby.c:338: warning: implicit declaration of function
      ‘rb_eval_string_protect’
      if_ruby.c: In function ‘ex_rubydo’:
      if_ruby.c:357: error: ‘VALUE’ undeclared (first use in this function)


      1. I did as the error suggested, cd src && make first and ....

      gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-
      unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O2 -
      D_FORTIFY_SOURCE=1 -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0 -
      o objects/if_ruby.o if_ruby.c
      if_ruby.c:52:24: error: Ruby/ruby.h: No such file or directory

      2. is the problem this ruby.h? Why don't I seem to have it?

      Can any guru point me the way forward?





      --
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • björn
      ... It seems configure is picking up a bad include flag (have you installed a custom version of Ruby in /usr/local perhaps?):
      Message 2 of 7 , Feb 19, 2010
      • 0 Attachment
        On 19 February 2010 20:56, Steven G. Harms wrote:
        > Historically done:
        > 1.  Git clone the source (git://repo.or.cz/MacVim.git)
        >
        > In build attempt:
        > 1. git pull
        > 2.  ./configure --with-features=huge --enable-rubyinterp
        > 3.  make
        > {copious output}
        >
        > and then....
        >
        > Starting make in the src directory.
        > If there are problems, cd to the src directory and run make there
        > cd src && make first
        > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-
        > unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -
        > D_FORTIFY_SOURCE=1       -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0  -
        > o objects/if_ruby.o if_ruby.c
        > if_ruby.c:52:24: error: Ruby/ruby.h: No such file or directory
        > if_ruby.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
        > before ‘objtbl’
        > if_ruby.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
        > before ‘mVIM’
        > if_ruby.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
        > before ‘cBuffer’
        > if_ruby.c:81: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
        > before ‘cVimWindow’
        > if_ruby.c:82: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
        > before ‘eDeletedBufferError’
        > if_ruby.c:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
        > before ‘eDeletedWindowError’
        > if_ruby.c: In function ‘ex_ruby’:
        > if_ruby.c:338: warning: implicit declaration of function
        > ‘rb_eval_string_protect’
        > if_ruby.c: In function ‘ex_rubydo’:
        > if_ruby.c:357: error: ‘VALUE’ undeclared (first use in this function)
        >
        >
        > 1.  I did as the error suggested, cd src && make first and ....
        >
        > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-
        > unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -
        > D_FORTIFY_SOURCE=1       -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0  -
        > o objects/if_ruby.o if_ruby.c
        > if_ruby.c:52:24: error: Ruby/ruby.h: No such file or directory
        >
        > 2.  is the problem this ruby.h?  Why don't I seem to have it?
        >
        > Can any guru point me the way forward?

        It seems configure is picking up a bad include flag (have you
        installed a custom version of Ruby in /usr/local perhaps?):

        -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0

        That should not be there...you can delete it manually from
        src/auto/config.mk and everything should work. Not sure why the
        problem appears in the first place though....the only way I can see
        this happening is if you deleted the default Ruby install from

        /System/Library/Frameworks/Ruby.framework

        Does this framework still exist on your machine? If not, then it will
        not work by simply deleting the -I flag above either.

        Björn

        --
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Steven G. Harms
        Björn, You re right on several counts. 1. I do a lot of experimentation with Ruby, and as such the default Ruby.framework solution helpfully provided by
        Message 3 of 7 , Feb 20, 2010
        • 0 Attachment
          Björn,

          You're right on several counts.

          1. I do a lot of experimentation with Ruby, and as such the default
          Ruby.framework solution "helpfully" provided by Apple kept getting in
          the way. Therefore, it is gone. Furthermore, something of appeal to
          me lately is to have everything gathered from the net and installed on
          my machine to be done in a nice, neat, orderly fashion: into /usr/
          local the way we used to do on Unices.

          2. Data to support this:

          stharms@stharms-mac:/usr/local/src/vim7$ ls -l /System/Library/
          Frameworks/RubyCocoa.framework/
          stharms@stharms-mac:/usr/local/src/vim7$ which ruby
          /usr/bin/ruby
          stharms@stharms-mac:/usr/local/src/vim7$ ls -l /usr/bin/ruby
          lrwxr-xr-x 1 root wheel 19 Jan 20 04:17 /usr/bin/ruby -> /usr/local/
          bin/ruby
          stharms@stharms-mac:/usr/local/src/vim7$ ls -l /usr/local/bin/ruby
          -rwxr-xr-x 1 root wheel 8976 Jan 19 21:12 /usr/local/bin/ruby
          stharms@stharms-mac:/usr/local/src/vim7$ !$ --version
          /usr/local/bin/ruby --version
          ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.2.0]

          3. This leads me to ask, is there a way to have --enable-rubyinterp
          respect my custom Ruby installdir?

          Excellent work, on your part, given my very little bit of
          information! No wonder you're the maintainer :)

          Steven






          On Feb 19, 3:17 pm, björn <bjorn.winck...@...> wrote:
          > On 19 February 2010 20:56, Steven G. Harms wrote:
          >
          >
          >
          >
          >
          > > Historically done:
          > > 1.  Git clone the source (git://repo.or.cz/MacVim.git)
          >
          > > In build attempt:
          > > 1. git pull
          > > 2.  ./configure --with-features=huge --enable-rubyinterp
          > > 3.  make
          > > {copious output}
          >
          > > and then....
          >
          > > Starting make in the src directory.
          > > If there are problems, cd to the src directory and run make there
          > > cd src && make first
          > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-
          > > unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -
          > > D_FORTIFY_SOURCE=1       -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0  -
          > > o objects/if_ruby.o if_ruby.c
          > > if_ruby.c:52:24: error: Ruby/ruby.h: No such file or directory
          > > if_ruby.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
          > > before ‘objtbl’
          > > if_ruby.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
          > > before ‘mVIM’
          > > if_ruby.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
          > > before ‘cBuffer’
          > > if_ruby.c:81: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
          > > before ‘cVimWindow’
          > > if_ruby.c:82: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
          > > before ‘eDeletedBufferError’
          > > if_ruby.c:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
          > > before ‘eDeletedWindowError’
          > > if_ruby.c: In function ‘ex_ruby’:
          > > if_ruby.c:338: warning: implicit declaration of function
          > > ‘rb_eval_string_protect’
          > > if_ruby.c: In function ‘ex_rubydo’:
          > > if_ruby.c:357: error: ‘VALUE’ undeclared (first use in this function)
          >
          > > 1.  I did as the error suggested, cd src && make first and ....
          >
          > > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-
          > > unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -
          > > D_FORTIFY_SOURCE=1       -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0  -
          > > o objects/if_ruby.o if_ruby.c
          > > if_ruby.c:52:24: error: Ruby/ruby.h: No such file or directory
          >
          > > 2.  is the problem this ruby.h?  Why don't I seem to have it?
          >
          > > Can any guru point me the way forward?
          >
          > It seems configure is picking up a bad include flag (have you
          > installed a custom version of Ruby in /usr/local perhaps?):
          >
          > -I/usr/local/lib/ruby/1.8/i686-darwin10.2.0
          >
          > That should not be there...you can delete it manually from
          > src/auto/config.mk and everything should work.  Not sure why the
          > problem appears in the first place though....the only way I can see
          > this happening is if you deleted the default Ruby install from
          >
          > /System/Library/Frameworks/Ruby.framework
          >
          > Does this framework still exist on your machine?  If not, then it will
          > not work by simply deleting the -I flag above either.
          >
          > Björn

          --
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • björn
          ... The problem is that the configure file expects there to be a Ruby.framework on your computer -- installing a plain non-framework of Ruby requires the Ruby
          Message 4 of 7 , Feb 20, 2010
          • 0 Attachment
            On 20 February 2010 19:34, Steven G. Harms wrote:
            >
            > 1.  I do a lot of experimentation with Ruby, and as such the default
            > Ruby.framework solution "helpfully" provided by Apple kept getting in
            > the way.  Therefore, it is gone. Furthermore, something of appeal to
            > me lately is to have everything gathered from the net and installed on
            > my machine to be done in a nice, neat, orderly fashion:  into /usr/
            > local the way we used to do on Unices.
            >
            > 2.  Data to support this:
            >
            > stharms@stharms-mac:/usr/local/src/vim7$ ls -l /System/Library/
            > Frameworks/RubyCocoa.framework/
            > stharms@stharms-mac:/usr/local/src/vim7$ which ruby
            > /usr/bin/ruby
            > stharms@stharms-mac:/usr/local/src/vim7$ ls -l /usr/bin/ruby
            > lrwxr-xr-x  1 root  wheel  19 Jan 20 04:17 /usr/bin/ruby -> /usr/local/
            > bin/ruby
            > stharms@stharms-mac:/usr/local/src/vim7$ ls -l /usr/local/bin/ruby
            > -rwxr-xr-x  1 root  wheel  8976 Jan 19 21:12 /usr/local/bin/ruby
            > stharms@stharms-mac:/usr/local/src/vim7$ !$ --version
            > /usr/local/bin/ruby --version
            > ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.2.0]
            >
            > 3. This leads me to ask, is there a way to have --enable-rubyinterp
            > respect my custom Ruby installdir?

            The problem is that the configure file expects there to be a
            Ruby.framework on your computer -- installing a plain non-framework of
            Ruby requires the Ruby header files to be included differently. You
            can work around this manually as follows:

            1. open src/if_ruby.h
            2. edit the line which says
            #include <Ruby/ruby.h>
            to say
            #include <ruby.h>
            3. make

            It would be possible to rewrite the configure script to allow for a
            missing Ruby.framework, but I must say that it really is not a good
            idea to delete things from subfolders of /System so it's not something
            I want to encourage. For now, I'll leave things as they are: if more
            people face this problem I may reconsider my stance and modify the
            configure script.

            Björn

            --
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Steven G. Harms
            Bjön, You were absolutely right, this worked with a slight modification. I had to edit if_ruby.c, but made the change from to just as
            Message 5 of 7 , Feb 21, 2010
            • 0 Attachment
              Bjön,

              You were absolutely right, this worked with a slight modification.

              I had to edit if_ruby.c, but made the change from <Ruby/ruby.h> to
              <ruby.h> just as you said.

              That said, I'm all built properly. Thanks.

              Steven


              On Feb 20, 11:00 am, björn <bjorn.winck...@...> wrote:
              > On 20 February 2010 19:34, Steven G. Harms wrote:
              >
              >
              >
              >
              >
              >
              >
              > > 1.  I do a lot of experimentation with Ruby, and as such the default
              > > Ruby.framework solution "helpfully" provided by Apple kept getting in
              > > the way.  Therefore, it is gone. Furthermore, something of appeal to
              > > me lately is to have everything gathered from the net and installed on
              > > my machine to be done in a nice, neat, orderly fashion:  into /usr/
              > > local the way we used to do on Unices.
              >
              > > 2.  Data to support this:
              >
              > > stharms@stharms-mac:/usr/local/src/vim7$ ls -l /System/Library/
              > > Frameworks/RubyCocoa.framework/
              > > stharms@stharms-mac:/usr/local/src/vim7$ which ruby
              > > /usr/bin/ruby
              > > stharms@stharms-mac:/usr/local/src/vim7$ ls -l /usr/bin/ruby
              > > lrwxr-xr-x  1 root  wheel  19 Jan 20 04:17 /usr/bin/ruby -> /usr/local/
              > > bin/ruby
              > > stharms@stharms-mac:/usr/local/src/vim7$ ls -l /usr/local/bin/ruby
              > > -rwxr-xr-x  1 root  wheel  8976 Jan 19 21:12 /usr/local/bin/ruby
              > > stharms@stharms-mac:/usr/local/src/vim7$ !$ --version
              > > /usr/local/bin/ruby --version
              > > ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.2.0]
              >
              > > 3. This leads me to ask, is there a way to have --enable-rubyinterp
              > > respect my custom Ruby installdir?
              >
              > The problem is that the configure file expects there to be a
              > Ruby.framework on your computer -- installing a plain non-framework of
              > Ruby requires the Ruby header files to be included differently.  You
              > can work around this manually as follows:
              >
              > 1. open src/if_ruby.h
              > 2. edit the line which says
              >     #include <Ruby/ruby.h>
              > to say
              >     #include <ruby.h>
              > 3. make
              >
              > It would be possible to rewrite the configure script to allow for a
              > missing Ruby.framework, but I must say that it really is not a good
              > idea to delete things from subfolders of /System so it's not something
              > I want to encourage.  For now, I'll leave things as they are: if more
              > people face this problem I may reconsider my stance and modify the
              > configure script.
              >
              > Björn

              --
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
            • Austin Ziegler
              ... It could be possible to modify this so that you could do --with-ruby=/usr/local and do a conditional compile, e.g.: g++ -DWITH_ALTERNATE_RUBY
              Message 6 of 7 , Feb 23, 2010
              • 0 Attachment
                On Feb 20, 2:00 pm, björn <bjorn.winck...@...> wrote:
                > On 20 February 2010 19:34, Steven G. Harms wrote:
                >> 3. This leads me to ask, is there a way to have --enable-rubyinterp
                >> respect my custom Ruby installdir?
                > The problem is that the configure file expects there to be a
                > Ruby.framework on your computer -- installing a plain non-framework of
                > Ruby requires the Ruby header files to be included differently. You
                > can work around this manually as follows:

                It could be possible to modify this so that you could do
                --with-ruby=/usr/local and do a conditional compile, e.g.:

                g++ -DWITH_ALTERNATE_RUBY -I<with-ruby-interp-location> ...

                WITH_ALTERNATE_RUBY would allow if_ruby.h to be:

                #if defined(WITH_ALTERNATE_RUBY)
                # include <ruby.h>
                #else
                # include <Ruby/ruby.h>
                #endif

                I think that people who want to use alternate installations of Ruby
                (or
                anything else for that matter) should be able to enable such, but the
                configure script shouldn't automate any of that if the system
                framework
                is missing. Messing with system frameworks is a bad idea.

                -austin

                --
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
              • Austin Ziegler
                ... It could be possible to modify this so that you could do --with-ruby=/usr/local and do a conditional compile, e.g.: g++ -DWITH_ALTERNATE_RUBY
                Message 7 of 7 , Feb 23, 2010
                • 0 Attachment
                  On Feb 20, 2:00 pm, björn <bjorn.winck...@...> wrote:
                  > On 20 February 2010 19:34, Steven G. Harms wrote:
                  >> 3. This leads me to ask, is there a way to have --enable-rubyinterp
                  >> respect my custom Ruby installdir?
                  > The problem is that the configure file expects there to be a
                  > Ruby.framework on your computer -- installing a plain non-framework of
                  > Ruby requires the Ruby header files to be included differently. You
                  > can work around this manually as follows:

                  It could be possible to modify this so that you could do
                  --with-ruby=/usr/local and do a conditional compile, e.g.:

                  g++ -DWITH_ALTERNATE_RUBY -I<with-ruby-interp-location> ...

                  WITH_ALTERNATE_RUBY would allow if_ruby.h to be:

                  #if defined(WITH_ALTERNATE_RUBY)
                  # include <ruby.h>
                  #else
                  # include <Ruby/ruby.h>
                  #endif

                  I think that people who want to use alternate installations of Ruby
                  (or
                  anything else for that matter) should be able to enable such, but the
                  configure script shouldn't automate any of that if the system
                  framework
                  is missing. Messing with system frameworks is a bad idea.

                  -austin

                  --
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                Your message has been successfully submitted and would be delivered to recipients shortly.