unable to build vim with gui

39 views
Skip to first unread message

Charles E Campbell

unread,
Mar 13, 2018, 4:32:13 PM3/13/18
to vim...@googlegroups.com
Hello:

I used the following configuration command:

   ./configure --with-features=huge --enable-gui=gtk2
--enable-perlinterp --enable-pythoninterp --enable-rubyinterp
--enable-cscope

The vim I ended up with did not have gui enabled, although I only see
two lines associated with gtk/gui/gvim in configure's output:

   checking --enable-gui argument... GTK+ 2.x GUI support
   checking --disable-gtktest argument... gtk test enabled

I did the configure on a new  Scientific Linux release 7.4 (Nitrogen)
system.

Any hints on how to get gui enabled?

Thank you,
Chip Campbell


vimver
vimcnfg

Tony Mechelynck

unread,
Mar 13, 2018, 5:34:50 PM3/13/18
to Charles E. 'Dr. Chip' Campbell, Ph.D., vim...@googlegroups.com
My guess is that some "development" package, needed to build the GUI,
is not installed on your system. It might be a GTK-related development
package or an X11-related development package, since Vim with GTK GUI
cannot be built without X11 but Vim without GUI can.

If you logged the stdout output from configure, search it
case-independently for the strings "gtk" or "x11", or even for the
word "headers". If you didn't log that, or if you lost that log, there
is a file auto/config.log in the same directory as auto/configure,
auto/config.status et al. It is more verbose than the stdout log, and
therefore a little more difficult to use, but it contains everything
that configure displayed on stdout (plus, among others, the sources of
all the test programs whose compilation or link ended in an error).

Best regards,
Tony.

Lucien Gentis

unread,
Mar 14, 2018, 10:03:47 AM3/14/18
to vim...@googlegroups.com, Tony Mechelynck, Charles E. 'Dr. Chip' Campbell, Ph.D.
Hello,

Maybe you already tried it, but did you try to use "gvim" command
instead of "vim" command ?

Tony Mechelynck

unread,
Mar 14, 2018, 9:15:11 PM3/14/18
to Lucien Gentis, vim...@googlegroups.com, Charles E. 'Dr. Chip' Campbell, Ph.D.
On Wed, Mar 14, 2018 at 3:03 PM, Lucien Gentis <lucien...@waika9.com> wrote:
> Hello,
>
> Maybe you already tried it, but did you try to use "gvim" command instead of
> "vim" command ?

Mon cher Lucien: on Unix-like systems, and among others on every
system where gvim can use GTK2 (as Dr. Chip's and mine do) a single
executable, usually named "vim", will run as a GUI if invoked either
as one of "gvim" "gview" "gvimdiff" etc. by means of a symlink, or
with the -g command-line switch. It is only on Windows (and, once upon
a time, on MS-DOS and possibly on Mac OS 9 and earlier) that a Vim
executable can be either a GUI or a console utility but not both.

Best regards,
Tony.

Charles E Campbell

unread,
Mar 15, 2018, 12:31:00 PM3/15/18
to vim...@googlegroups.com
Hello, Tony, Lucien, and vimmers:

Thank you for your help!  I finally found the culprit, but first:

 * Lucien: I use  ./vim -g when in the source directory.  There's no
gvim link there; to use such a link, either I'd have to generate it by
hand or install the (IMHO) defective vim which lacked gui capability --
and I don't want a defective vim installed atop an older albeit
functioning vim/gvim.
 * Tony: unfortunately I'd forgotten about config.log but it wasn't
particularly helpful on this one.  I ended up putting over 60 comments
into the vim/src/auto/configure script to track down where the issue was.

I also tried --enable-gui=auto and that, too, did not work.

Well, this is a new Scientific Linux system (and a new computer, too,
actually) -- so it turns out that my configure commands
"--enable-gui=gtk2"  or  "--enable-gui=auto"  didn't work.  Turns out
that I needed  --enable-gui=gtk3 -- and now I have a functioning gvim!

So, is this perhaps a bug report?  ie.  --enable-gui=auto  should have
worked, I think.

Regards,
Chip Campbell

Tony Mechelynck

unread,
Mar 15, 2018, 9:43:20 PM3/15/18
to vim...@googlegroups.com
It should have worked *if* you had had all GDK2 and GTK2 libraries
*and headers* installed (GDK is required by GTK, and often regarded as
part of it, but some distros package it separately). On my (openSUSE)
Linux, if I want (and I do) to be able to compile gvim for GTK2 I need
to have the gtk2-devel package (which has the C headers needed to
*compile* GTK2 programs), and all its requirements, installed *in
addition* to the GDK and GTK library packages needed to *run* those
same programs.

So IIUC it is not a bug in Vim. Configure will never obey a directive
for which some requirement is not installed, or even just not found
where it looks for it. It might or might not be a bug in Scientific
Linux, or in the workflow of whoever installed the software on the
machine.

Best regards,
Tony.
Reply all
Reply to author
Forward
0 new messages