Roland Puntaier wrote:

> On Mon, 09 Aug 2010 13:49:43
> Andy Kittner <[email protected]> wrote:
> > > > I made the test in Vim 7.3: After removing RTLD_GLOBAL there wasno 
> > > > crash 
> > > > any more.
> > > 
> > > If I'm not mistaken this flag was added to make "import termios" work.
> > > Or something like that.
> > 
> > The issue was that at least on some systems pythons C-Extensions seemingly
> > aren't linked against the python shared library, therefore they can't be
> > imported unless the host application provides the required symbols.
> > 
> > See this thread: "Linking errors when compiled with both python and python3"
> >   
> http://groups.google.com/group/vim_dev/browse_frm/thread/10be77eb81ad1c2d/fed7c6d9e3932ef5?tvc=1
> 
> 
> Hi Bram,
> 
> I missed that thread. 
> 
> I had the same problem with PyQt 4.7, first, but at a later try it worked, 
> probably because that linked against libpython 3.1.2.
> Andy reported termios to work as well on his system. 
> Maybe the problematic termios was older or not linked against libpython, 
> because it was not there at the time termios was configured.
> Maybe we can optimistically assume that for most python libraries / 
> systems it works.
> 
> I would opt for the following:
> 
> If only one, Python 2.x xor Python 3.x, is configured (and if 
> DYNAMIC_PYTHON), then use RTLD_GLOBAL:
>         #define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
> 
> If both are configured use without RTLD_GLOBAL:
>         #define load_dll(n) dlopen((n),RTLD_LAZY)

OK, that's a reasonable compromise, should make most things work for
most people.

Can you please document this in the help?  We need to update the section
about the Python 3 support anyway!  What differences are there?

-- 
Tips for aliens in New York: Land anywhere.  Central Park, anywhere.
No one will care or indeed even notice.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [email protected] -- 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_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

Raspunde prin e-mail lui