7.2 branch, configure problem, --with-python

Michael Snyder msnyder@vmware.com
Thu Jul 29 18:49:00 GMT 2010


Joel Brobecker wrote:
>>> Wow, thanks for going to all that effort.
>> Umm, how does Py_ENABLE_SHARED get defined?
>> Is this an environment variable that I need to set?
> 
> No - This variable is defined in module sysconfig if your python was
> built with --enable-shared. For instance, with 7.2-shared:
> 
>         % python-2.7-shared
>         >>> from distutils import sysconfig
>         >>> sysconfig.get_config_var("Py_ENABLE_SHARED")
>         1
> 
> Whereas with the static version:
> 
>         % python-2.7-static
>         >>> from distutils import sysconfig
>         >>> sysconfig.get_config_var("Py_ENABLE_SHARED")
>         0
> 
> Surprisingly, the system python installed on my ubuntu machine
> returns 0 for Py_ENABLE_SHARED, even though I definitely have
> the shared version of libpython there.  But at the same time,
> I do have both archive and dso installed at both <prefix>/lib
> and <prefix>/lib/python-<version>/config...
> 
> That's why, I think, it ends up working for me, even though it
> seems that the python that is distributed with ubuntu is statically
> linked.
> 

Umm, yeah.  configure is always looking for the libs in
<prefix>/lib/<version>config.  Which for me (both system
and personal install) contains only the static libs.




More information about the Gdb-patches mailing list