Bug 752785 - RFE: remove dependency to perl and ruby
Summary: RFE: remove dependency to perl and ruby
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 847428 847482
TreeView+ depends on / blocked
 
Reported: 2011-11-10 12:38 UTC by Mads Kiilerich
Modified: 2012-10-30 14:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-30 14:30:08 UTC
Type: ---


Attachments (Terms of Use)

Description Mads Kiilerich 2011-11-10 12:38:24 UTC
Fedora doesn't have many dependencies to perl and ruby, so vim-enhanced is the primary reason they are installed on my system.

That would be fine if vim-enhanced actually used these languages, but as far as I can see it is only used to embed the interpreter into vim. I doubt many vim users use that - I certainly don't. I would like to not have that dependency.

It seems like --enable-pythoninterp=dynamic works just fine. It removes the static dependency, and Python commands can be used if libpython can be found on runtime, and if not it gives a fine error message. Unfortunately it seems like --enable-rubyinterp=dynamic doesn't work and --enable-perlinterp=dynamic doesn't make the dependency dynamic. I think it would be great if the vim package could move in the direction of keeping the language support but make it dynamic.

Alternatively, I don't think much would be lost by disabling perl and ruby.

Comment 1 Vít Ondruch 2012-08-01 11:33:44 UTC
(In reply to comment #0)
> Fedora doesn't have many dependencies to perl and ruby, so vim-enhanced is
> the primary reason they are installed on my system.
> 
> That would be fine if vim-enhanced actually used these languages, but as far
> as I can see it is only used to embed the interpreter into vim. I doubt many
> vim users use that - I certainly don't. I would like to not have that
> dependency.
> 
> It seems like --enable-pythoninterp=dynamic works just fine. It removes the
> static dependency, and Python commands can be used if libpython can be found
> on runtime, and if not it gives a fine error message. Unfortunately it seems
> like --enable-rubyinterp=dynamic doesn't work and
> --enable-perlinterp=dynamic doesn't make the dependency dynamic. I think it
> would be great if the vim package could move in the direction of keeping the
> language support but make it dynamic.

+1 for making it dynamic.

> Alternatively, I don't think much would be lost by disabling perl and ruby.

-1 - I can't agree. I am using command-t plugin which is written in Ruby and I'd like to package it for Fedora, although I'm not sure if I'll be successful.

Comment 2 Shivaram Lingamneni 2012-08-13 02:08:23 UTC
It seems like fixing this (i.e., supporting ruby via --enable-rubyinterp=dynamic) would be a good resolution for https://bugzilla.redhat.com/show_bug.cgi?id=847428 .

Here's what I get when I try to recompile vim-7.3.556-1.fc17.src.rpm using --enable-rubyinterp=dynamic (against ruby/ruby-devel 1.9.3.194):

link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
  gcc   -L. -Wl,-z,relro -rdynamic -Wl,-export-dynamic  -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE   -L/usr/local/lib -Wl,--as-needed      -o vim objects/buffer.o objects/blowfish.o objects/charset.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o objects/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o  objects/if_cscope.o objects/if_xcmdsrv.o objects/mark.o objects/memline.o objects/menu.o objects/message.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/sha256.o objects/spell.o objects/syntax.o  objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/version.o objects/window.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/pty.o objects/gui_gtk_f.o objects/gui_beval.o   objects/if_perl.o objects/if_perlsfio.o objects/if_python.o objects/py_config.o   objects/if_ruby.o   objects/netbeans.o  objects/main.o objects/memfile.o   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lm -lnsl  -lselinux  -lncurses -lacl -lattr -ldl    -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector  -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -L/usr/lib64/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic      
objects/if_ruby.o: In function `buffer_s_aref':
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:927: undefined reference to `rb_fix2int'
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:927: undefined reference to `rb_num2int'
objects/if_ruby.o: In function `window_s_aref':
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:1162: undefined reference to `rb_fix2int'
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:1162: undefined reference to `rb_num2int'
objects/if_ruby.o: In function `window_set_width':
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:1212: undefined reference to `rb_num2int'
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:1212: undefined reference to `rb_fix2int'
objects/if_ruby.o: In function `window_set_height':
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:1194: undefined reference to `rb_num2int'
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:1194: undefined reference to `rb_fix2int'
objects/if_ruby.o: In function `window_set_cursor':
/home/shivaram/rpmbuild/BUILD/vim73/src/if_ruby.c:1235: undefined reference to `rb_num2uint'
collect2: error: ld returned 1 exit status
link.sh: Linking failed

Comment 3 Shivaram Lingamneni 2012-08-15 09:25:08 UTC
Does anyone know if the problem has been reported upstream?

Comment 4 Vít Ondruch 2012-09-18 12:59:52 UTC
I've prepared patch which allow to build +ruby/dyn [1]. Unfortunately, it tries to load rubylib.so, which is only available in -devel subpackage. Not nice :/



[1] https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/ifgqrTYEeCM

Comment 5 Vít Ondruch 2012-09-20 08:04:57 UTC
I also made patch fixing the .so thing. It is available in the ticket referenced above.

Comment 6 Vít Ondruch 2012-09-20 08:19:37 UTC
And since I've been there already, I fixed a few other Ruby related issues: https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/43UC8Ib_6FY

Comment 8 Mads Kiilerich 2012-10-30 14:30:08 UTC
vim-enhanced-7.3.682-1.fc17.i686

* Fri Oct 05 2012 Karsten Hopp <karsten@redhat.com> 7.3.682-1
- patchlevel 682
- use --enable-rubyinterp=dynamic and --enable-pythoninterp=dynamic


Note You need to log in before you can comment on or make changes to this bug.