Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building gvim 7.4 on CentOS 6.4

Am trying to build gvim7.4 from source on a box running CentOS 6.4. I followed the instructions mentioned here to build vim locally. The executable 'vim' gets built just fine, but 'gvim' is nowhere to be seen. I tried everything that I could find on google but doesn't seem to be helping.

Should 'gvim' be built using any other method (other than the usual configure/make way)? Or is there any obscure trick to build the executable for gvim?

My OS: CentOS 6.4. Has all X/devel stuff that's required. Command used is:

./configure --prefix=/usr --with-compiledby="megazoe"   \
            --with-features=huge --enable-rubyinterp    \
            --enable-pythoninterp --enable-python3interp    \
            --enable-gui=gnome2 --enable-luainterp \
            --enable-perlinterp --enable-cscope 

The stdout from configure has below stuff related to X:

checking if X11 header files can be found... yes
checking for _XdmcpAuthDoIt in -lXdmcp... no
checking for IceOpenConnection in -lICE... yes
checking for XpmCreatePixmapFromData in -lXpm... yes
checking if X11 header files implicitly declare return values... no
checking size of wchar_t is 2 bytes... no
checking --enable-gui argument... GNOME 2.x GUI support
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config... /usr/bin/pkg-config
checking for GTK - version >= 2.2.0... yes; found version 2.18.9
checking for libgnomeui-2.0... yes
checking for FreeBSD... no
checking X11/SM/SMlib.h usability... yes
checking X11/SM/SMlib.h presence... yes
checking for X11/SM/SMlib.h... yes
checking X11/xpm.h usability... yes
checking X11/xpm.h presence... yes
checking for X11/xpm.h... yes
checking X11/Sunkeysym.h usability... yes
checking X11/Sunkeysym.h presence... yes
checking for X11/Sunkeysym.h... yes
checking for XIMText in X11/Xlib.h... yes
X GUI selected; xim has been enabled
checking for CYGWIN environment... no

Make doesn't throw any error , 'vim' gets built just fine. Only, there's no gvim to be seen anywhere! I can use the -g switch with vim for a GUI instance [vim -g] but that isn't gvim, with the GNOME menubar and the works, which is what I want. Shouldn't 'gvim' get built since --enable-gui=gnome2 is used? Or is gvim a totally different beast altogether?

Any suggestions on how to get around this problem?

Thanks!

like image 854
megazoe Avatar asked Aug 28 '13 12:08

megazoe


1 Answers

The trick seems to be setting a proper vimruntime dir while invoking make, and having below ones

--enable-gui=gnome2
--with-x=yes

in list of switches for configure script.

Here's my test build script which seems to be giving the required result.

mkdir /tmp/vimbuild; cd /tmp/vimbuild
wget -c ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -xjvf vim-7.4.tar.bz2
cd vim74
\rm -rf src/auto/config.cache
make clean
./configure --prefix=/usr --with-compiledby="megazoe"   \
            --with-features=huge --enable-rubyinterp    \
            --enable-pythoninterp --enable-python3interp    \
            --disable-tclinterp --with-x=yes \
            --enable-xim --enable-multibyte \
            --enable-gui=gnome2 \
            --enable-luainterp --enable-perlinterp \
            --enable-cscope \
            --enable-netbeans 2>&1

make -j20 VIMRUNTIMEDIR=/tmp/vimbuild/vim74/runtime/ 
if [ -f src/vim ]
then
  \cp -f src/vim src/gvim
  strip src/gvim
  ./src/gvim &
fi

Having the final executable named as 'gvim' is important, else it needs to be invoked as vim -g for being in GUI mode.

like image 175
megazoe Avatar answered Oct 16 '22 02:10

megazoe