Python link errors

36 views
Skip to first unread message

George V. Reilly

unread,
Nov 25, 2009, 7:13:51 PM11/25/09
to Mac Vim
I did

$ git pull
$ make clean
$ ./configure --enable-gui=macvim --with-compiledby='George V. Reilly <geo...@reilly.org>'  --with-features=huge --enable-pythoninterp                                      \
$ make

I'm getting

[snip]
  gcc   -L/usr/local/lib -o Vim objects/buffer.o ...  objects/version.o -framework Cocoa -framework Carbon      -lm -lncurses  -liconv    -framework Python    
ld: warning: in /Library/Frameworks//Python.framework/Python, missing required architecture x86_64 in file
Undefined symbols:
  "_PyInt_AsLong", referenced from:
      _OutputSetattr in if_python.o
  "_PyGILState_Release", referenced from:
      _Python_SaveThread in if_python.o
  "_PySys_SetArgv", referenced from:
      _DoPythonCommand in if_python.o
[snip]
  "__PyArg_Parse_SizeT", referenced from:
      _WindowSetattr in if_python.o
      _WindowSetattr in if_python.o
      _WindowSetattr in if_python.o
      _OutputWritelines in if_python.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [Vim] Error 1

$ python --version
Python 2.6.4

This is the most recent Python 2.6 from python.org, instead of the stock one from Apple, which worked the last time I built MacVim a few weeks ago.

--
/George V. Reilly  geo...@reilly.org  Twitter: @georgevreilly
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

Adam Mercer

unread,
Nov 25, 2009, 7:43:40 PM11/25/09
to vim...@googlegroups.com
On Wed, Nov 25, 2009 at 18:13, George V. Reilly <geo...@reilly.org> wrote:

> ld: warning: in /Library/Frameworks//Python.framework/Python, missing
> required architecture x86_64 in file

<snip>

> $ python --version
> Python 2.6.4
> This is the most recent Python 2.6 from python.org, instead of the stock one
> from Apple, which worked the last time I built MacVim a few weeks ago.

The python from python.org does not contain 64bit binaries so to use
this version you'll need to build a 32bit MacVim.

Cheers

Adam

Zvezdan Petkovic

unread,
Nov 25, 2009, 8:43:17 PM11/25/09
to vim...@googlegroups.com
On Nov 25, 2009, at 7:13 PM, George V. Reilly wrote:
> ld: warning: in /Library/Frameworks//Python.framework/Python, missing required architecture x86_64 in file

That Python seems to be 32-bit only.
MacVim was configured for 64-bit build.

> This is the most recent Python 2.6 from python.org, instead of the stock one from Apple, which worked the last time I built MacVim a few weeks ago.

The name of that image is python-2.6.4_macosx10.3.dmg.

It's possible the last time you tried to build MacVim it was still configured for 32-bit build, so it worked with this 32-bit Python.

You'll need to decide whether you want 64-bit or 32-bit MacVim, then link it with a matching Python.

Zvezdan


George V. Reilly

unread,
Nov 25, 2009, 9:45:18 PM11/25/09
to vim...@googlegroups.com
Adding --with-macarchs=i386 to the ./configure line and doing a clean build fixed the problem.
Reply all
Reply to author
Forward
0 new messages