In article <cahu5praf_9rkgyw5yzp4tqs3dzsx0qm70esunuknodcqztm...@mail.gmail.com>, Cyd Haselton <chasel...@gmail.com> wrote: > On Sat, Nov 1, 2014 at 1:47 PM, Cyd Haselton <chasel...@gmail.com> wrote: [...] > > Sure enough, nm -D libm.so shows that sincos is NOT available in that > > library on my Android device. Now to figure out what to do about it. [...] > UPDATE: After doing a bit of research it looks like it would be > easier to build Python without sincos...is that possible? > If not, I'll need to figure out how to get bionic libm sources with a > proper Makefile (instead of Android's build system)
While sin() and/or cos() are primarily used in the expected places in the Python standard library (like the math module), sin() is also used in the implementation of type "complex" objects, code that is part of the core interpreter. I see that there is an old, undocumented, and unsupported macro to disable building of complex number support. But more hacking is needed to even get a somewhat working build with it these days and then, without complex support, many tests in the standard library fail and what you end up isn't really Python. So, I think rather than hacking up Python, you should try to fix the broken platform. There seem to be a number of project that claim to support Python on Android. Perhaps they could be of help. FWIW, the macro is "WITHOUT_COMPLEX": ./configure [...] CPPFLAGS='-DWITHOUT_COMPLEX' and Lib/optparse.py would need to be patched to comment out its use of "complex". Again, good luck! -- Ned Deily, n...@acm.org -- https://mail.python.org/mailman/listinfo/python-list