potatomaster42 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Build bug in Python version checking for OS X #315

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Under OS X, build vim using -with-python-config-dir option, and or
   setting flags so that a custom python installation should be used
   while building vim.
2. after building, execute vim, it will crash.
3. use otool -L to check that vim is linked against the OS X default python
   and not the specific one as it was configured.

What is the expected output? What do you see instead?

  If it links correctly, it doesn't crash

What version of the product are you using? On what operating system?

  OS X Mavericks, Vim 7.4.567.

Please provide any additional information below.

  The following test from configure scripts is what is not allowing
  me to set a custom python installation.

  if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
  "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then

  This is because sys.exit(false) is being considered as success by
  the test and the first part of the if statement is always being
  executed, even if my python version is 2.7.

Original issue reported on code.google.com by obl...@gmail.com on 14 Jan 2015 at 2:32

GoogleCodeExporter commented 9 years ago
This has gotten even worse by now. It looks like the fix is not working 
anymore. Look my confire line is this:

CC=clang ./configure --prefix=/opt/local --with-features=huge 
--enable-luainterp --with-lua-prefix=/usr/local --enable-rubyinterp 
--enable-pythoninterp 
--with-python-config-dir=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framew
ork/Versions/2.7 --enable-perlinterp --enable-cscope 
--with-compiledby=francisco@oblita.com

I'm even trying to force the python-config-dir. Dude the system python IS NOT 
the python available at the command line, even more, I even try to enforce that 
by using --with-python-config-dir.

vim --version just gives this:

Linking: clang [...] 
-L/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7 
-lpython2.7 [...]

Still, otool -L gives:

$otool -L `which vim`

/opt/local/bin/vim:
        [...]
        /System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.5)
        [...]

vim building on OS X seems just broken.

Original comment by obl...@gmail.com on 21 Mar 2015 at 5:43

GoogleCodeExporter commented 9 years ago
I've removed --with-python-config-dir from the configure line, it's now working 
again (with the build patches I mention included).

Original comment by obl...@gmail.com on 22 Mar 2015 at 12:24

GoogleCodeExporter commented 9 years ago
This issue can be close. The code base has been fixed.

Original comment by obl...@gmail.com on 15 Apr 2015 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by brammool...@gmail.com on 15 Apr 2015 at 11:52