2

I'm currently trying to compile vim on a Fedora 20 machine with a particularly exotic setup:

  • No root access
  • python2 and python3 manually compiled and installed in ~/.local correctly working (after exporting the PATH and LD_LIBRARY_PATH).
  • zsh as shell
  • gcc version 4.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?

7
  • Is there a particular reason you want to compile vim instead of getting it from the repo? Commented Oct 28, 2016 at 18:24
  • @EugeneSh. Yep. The vim installed in the system has not +clipboard feature. (And I have not root access) Commented Oct 28, 2016 at 18:25
  • Take a look here. It might be good enough for you... Or.. you are saying there is no vim on this system at all, and you can't install it from the repo? Commented Oct 28, 2016 at 18:27
  • @EugeneSh. Thanks. The problem is that I have no root access. Commented Oct 28, 2016 at 18:28
  • This this seems (unfortunately) related. Commented Oct 28, 2016 at 18:39

1 Answer 1

3

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 :)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.