Sunday, November 29, 2009

Re: Compiling Vim for 64-bit Fedora Linux

Michael Henry wrote:

> I recently decided to try out 64-bit Linux with Fedora 12. When
> I tried to compile Vim, the configure script couldn't locate the
> Python "config" directory, which is necessary to successfully
> compile with --enable-pythoninterp. This is because 64-bit
> Fedora 12 puts the Python libraries beneath /usr/lib64 instead
> of /usr/lib.
>
> I was able to work around the problem in two ways.
>
> First, based on clues from this posting to the mailing list:
> http://old.nabble.com/Trouble-compiling-vim-%2B-python-td21136985.html
>
> I added the following switch to the configure script:
>
> --with-python-config-dir=/usr/lib64/python2.6/config
>
> Since I didn't want to hard-code that path into my generic
> script for building Vim, I also tried the following symlink,
> which appeared to work as well:
>
> ln -s /usr/lib64/python2.6/config /usr/lib/python2.6/config
>
> Neither approach above seems quite smooth to me. I didn't drill
> down into the configure script very far, but I'm wondering if
> using Python's "python-config" tool would help ferret out the
> necessary configuration information. For example, on my system,
> I get the following output:
>
> $ python-config --prefix
> /usr
> $ python-config --includes
> -I/usr/include/python2.6 -I/usr/include/python2.6
> $ python-config --libs
> -lpthread -ldl -lutil -lm -lpython2.6
>
> The python-config tool comes in the python-devel package on
> Fedora. This package is required when building Vim using the
> --enable-pythoninterp switch anyway, and I imagine it's true
> in general that python-config would be available anywhere that
> the necessary Python development libraries were installed. In
> any event, the configure script could check for the presence of
> python-config and use that if found, falling back to the old
> method if not.

Using python-config sounds like it's something that is the recommended
way. I have no idea when this was introduced, we should fall back to the
old method when it can't be found.

You say the libs are below /usr/lib64, but the --libs output doesn't
contain this. Does the compiler have a builtin path for this?

--
I learned the customs and mannerisms of engineers by observing them, much the
way Jane Goodall learned about the great apes, but without the hassle of
grooming.
(Scott Adams - The Dilbert principle)

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment