≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1759

Bug #1759: symbol lookup error using Rubinius

Kind bug
Product Command-T
When Created 2010-12-14T01:31:36Z, updated 2010-12-15T00:11:26Z
Status closed
Reporter jc00ke
Tags no tags

Description

I'm using rbx-head through rvm ([rubinius 1.1.1 (1.8.7 94f68ec0 2010-11-16 JI)] and I'm not able to update Command-T to 1.0. I'm on Ubuntu 10.10.

  1. Download to /tmp
  2. cd /tmp && vim command-t-1.0.vba
  3. :so %
  4. <CR>
  5. :qa<CR>
  6. cd ~/.vim/ruby/command-t
  7. ruby extconf.rb
  8. make
gcc -I. -I. -I/home/jesse/.rvm/rubies/rbx-head/include -I. -DHAVE_RUBY_H  -fPIC -ggdb3 -O2 -fPIC  -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c
gcc -I. -I. -I/home/jesse/.rvm/rubies/rbx-head/include -I. -DHAVE_RUBY_H  -fPIC -ggdb3 -O2 -fPIC  -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c
gcc -I. -I. -I/home/jesse/.rvm/rubies/rbx-head/include -I. -DHAVE_RUBY_H  -fPIC -ggdb3 -O2 -fPIC  -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c
matcher.c: In function ‘CommandTMatcher_sorted_matchers_for’:
matcher.c:118: warning: comparison between signed and unsigned integer expressions
matcher.c:129: warning: comparison between signed and unsigned integer expressions
cc -shared -o ext.so match.o ext.o matcher.o -L. -L/home/jesse/.rvm/rubies/rbx-head/lib

Then when I run vim I get:

vim: symbol lookup error: /home/jesse/.vim/ruby/command-t/ext.so: undefined symbol: capi_get_constant

Any ideas? I use Rubinius as my default ruby and would LOVE IT if Command-T worked with it.

I'm also not able to downgrade successfully. I tried using 1.9.2 but that doesn't seem to work. I'll try MRI 1.8.7.

Comments

  1. Greg Hurrell 2010-12-14T16:32:39Z

    I have no experience with Rubinius myself, but I understand from this article that not all C extensions will be out of the box compatible with it.

    One thing I notice is the signed/unsigned comparison warning in your make output there. Building against MRI there is no such warning, seeing as both variables are of long/pointer type. So I don't know what Rubinius is doing with the RARRAY_LEN macro, but whatever it is, it's expecting a different type.

    That's probably not the issue though. When you start playing around with different versions of Ruby, you will need to build and link Vim against the same version of Ruby as you're using to build Command-T. A simpler solution may be just to go with stock standard Ruby, which is what I'd recommend (your system's Ruby install should be a tool that enables you to get things done, not a toy for you to play around with). Just my opinion though.

  2. jc00ke 2010-12-14T22:25:47Z

    Do you have any ideas on how to support command-t using different rubies via RVM? I'd be willing to donate to the project if it took some time.

  3. Greg Hurrell 2010-12-14T22:31:23Z

    Well, it all boils down to one simple rule of thumb, whether you're using RVM or anything else: you must build Command-T using the exact same Ruby that was used to build Vim. On most operating systems/distros, that means using the stock system Ruby. If you don't want that, then you'll have to get your hands dirty and build both Command-T and Vim yourself.

    If you are using RVM and want to build Command-T using the system Ruby, see the note in the docs about switching back to the system Ruby temporarily for the build.

    As for supporting different Rubies, there will always only be a subset that can be supported, which are those which support the building of C extensions. So this immediately rules out JRuby and I imagine a few others as well. When you posted this ticket originally I was quite surprised, as I had no idea that Rubinius even remotely supported the notion of C extensions.

    The Command-T code itself should work fine with both Ruby 1.8.7 and 1.9 as well, but I generally don't recommend using 1.9 as there are issues with it that go beyond the scope of Command-T. (If you check this issue tracker you'll see some previous tickets describing these issues.)

  4. jc00ke 2010-12-15T00:00:01Z

    Well, I went back and built it with 1.8.7-p302 and it works. I'm pretty sure I tried that but maybe I didn't. Even worked after switching to Rubinius and 1.9.2.

    Yeah, Rubinius has had pretty good support for C extensions for a while now.

    Regardless, thanks! Building it with 1.8.7 did the trick.

  5. Greg Hurrell 2010-12-15T00:11:18Z

    Glad to hear you got it sorted out.

  6. Greg Hurrell 2010-12-15T00:11:26Z

    Status changed:

    • From: new
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets