Issue
I'm currently trying to compile vim
on a Fedora 20 machine with a particularly exotic setup:
- No root access
python2
andpython3
manually compiled and installed in~/.local
correctly working (after exporting thePATH
andLD_LIBRARY_PATH
).zsh
as shellgcc
version4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)
If I configure the compiling process as:
./configure --with-features=huge --enable-pythoninterp --enable-python3interp --prefix=$HOME/.local
and then make && make install
, vim
is correctly compiled with +python/dyn +python3/dyn
.
vim --version | grep python
+cryptv +linebreak +python/dyn +vreplace
+cscope +lispindent +python3/dyn +wildignore
but, inside vim, :echo has('python')
returns a 0
(and the MatchTagAlways complains about that in facts...).
So I told to myself, let's try to force the statically linked installation:
export LDFLAGS=-static
./configure --with-features=huge --enable-pythoninterp --enable-python3interp --prefix=$HOME/.local
ends just a little bit after the configuring command:
configure: creating cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/students/rm_16_17/dibattista/build/vim/src':
configure: error: C compiler cannot create executables
See `config.log' for more details
Here the full configure.log
. The relevant line should be:
configure:3027: gcc -static conftest.c >&5
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
that I cannot really decrypt. It seems that gcc
does not has the -static
flag. Is that the issue?
Solution
At the end what I was missing was a flag when compiling Python to compile it as a shared library --enable-shared
.
As a reminder: always read all the INSTALL
instructions :)
Answered By - rdbisme