Friday, April 22, 2016

How can I fix this error when making vim on Fedora 23

Leave a Comment

I am trying to build vim with the following options on my Fedora 23

I want +python +python3 +perl +lua +ruby +gui +conceal +gui for some plugins.

I could not find a version with all those built in (so I do it myself)

The journey started by following Valloric

sudo yum install -y ruby ruby-devel lua lua-devel luajit \     luajit-devel ctags git python python-devel \     python3 python3-devel tcl-devel \     perl perl-devel perl-ExtUtils-ParseXS \     perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \     perl-ExtUtils-Embed 

I also have ncurses (raw,devel,static,...)

Then

$ cd $HOME/Sources $ git clone https://github.com/vim/vim.git $ cd vim $ ./configure --with-tlib=ncurses \               --with-features=huge \               --enable-fail-if-missing \               --enable-luainterp=yes \               --enable-mzschemeinterp \               --enable-perlinterp \               --enable-pythoninterp=yes \               --with-python-config-dir=/usr/lib64/python2.7/config \               --enable-python3interp=yes \               --enable-tclinterp=yes \               --enable-rubyinterp=yes \               --enable-cscope \               --enable-multibyte \               --enable-gui=auto \               --prefix=$HOME/Build/vim \               --with-compiledby=statquant | tee configure.log 

The following is printed on screen:

/home/statquant/Sources/vim/src/config-PyMake3137:1478: warning: overriding recipe for target 'Modules/_math.o' /home/statquant/Sources/vim/src/config-PyMake3137:1475: warning: ignoring old recipe for target 'Modules/_math.o' /home/statquant/Sources/vim/src/config-PyMake3137:1517: warning: overriding recipe for target 'Modules/timemodule.o' /home/statquant/Sources/vim/src/config-PyMake3137:1482: warning: ignoring old recipe for target 'Modules/timemodule.o' configure: error: NOT FOUND!       You need to install a terminal library; for example ncurses.       Or specify the name of the library with --with-tlib. 

Then I

make | tee make.log

I realized that it actually built vim in $HOME/Sources/vim/src instead of $HOME/Build/vim (maybe I was wrong to expect that)

When I run :version on ./vim -g (vim has been build with GUI support) there is NO python NO python3 .... enter image description here

configure.log is there, make.log is there

EDIT1: the following works, I now only miss +perl +ruby

./configure --with-features=huge \        --enable-tclinterp=yes \        --enable-luainterp=yes \        --enable-pythoninterp=yes \        --enable-python3interp=yes \        --with-compiledby=statquant \        --prefix=$HOME/Build/vim \  make install # and yes it installs in $HOME/Build/vim   

enter image description here

EDIT2 Here is what happen when I try to add

  1. +perl

I can run

./configure --with-features=huge \             --enable-tclinterp=yes \             --enable-luainterp=yes \             --enable-pythoninterp=yes \             --enable-python3interp=yes \             --enable-perlinterp=yes \             --prefix=$HOME/Build/vim \             --with-compiledby=statquant | tee configure.log 

It appears to work (no error) : configure.log

make | tee make.log [...] cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined <command-line>:0:0: note: this is the location of the previous definition cc1: some warnings being treated as errors make[1]: *** [objects/option.o] Error 1 Makefile:2907: recipe for target 'objects/option.o' failed make[1]: Leaving directory '/home/statquant/Sources/vim/src' make: *** [first] Error 2 Makefile:26: recipe for target 'first' failed 

I get no vim built in /home/statquant/Sources/vim/src : make.log

  1. +ruby

    ./configure --with-features=huge \ --enable-tclinterp=yes \ --enable-luainterp=yes \ --enable-pythoninterp=yes \ --enable-python3interp=yes \ --enable-rubyinterp=yes \ --prefix=$HOME/Build/vim \ --with-compiledby=statquant | tee configure.log

It does not even run configure

checking --with-tlib argument... empty: automatic terminal library selection checking for tgetent in -ltinfo... no checking for tgetent in -lncurses... no checking for tgetent in -ltermlib... no checking for tgetent in -ltermcap... no checking for tgetent in -lcurses... no no terminal library found checking for tgetent()... configure: error: NOT FOUND!       You need to install a terminal library; for example ncurses.       Or specify the name of the library with --with-tlib. 

Here is the log: configure.log

3 Answers

Answers 1

You have enabled -Werror=format-security. This treats any susceptible usage of format of printf or scanf currently treated as `error.

You can either fix the usage in if_perl.c, I believe this is generated file. or remove the flag -Werror=format-security

Answers 2

The python problem was this...

--with-python-config-dir=/usr/lib64/python2.7/config \ --enable-python3interp=yes \ 

Version 2 config with a version 3 interpreter.

Your missing the ncurses-devel library, I can see that you dropped it from configure.

sudo yum install ncurses-devel 

configure actually worked for me even when I didn't have the perl dev packages installed ie it didn't fail asking me to install them which I found odd. Do you have all the dev packages you need installed.

sudo yum install perl-devel sudo yum install ruby-devel 

Answers 3

If you are missing some dev package for ruby or perl the configure script say something like : "disabling this option". Just did this with ruby. After installing the ruby-dev package the ruby option is enabled in vim. Same with libperl-dev.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment