On Thu, Jul 22, 2010 at 4:29 PM, Bram Moolenaar <b...@moolenaar.net> wrote:
>
> James Vega wrote:
>
>> On Thu, Jul 22, 2010 at 12:36:27AM -0700, Nico Raffo wrote:
>> > If Vim is compiled with both --enable-pythoninterp and --enable-
>> > python3interp, errors occur when importing many python modules. To
>> > reproduce, compile as described then try something like:
>> >
>> > :py import termios
>> > or
>> > :py3 import termios
>> >
>> > Which gives the error:
>> >
>> > ImportError: /usr/lib/python3.1/lib-dynload/termios.so: undefined
>> > symbol: PyExc_TypeError
>> >
>> > This doesn't happen with all modules. Mostly just those with odd .so
>> > files.
>>
>> I had been meaning to check whether something like that would happen
>> with the Python interfaces.  I saw something similar when testing the
>> Perl interface.  Does the attached patch fix it?
>
> Thanks, I'll include it.  It fixes the problem on my system.

The attached patch corrects how DYNAMIC_PYTHON_DLL is specified so that
it correctly includes the SONAME (libpython2.6.so.1 instead of
libpython2.6.so).  The former is always available while the latter is
typically only available when the relevant -dev package is installed.

I'm looking into the crash that was reported as well, but I'm not sure
if that can be avoided as long as both interpreters are getting loaded.
At a quick glance, it seems like if_python may not be handling locking
properly.  I'll dig into this some more later tonight.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@jamessan.com>

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Attachment: dyn-python.diff
Description: Binary data

Raspunde prin e-mail lui