How to compile a gvim from source using the latest version?

2

I'm using Ubuntu. I performed the following commands in the vim source folder:

sudo apt-get build-dep vim
./configure --with-features=huge --enable-gui=gtk2 --enable-rubyinterp=yes --enable-pythoninterp=yes
make
sudo make install

I have found that related posts but fail in Ubuntu 13.04.

Here is the error after do the .configure

checking --enable-gui argument... no GUI support

How can I let the system to find the GUI library? I have tried to do

apt-get build-dep vim

The gui lib should be included, but no luck what else can I do?

I have also tried

--enable-gui=<auto, gtk, gtk2, gnome2>

All of them show the same error no GUI support...

More update and try

kithokit@12:39:06 ~ $ sudo apt-get build-dep vim-gtk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'vim' as source package instead of 'vim-gtk'
0 upgraded, 0 newly installed, 0 to remove and 42 not upgraded.

vim-gtk can not be installed...

I have already installed build-dep vim, but also no luck to find the GUI library.

Kit Ho

Posted 2013-10-16T09:44:56.423

Reputation: 3 467

Question was closed 2015-05-19T16:42:37.843

8We can't read your mind nor your screen; what's the error you get? The basic steps look fine. – Ingo Karkat – 2013-10-16T10:27:10.713

2"I have found that related posts but fail in Ubuntu 13.04". What does it mean? – That Brazilian Guy – 2013-10-23T14:32:16.393

1You had the effort to set a bounty on the question, yet you decide not to provide us one of the most valuable piece of info: the error message. – That Brazilian Guy – 2013-10-23T19:12:18.043

Sorry for the insufficient info provided. I have updated my question – Kit Ho – 2013-10-24T03:21:16.017

Do you have the development packages for GTK2/GNOME2 installed? If configure can't find them it will not enable building with the GUI. – Heptite – 2013-10-24T03:50:22.237

As @Heptite said you need to sudo apt-get build-dep vim-gtkfirst. – VogonPoetLaureate – 2013-10-24T04:21:20.643

no luck, please see my update on my question – Kit Ho – 2013-10-24T04:40:10.873

Answers

7

I got the solution from this page http://vim.wikia.com/wiki/Building_Vim

the problem i can't get the GUI lib is that i have build the vim without GUI before.

And i use make clean instead of make distclean to rebuild the vim with GUI even the GUI lib installed. so the solution would be

sudo apt-get build-dep vim

make distclean

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

make

sudo make install

I hoep it can help others

Kit Ho

Posted 2013-10-16T09:44:56.423

Reputation: 3 467

1Did you mean "distclean" and not "diskclean"? – Heptite – 2013-10-24T17:44:26.953

change back . thx – Kit Ho – 2013-10-28T01:43:35.333