Re: Linking errors when compiled with both python and python3

2010-07-24 Fir de Conversatie Bram Moolenaar
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:

Re: Linking errors when compiled with both python and python3

2010-07-24 Fir de Conversatie Bram Moolenaar
James Vega wrote: > 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 install

Re: Linking errors when compiled with both python and python3

2010-07-24 Fir de Conversatie Andy Kittner
On Fri, Jul 23, 2010 at 07:17:24PM -0400, James Vega wrote: On Fri, Jul 23, 2010 at 11:05:05PM +0200, Andy Kittner wrote: Running ldd on the files in the lib-dynload directory reveals that out of my installed python versions (2.4.6, 2.5.4, 2.6.5, 2.7, 3.1.2) revealed that all c-extensions except

Re: Linking errors when compiled with both python and python3

2010-07-23 Fir de Conversatie Kazuo Teramoto
On Fri, Jul 23, 2010 at 8:17 PM, James Vega wrote: > > That's interesting.  As far as I can tell, Python's build system doesn't > do this normally.  It would appear your distribution (which is?) has > changed that. In my system the files on lib-dynload are linked to libpython.so too. I'm using Ar

Re: Linking errors when compiled with both python and python3

2010-07-23 Fir de Conversatie James Vega
On Fri, Jul 23, 2010 at 11:05:05PM +0200, Andy Kittner wrote: > On Fri, Jul 23, 2010 at 02:30:19PM -0400, James Vega wrote: > > >Because we have to use RTLD_GLOBAL (since the C extensions aren't linked > >against libpython), it's not safe to use both the Python 2 & 3 > This seems to be system depe

Re: Linking errors when compiled with both python and python3

2010-07-23 Fir de Conversatie Andy Kittner
On Fri, Jul 23, 2010 at 02:30:19PM -0400, James Vega wrote: Because we have to use RTLD_GLOBAL (since the C extensions aren't linked against libpython), it's not safe to use both the Python 2 & 3 This seems to be system dependent then. On my system the original example worked fine before the pa

Re: Linking errors when compiled with both python and python3

2010-07-23 Fir de Conversatie James Vega
On Thu, Jul 22, 2010 at 4:43 PM, James Vega wrote: > On Thu, Jul 22, 2010 at 4:29 PM, Bram Moolenaar 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

Re: Linking errors when compiled with both python and python3

2010-07-22 Fir de Conversatie James Vega
On Thu, Jul 22, 2010 at 4:29 PM, Bram Moolenaar 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

Re: Linking errors when compiled with both python and python3

2010-07-22 Fir de Conversatie Bram Moolenaar
Nico Raffo wrote: > On Jul 22, 5:18 am, 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 de

Re: Linking errors when compiled with both python and python3

2010-07-22 Fir de Conversatie Bram Moolenaar
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 imp

Re: Linking errors when compiled with both python and python3

2010-07-22 Fir de Conversatie Nico Raffo
On Jul 22, 5:18 am, 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 lik

Re: Linking errors when compiled with both python and python3

2010-07-22 Fir de Conversatie James Vega
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 t

Linking errors when compiled with both python and python3

2010-07-22 Fir de Conversatie Nico Raffo
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-dynloa