At our site the tcl/tk libs are built as shared libraries. libtcl.so
needs libm.a which is not supported as a shared library by sun. I had
to statically link the libm.a in python itself to avoid errors when
dynamically loading the tkinter module. I added something like
#include <math.h>
double ((*math_funcs[])()) = {
acos, asin, atan, atan2, ceil, cos, cosh, exp, floor,
fmod, hypot, log, log10, pow, sin, sinh, sqrt, tan, tanh
};
in one of the files which are linked to the python executable.