在CentOS 6.4上构建gvim 7.4

meg*_*zoe 6 linux vim ubuntu centos fedora

我试图在运行CentOS 6.4的盒子上从源代码构建gvim7.4.我按照这里提到的说明本地构建vim.可执行文件'vim'构建得很好,但'gvim'无处可见.我尝试了一些我可以在谷歌上找到的但似乎没有帮助的东西.

应该使用任何其他方法(通常的配置/制作方式除外)构建'gvim'吗?或者是否有任何模糊的技巧来构建gvim的可执行文件?

我的操作系统:CentOS 6.4.拥有所需的所有X/devel东西.使用的命令是:

./configure --prefix=/usr --with-compiledby="megazoe"   \
            --with-features=huge --enable-rubyinterp    \
            --enable-pythoninterp --enable-python3interp    \
            --enable-gui=gnome2 --enable-luainterp \
            --enable-perlinterp --enable-cscope 
Run Code Online (Sandbox Code Playgroud)

来自configure的stdout有以下与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
Run Code Online (Sandbox Code Playgroud)

Make不会抛出任何错误,'vim'构建得很好.只是,在任何地方都看不到任何gvim!我可以将-g开关与vim一起用于GUI实例[vim -g],但这不是gvim,使用GNOME菜单栏和作品,这就是我想要的.不应该'gvim'建成,因为使用了--enable-gui = gnome2?或者gvim完全是一个完全不同的野兽?

有关如何解决这个问题的任何建议?

谢谢!

meg*_*zoe 7

诀窍似乎是在调用make时设置一个合适的vimruntime目录,并且在下面调用make

--enable-gui=gnome2
--with-x=yes
Run Code Online (Sandbox Code Playgroud)

在配置脚本的开关列表中.

这是我的测试构建脚本,它似乎提供了所需的结果.

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
Run Code Online (Sandbox Code Playgroud)

将最终可执行文件命名为'gvim'很重要,否则需要在GUI模式下调用vim -g.