[Bf-committers] strange scons/python interaction

Michel Selten bf-committers@blender.org
Thu, 26 Feb 2004 21:30:16 +0100


On Thu, 2004-02-26 at 15:37, zaz@visi.com wrote:
> Gregor M=FCck wrote:
> > Hi!
> >=20
> > I've run into a problem with Python and SCons. I compile my local Blend=
er=20
> > against Python 2.3.3. As long as I used the autoconf/automake system=20
> > everything worked fine. But when I use a Blender binary compiled with S=
Cons=20
> > the simple Python command "import math" fails with
> >=20
> > ImportError: /usr/lib/python2.3/lib-dynload/math.so: undefined symbol:=20
> > PyDict_SetItemString
> >=20
> > When I build Blender with the old NaN makefiles from the same sources (=
also=20
> > against Python 2.3), the problem disappears. The question is: What does=
 SCons=20
> > do differently?
> >=20
> It appears scons isn't completely tested or implemented, at
> least under linux.  You need to add some flags to the
> platform_linkflags to allow python to work:
>      platform_linkflags =3D ['-Wl,-export-dynamic']
> If you're on another plaform, its probably something similar
> as well.

Hi,

you're right, I've forgotten these flags in the final linking stage.
Thanks for pointing it out, and thanks to Gregor for pointing out the
error!
I'll fix it very soon.

With regards,
	Michel