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"
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"
I confirm my problem... I attach the requested infos.
Created attachment 9980 [details] 'USE="-X" emerge vim' output It seems that during the configuration X is disabled, but...
Created attachment 9981 [details] 'ldd /usr/bin/vim' output
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.
What you mean?
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.
Changing resolution to TEST-REQUEST until I hear back.
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"?
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.
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.
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.
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... ;-)
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.
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.