Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 19115

Summary: /usr/bin/vim depends on X11 libs
Product: Gentoo Linux Reporter: Ian Kumlien <ian.kumlien>
Component: Current packagesAssignee: Aron Griffis (RETIRED) <agriffis>
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Ian Kumlien 2003-04-10 20:52:14 UTC
When using vim remotley it's dependandt on X11 while it dosn't have any real
interface for it. The package should in my opinion compile without X11 support
since there already is a seperated package for X11 support.

Reproducible: Always
Steps to Reproduce:
1.ssh to the machine (sets DISPLAY)
2.start vim it fail (if no X11 forwarding is established)

Actual Results:  
pomac@blue pomac $ vim
X11 connection rejected because of wrong authentication.
X connection to broken (explicit kill or server shutdown).
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2003-04-10 21:10:57 UTC
I bet more information is going to be required for this.  Things like
emerge --info, epm -q vim, and ldd /usr/bin/vim would probably be helpful.

Have you tried remerging vim?

It works fine for me.  Even if I set DISPLAY to something invalid, vim still
works. It just puts out a warning that it couldn't connect to the
X server, but it continues to function just fine.
Comment 2 Ian Kumlien 2003-04-10 21:14:13 UTC
pomac@blue export $ ldd `which vim` => /usr/X11R6/lib/ (0x40022000) => /lib/ (0x4007f000) => /usr/lib/ (0x400c0000) => /lib/ (0x400c6000) => /usr/lib/ (0x400c9000) => /lib/ (0x401bb000) => /lib/ (0x401e8000) => /lib/ (0x401ec000) => /lib/ (0x4023c000) => /lib/ (0x4025e000) => /usr/X11R6/lib/ (0x40389000) => /usr/X11R6/lib/ (0x40480000) => /usr/X11R6/lib/ (0x4048b000)
	/lib/ => /lib/ (0x40000000)
pomac@blue export $ 

I have reemegred 2 times, I think i'd have to USES="-X" emerge vim or something to get it to install propperly. But i see it more as a broken package dependecy that should be fixed.
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2003-04-23 16:09:15 UTC
Well, here are my thoughts:

First, I think you're right, that the vim ebuild should not link against the X libraries.  It kinda obviates the point of having a leaner terminal-based version of vim.  So I will make that change.

The downside is that vim will no longer set the xterm titlebar.  I know I will get complaints on this.  Here is the answer:
    emerge -C vim
    emerge gvim
When you emerge gvim, it will notice that there is no /usr/bin/vim, and it will create a symlink.  That version has the ability to set xterm titlebars because it will be linked against the X libraries.

If any users desperately want a vim that's linked against X but not against any toolkits, do
    USE="-gtk -gtk2 -gnome -motif" emerge gvim
That will generate an executable that is effectively what you want, along with the /usr/bin/vim symbolic link.

Finally, note that the real problem in your bug report was a vim bug.  Vim normally drops to terminal mode when it can't establish the X connection.  This was reported and fixed in vim recently.  The fix is available in 6.2a, aka 6.2_pre1 in Gentoo.
Comment 4 Ian Kumlien 2003-04-23 16:18:46 UTC
Ahhh, Well, When that version of vim becomes a part of gentoo's update list it'll all go away then... Nice =)

And this should leave this issue resolved/fixed imho =)
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2003-04-23 17:05:50 UTC
okay, it's all committed now