Compile gvim from sources?
I had a similar problem installing gvim 7.3 onto Centos 6.2 (x86_64)
Some required devel packages were missing. To install them:
yum groupinstall "Desktop Platform Development"
[To view all available groups: yum grouplist
]
Then building from source just worked
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
bunzip2 vim-7.3.tar.bz2
tar xf vim-7.3.tar
cd vim73
./configure --prefix=/home/me/vim73
make
make install
To discover what files were missing:
./configure | less
and searching for 'gui' showed that X11 related headers were missing.
In ubuntu I compile vim the following way:
sudo apt-get build-dep vim
sudo apt-get build-dep libx11-dev libxtst-dev
make distclean
./configure --with-compiledby="David Gamba <[email protected]>" \
--with-features=huge \
--enable-gui=auto \
--with-x \
--enable-rubyinterp \
--with-ruby-command=/usr/bin/ruby \
--enable-perlinterp \
--enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config \
--enable-fontset \
--enable-cscope \
--enable-gtk2-check \
--enable-gnome-check
make
At this point, cd src
and check for the correct X11 and clipboard support: ./vim --version
. Then:
sudo make install
For Fedora (using the KDE desktop) I installed the following packages:
yum install gcc libX11-devel libXtst-devel ncurses-devel perl-ExtUtils-Embed ruby ruby-devel python-devel gtk2-devel libXt-devel
And changed my configure command to the following:
./configure --with-compiledby="David Gamba <[email protected]>" \
--with-features=huge \
--enable-gui=auto \
--with-x \
--enable-rubyinterp \
--with-ruby-command=/usr/bin/ruby \
--enable-perlinterp \
--enable-pythoninterp --with-python-config-dir=/usr/lib64/python2.7/config \
--enable-fontset \
--enable-cscope \
--enable-gtk2-check \
--enable-gnome-check \
--enable-fail-if-missing
After that I get the following:
gvim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 4 2014 19:43:27)
Included patches: 1-274
Compiled by David Gamba <davidgamba ...>
EDIT: Forgot to mention that for Fedora I was getting an error with the location of the xsubpp
perl script so I ended up modifying the Makefile thanks to some bug report online.
--- a/src/Makefile Fri May 02 15:46:14 2014 +0200
+++ b/src/Makefile Sun May 04 19:56:20 2014 -0600
@@ -2465,7 +2465,7 @@
auto/if_perl.c: if_perl.xs
$(PERL) -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $@
- $(PERL) $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \
+ $(PERL) /usr/bin/xsubpp -prototypes -typemap \
$(PERLLIB)/ExtUtils/typemap if_perl.xs >> $@
auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
You can use the following command to find necessary dependencies for gvim:
sudo apt-get build-dep vim
If you haven't add source repository in your source.list file in /etc/apt/, you can open this file, duplicate the entries inside and change "dep" to "dep-src".
After all dependencies installed, you will be able to compile vim with gui.
This looks like the case of not having enough *-devel
packages installed. Try installing all the devel packages. I think there is a meta-package for installing most of them. Try gnome-devel
. Sorry I don't have Ubuntu nearby right now.
To compile different variants of vim (e.g. GUI and non-GUI), you have to configure/compile it multiple times.