Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18245 - cannot disable X support in vim-6.1-r21
Summary: cannot disable X support in vim-6.1-r21
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Aron Griffis (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-26 14:21 UTC by Christian Apolloni
Modified: 2003-03-30 15:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
'USE="-X" emerge vim' output (vim.log,68.03 KB, text/plain)
2003-03-29 06:09 UTC, Christian Apolloni
Details
'ldd /usr/bin/vim' output (ldd.log,861 bytes, text/plain)
2003-03-29 06:10 UTC, Christian Apolloni
Details
vim.eclass to test (vim.eclass,9.80 KB, text/plain)
2003-03-29 08:39 UTC, Aron Griffis (RETIRED)
Details
'USE="-X" emerge vim' output with new eclass (vim.new.log,68.28 KB, text/plain)
2003-03-29 09:03 UTC, Christian Apolloni
Details
new vim.eclass to test (vim.eclass,10.18 KB, text/plain)
2003-03-30 07:54 UTC, Aron Griffis (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Apolloni 2003-03-26 14:21:46 UTC
I tried to emerge vim without Xfree support but the "-X" USE flag seems to
unaffect it.

# USE="-X" emerge vim

Then when I launch vim as a different user as the one who started Xfree I get:

# vim
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

An annoying but harmless error message I think.

Reproducible: Always
Steps to Reproduce:
1.# emerge sync
2.# USE="-X" emerge vim
3. Start vim as an user that has not started Xfree, then exit it.
Actual Results:  
# vim
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
#

Expected Results:  
# vim
#

System uname: 2.5.66-mm1 i686 Intel(R) Pentium(R) III Mobile CPU      1000MHz
GENTOO_MIRRORS="ftp://sunsite.cnlab-switch.ch/mirror/gentoo
http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="oss 3dnow libg++ libwww mikmod ncurses nls spell zlib gdbm berkdb slang
readline tcltk gpm perl python esd imlib motif aalib acpi alsa apm -arts avi cdr
crypt cups dga doc dvd encode fbcon gif -gnome -gtk java jpeg kde mmx mozilla
mpeg oggvorbis opengl pam pcmcia pdflib png pnp qt qtmt quicktime radeon samba
sasl sdl sse ssl svga tcpd tiff truetype usb wmf X xml xml2 xmms xv x86"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -Os -pipe -fomit-frame-pointer"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2003-03-28 21:02:20 UTC
I've just tested this and verified that it doesn't happen with my installation.  My guess is one of the following: (1) that you don't have the most recent vim installed (this would be 6.1-r21) or (2) that your PORTDIR_OVERLAY contains an older version of the vim ebuilds or eclass.

If it's neither of these, then please post the output of the configure stage of vim, also the output of "ldd /usr/bin/vim"
Comment 2 Christian Apolloni 2003-03-29 06:07:59 UTC
I confirm my problem... I attach the requested infos.
Comment 3 Christian Apolloni 2003-03-29 06:09:24 UTC
Created attachment 9980 [details]
'USE="-X" emerge vim' output

It seems that during the configuration X is disabled, but...
Comment 4 Christian Apolloni 2003-03-29 06:10:18 UTC
Created attachment 9981 [details]
'ldd /usr/bin/vim' output
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2003-03-29 08:18:28 UTC
I'm working on a fix for this in the vim eclass, but in reality I suspect (from the output you posted) that the clock on your computer is wrong.
Comment 6 Christian Apolloni 2003-03-29 08:22:49 UTC
What you mean?
Comment 7 Aron Griffis (RETIRED) gentoo-dev 2003-03-29 08:39:42 UTC
Created attachment 9986 [details]
vim.eclass to test

Here is a new vim.eclass for you to test.  It touches a couple files during the
build process to make sure that configure isn't re-run in the src directory
with the wrong flags.  Let me know if it works or not.
Comment 8 Aron Griffis (RETIRED) gentoo-dev 2003-03-29 08:42:17 UTC
Changing resolution to TEST-REQUEST until I hear back.
Comment 9 Christian Apolloni 2003-03-29 09:03:09 UTC
Created attachment 9987 [details]
'USE="-X" emerge vim' output with new eclass

It still configures two times and I get the Xfree connection error.
Also a thread appeared here: http://forums.gentoo.org/viewtopic.php?p=260788
about the double configuration problem.

btw. what did you mean with "wrong clock"?
Comment 10 Yuji Carlos Kosugi (RETIRED) gentoo-dev 2003-03-29 09:58:51 UTC
I have a similar problem with "nls" in USE not enabling multibyte; I tried the new vim.eclass and still got the same results before; configure gets run twice, with the same kind of output as before.
Comment 11 Aron Griffis (RETIRED) gentoo-dev 2003-03-29 13:34:28 UTC
I just meant that I wondered if your computers date was set incorrectly, so "make" thought that configure needed to be rebuilt, or something like that.  However I tested on my machine with a variety of old and new dates, so that's not the problem.

Essentially this is a vim bug because it shouldn't be attempting to remake src/configure (and run it) after the base configure has already run.  But rather than complain to Bram about it, I'd like to figure out what is wrong and provide a fix.

I'm continuing to investigate.
Comment 12 Aron Griffis (RETIRED) gentoo-dev 2003-03-29 14:46:36 UTC
So here is what's happening.  This is an almost-complete explanation.

1. The patches update src/configure.in
2. ./configure creates src/auto/config.mk
3. When make runs, it notices that src/configure.in is newer than src/auto/configure, so it remakes src/auto/configure (using autoconf) then that in turn causes config.mk to be rebuilt, which fires off another run of configure.

Basically the problem is that our ebuild builds vim in a way it wasn't really intended, or you could also argue that vim's Makefiles break the intended functioning of GNU autoconf.

Anyway, I'll come up with a complete fix soon.
Comment 13 Yuji Carlos Kosugi (RETIRED) gentoo-dev 2003-03-30 05:28:13 UTC
agriffis' doesn't hit the right files because the right directories weren't specified.  The addition to the eclass should look like this:

        # Fix bug #18245: Sometimes vim will reconfigure (with the wrong flags) in
        # the src directory.  These two touches need to happen in the right order
        # so that make doesn't reconfigure.
        touch src/auto/configure src/configure.in src/config.mk.in src/config.h.in
        touch config src/auto/config.mk

Now I can get back to translating the GWN... ;-)
Comment 14 Aron Griffis (RETIRED) gentoo-dev 2003-03-30 07:54:28 UTC
Created attachment 10015 [details]
new vim.eclass to test

Thanks Carlos.	However that patch is really the wrong approach because it
prevents "configure" from being rebuilt out of "configure.in" even when
"configure.in" has been patched.  I didn't think about that the first time.

Here is a new eclass that I believe handles the whole thing well.  Additionally
apply_vim_patches has been optimized so it no longer takes forever.  Let me
know how it goes.
Comment 15 Aron Griffis (RETIRED) gentoo-dev 2003-03-30 15:09:19 UTC
Okay, I have committed an updated vim.eclass which should fix this problem, so I'm marking this bug "RESOLVED - FIXED".  If you have problems, please reopen the bug.  Note that the vim.eclass which I committed is newer than that which I attached here, so use the one that is in portage now for any testing.