Re: [Python-Dev] Import Fails in setup.py On Android

2015-02-05 Thread Cyd Haselton
hose libraries...if it does at all? On Tue, Feb 3, 2015 at 12:10 AM, Eric Snow wrote: > On Mon, Feb 2, 2015 at 12:36 PM, Cyd Haselton wrote: >> After fixing a segfault issue (many thanks Ryan) I'm back to the same issue >> I was having with Python 2.7.8; the newly built pyth

Re: [Python-Dev] Import Fails in setup.py On Android

2015-02-03 Thread Cyd Haselton
am. > >What exactly appears? Does it say anything about the source of the >error? > >On Mon, Feb 2, 2015 at 3:24 PM, Cyd Haselton >wrote: > >> No traceback unfortunately...the fakechroot in the environment throws >the >> error and setup.py fails. >&

Re: [Python-Dev] Import Fails in setup.py On Android

2015-02-03 Thread Cyd Haselton
tKat running on an x86) here: >https://github.com/wandering-logic/android_x86_python-3.4. > See answer above. I'm working in an environment on the Android device. Hopefully this clarifies things. I'll re-post this over at python-sig. >Best, >-Matt > >From: Cyd Ha

Re: [Python-Dev] Import Fails in setup.py On Android

2015-02-03 Thread Cyd Haselton
email I send to python-sig On February 3, 2015 12:10:54 AM CST, Eric Snow wrote: >On Mon, Feb 2, 2015 at 12:36 PM, Cyd Haselton >wrote: >> After fixing a segfault issue (many thanks Ryan) I'm back to the same >issue >> I was having with Python 2.7.8; the newly built py

Re: [Python-Dev] Import Fails in setup.py On Android

2015-02-02 Thread Cyd Haselton
ot >really. > >What's the full traceback for the undefined reference exception? > >On Mon, Feb 2, 2015 at 2:04 PM, Cyd Haselton >wrote: > >> Update: While waiting for replies I made the change referenced here: >> >https://bugs.python.org/review/5309/diff2/

Re: [Python-Dev] Import Fails in setup.py On Android

2015-02-02 Thread Cyd Haselton
et a terminating 'undefined reference to dlopen' error, but I do get 'importing extensions failed' errors for each extension...like this: *** WARNING: importing extension "_pickle" failed with : 'module' object has no attribute 'load' On Februa

[Python-Dev] Import Fails in setup.py On Android

2015-02-02 Thread Cyd Haselton
After fixing a segfault issue (many thanks Ryan) I'm back to the same issue I was having with Python 2.7.8; the newly built python throws an undefined reference to dlopen when running setup.py...specifically when importing just-built extensions I've managed to narrow the problem down to the fol

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-02-01 Thread Cyd Haselton
to figure out a way to get the instuctions you sent >>implemented, but this may be a deal-breaker for porting Python 3.4.x >>for me...I may go back to working on 2.7.x >> >>Sent from my android device. >> >>-Original Message- >>From: Ryan Gonzalez

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-02-01 Thread Cyd Haselton
January 31, 2015 1:10:18 PM CST, Ryan wrote: >No; I was looking for all uses of _PyRaw_Strdup. Surprisingly, it's >used only a few times. > >Cyd Haselton wrote: >>Question: >>When you said earlier that you found the problem by using grep...were >>you looking f

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-31 Thread Cyd Haselton
31, 2015 1:10:18 PM CST, Ryan wrote: >No; I was looking for all uses of _PyRaw_Strdup. Surprisingly, it's >used only a few times. > >Cyd Haselton wrote: >>Question: >>When you said earlier that you found the problem by using grep...were >>you looking for place

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-31 Thread Cyd Haselton
d instructions that don't use the NDK. >> >> On Fri, Jan 30, 2015 at 6:19 PM, Cyd Haselton >wrote: >> >>> This is going to take some time...here's why: >>> >>> Downloading and installing the NDK/SDK won't be too hard...I have to >>&

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
linux-androideabi-gdb > > Now, GDB should have opened, so type the following commands: > > set solib-search-path > file > target remote :5055 > run > > Now, wait for the program to crash and type: > > backtrace > > You should now see a complete backtra

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
t; >>> ...but I think I found the issue with grep. Try applying the attached patch >>> to the Python/frozenmain.c. It comments out the locale handling. >>> >>> It seems that Python always calls its strdup function on the locale string. >>> On Android, this c

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
> checks the length of the (possibly null) string argument first. > > Please try the patch I attached in the last email. It *might* fix the issue. > Android has crappy locale handling. > > On Fri, Jan 30, 2015 at 12:09 PM, Cyd Haselton wrote: >> >> Un

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Unfortunately it is still reporting the same function :-/. On Fri, Jan 30, 2015 at 1:44 PM, Ryan Gonzalez wrote: > Yes... > > Can you check if it's crashing in a different function now? > > On Fri, Jan 30, 2015 at 1:39 PM, Cyd Haselton wrote: >> >> Yes I d

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Android has crappy locale handling. > > On Fri, Jan 30, 2015 at 12:09 PM, Cyd Haselton wrote: >> >> Unless i'm reading something incorrectly, _PyMem_RawStrdup is >> currently returning NULL when given a null pointer. >> >> From obmalloc.c >> >

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
plicate a null pointer. Basically, it's probably the caller's fault. > > You could always try modifying _PyMem_RawStrdup to return NULL when given a > null pointer and see where it then segfaults. > > On Fri, Jan 30, 2015 at 11:53 AM, Cyd Haselton wrote: >> >> Alterna

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
crash using gdb? Try the > steps here. > > That way we can see where Python's own strdup function is getting called. > > On Fri, Jan 30, 2015 at 9:05 AM, Cyd Haselton wrote: >> >> Absolutely. Good thing I have addr2line on device >> >> /bld/python/Py

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Alternatively, is there a hassle-free way to find out what changed in obmalloc.c between 2.7.x and 3.4.x? On Fri, Jan 30, 2015 at 9:29 AM, Cyd Haselton wrote: > There's a related strdup patch for readline.c, mentioned > here:http://bugs.python.org/issue21390 and here > https://g

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
n...they're all prefixed with _PyXx On Fri, Jan 30, 2015 at 9:05 AM, Cyd Haselton wrote: > Absolutely. Good thing I have addr2line on device > > /bld/python/Python-3.4.2 $ addr2line -C -f -e /lib/libpython3.4m.so.1.0 > 0008bbc8 > _PyMem_RawStrdup > /bld/python/Python-3.4.2/Objec

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
the steps at http://stackoverflow.com/a/11369475/2097780? They > allow you to get a better idea of where libc is crashing. > > Cyd Haselton wrote: >> >> Managed to get this out of logcat: >> F(11914) Fatal signal 11 (SIGSEGV) at 0x (code=1), thread >> 11914

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-29 Thread Cyd Haselton
as nothing to do with Python itself. > > Maybe this would be useful? > >> >> That stack trace would be really helpful. >> >> On Wed, Jan 28, 2015 at 8:34 AM, Cyd Haselton wrote: >>> >>> Apologies...I'm not sure what a stack track is, but I

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-29 Thread Cyd Haselton
do with > interprocess communication. Likely has nothing to do with Python itself. > > Maybe this would be useful? > >> >> That stack trace would be really helpful. >> >> On Wed, Jan 28, 2015 at 8:34 AM, Cyd Haselton wrote: >>> >>> Apologies

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-28 Thread Cyd Haselton
ins it a bit (slides 24-29). Looks like something to do with > interprocess communication. Likely has nothing to do with Python itself. > > Maybe this would be useful? > >> >> That stack trace would be really helpful. >> >> On Wed, Jan 28, 2015 at 8:34 AM, Cyd Haselton

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-28 Thread Cyd Haselton
ows a syscall trace -- > also useful, but doesn't tell you precisely how it segfaulted.) > > On Wed, Jan 28, 2015 at 6:43 AM, Cyd Haselton wrote: >> >> All, >> I recently ditched my attempts to port Python 2.7.8 to Android in >> favor of Python 3.4.2. Unfortunate

[Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-28 Thread Cyd Haselton
All, I recently ditched my attempts to port Python 2.7.8 to Android in favor of Python 3.4.2. Unfortunately, after using the same configure options in the same environment, and modifying the setup.py as needed, the newly built binary throws a segfault when the generate-posix-vars portion of the bu

Re: [Python-Dev] Pydoc Replacement for Python's help()?

2015-01-27 Thread Cyd Haselton
On Tue, Jan 27, 2015 at 2:45 PM, Glenn Linderman wrote: > On 1/27/2015 8:04 AM, Cyd Haselton wrote: > > Noted. Will proceed with the 3.x releass. > > I had been excited you were working on Android Python until I realized you > were working on 2.x. I started with Python 3, and ha

Re: [Python-Dev] Pydoc Replacement for Python's help()?

2015-01-27 Thread Cyd Haselton
On Tue, Jan 27, 2015 at 9:07 AM, Skip Montanaro wrote: > On Tue, Jan 27, 2015 at 6:46 AM, Cyd Haselton wrote: >> A quick FYI: The decision to build 2.7.8 (instead of 3.x) on Android >> was made after reading this article: >> https://wiki.python.org/moin/Python2orPython3 >

Re: [Python-Dev] Undefined reference to dlopen (was: Pydoc Replacement for Python's help()?)

2015-01-27 Thread Cyd Haselton
On Tue, Jan 27, 2015 at 6:52 AM, Skip Montanaro wrote: > On Tue, Jan 27, 2015 at 6:31 AM, Cyd Haselton wrote: >> Additionally it appears as though some modules were not built with the >> correct links to -lc -ldl, even though I added them as dependencies in >> Setup and se

Re: [Python-Dev] Pydoc Replacement for Python's help()?

2015-01-27 Thread Cyd Haselton
On Tue, Jan 27, 2015 at 6:31 AM, Cyd Haselton wrote: > On Mon, Jan 26, 2015 at 2:26 PM, Skip Montanaro > wrote: >> On Mon, Jan 26, 2015 at 12:49 PM, Cyd Haselton wrote: >>> Unfortunately, as I quickly found out, >>> Python's built-in help function requires

Re: [Python-Dev] Pydoc Replacement for Python's help()?

2015-01-27 Thread Cyd Haselton
On Mon, Jan 26, 2015 at 2:26 PM, Skip Montanaro wrote: > On Mon, Jan 26, 2015 at 12:49 PM, Cyd Haselton wrote: >> Unfortunately, as I quickly found out, >> Python's built-in help function requires tkinter, which requires >> tcl/tk. > > I'm a little confus

Re: [Python-Dev] Pydoc Replacement for Python's help()?

2015-01-27 Thread Cyd Haselton
On Mon, Jan 26, 2015 at 2:25 PM, Zachary Ware wrote: > On Mon, Jan 26, 2015 at 12:49 PM, Cyd Haselton wrote: >> Hello, >> I've finally managed to build a (somewhat) working Python port for the >> Android tablet I'm using. Unfortunately, as I quickly found out, >

[Python-Dev] Pydoc Replacement for Python's help()?

2015-01-26 Thread Cyd Haselton
Hello, I've finally managed to build a (somewhat) working Python port for the Android tablet I'm using. Unfortunately, as I quickly found out, Python's built-in help function requires tkinter, which requires tcl/tk. I did download the sources for tcl/tk and built tcl, but found out that tk requir

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-25 Thread Cyd Haselton
gory P. Smith > > wrote: >> >> On Fri Jan 23 2015 at 11:20:02 AM M.-A. Lemburg > > wrote: >> >> On 23.01.2015 19:48, Matthias Klose wrote: >> > On 01/23/2015 06:30 PM, Cyd Haselton wrote: >> >> R

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-25 Thread Cyd Haselton
Since (judging from the lack of responses) setup.py can't be removed from the Makefile, I kept troubleshooting.I've managed to get the build to complete and make install runs instead of throwing an undefined reference right off the bat, unfortunately I've run into the following: ImportError: No mo

Re: [Python-Dev] Undefined dlopen When Building Module On Android

2015-01-24 Thread Cyd Haselton
roid (perhaps for security reasons) > that's not true, if Z depends on A, then you need to have "-lA" when you link > Z. An example (and patch) for this problem is > http://bugs.python.org/issue21668. > > -Matt > >> -Original Message- >

Re: [Python-Dev] Undefined dlopen When Building Module On Android

2015-01-24 Thread Cyd Haselton
Replies in body of message for clarity: On Sat, Jan 24, 2015 at 5:08 PM, Frank, Matthew I wrote: > Android's dlopen() works slightly differently than the normal Unix dlopen() > in at least two different ways. I haven't seen your particular problem, but > that's probably because I'm cross-build

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-24 Thread Cyd Haselton
> On 23.01.2015 19:48, Matthias Klose wrote: >>>> > On 01/23/2015 06:30 PM, Cyd Haselton wrote: >>>> >> Related to my earlier question regarding building Python on Android >>>> >> and an undefined reference to dlopen error...I have the followi

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-24 Thread Cyd Haselton
On Fri, Jan 23, 2015 at 12:48 PM, Matthias Klose wrote: > On 01/23/2015 06:30 PM, Cyd Haselton wrote: >> Related to my earlier question regarding building Python on Android >> and an undefined reference to dlopen error...I have the following >> question: Is it possible

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-24 Thread Cyd Haselton
On Fri, Jan 23, 2015 at 12:48 PM, Matthias Klose wrote: > On 01/23/2015 06:30 PM, Cyd Haselton wrote: >> Related to my earlier question regarding building Python on Android >> and an undefined reference to dlopen error...I have the following >> question: Is it possible

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Cyd Haselton
On Fri, Jan 23, 2015 at 1:19 PM, M.-A. Lemburg wrote: > On 23.01.2015 19:48, Matthias Klose wrote: >> On 01/23/2015 06:30 PM, Cyd Haselton wrote: >>> Related to my earlier question regarding building Python on Android >>> and an undefined reference to dlopen e

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Cyd Haselton
On Fri, Jan 23, 2015 at 12:48 PM, Matthias Klose wrote: > On 01/23/2015 06:30 PM, Cyd Haselton wrote: >> Related to my earlier question regarding building Python on Android >> and an undefined reference to dlopen error...I have the following >> question: Is it possible

[Python-Dev] Can Python Be Built Without Distutils

2015-01-23 Thread Cyd Haselton
Related to my earlier question regarding building Python on Android and an undefined reference to dlopen error...I have the following question: Is it possible to build and install Python without having to build and install...or use...distutils? Some background: I can build the python interpreter

Re: [Python-Dev] Undefined dlopen When Building Module On Android

2015-01-23 Thread Cyd Haselton
world, not to Python. >> (dlopen is used by a lot of systems, not just Python.) >> >> On Wed, Jan 21, 2015 at 2:43 PM, Cyd Haselton wrote: >>> >>> On Mon, Jan 19, 2015 at 5:23 PM, Cyd Haselton >>> wrote: >>> > On Mon, Jan 19, 2015 at 8:5

Re: [Python-Dev] Undefined dlopen When Building Module On Android

2015-01-21 Thread Cyd Haselton
On Mon, Jan 19, 2015 at 5:23 PM, Cyd Haselton wrote: > On Mon, Jan 19, 2015 at 8:51 AM, Cyd Haselton wrote: >> Hello, >> I'm struggling with a build issue on Android; I've posted to the >> general python list with no result, so I'm re-posting here in hopes &

[Python-Dev] Undefined dlopen When Building Module On Android

2015-01-19 Thread Cyd Haselton
Hello, I'm struggling with a build issue on Android; I've posted to the general python list with no result, so I'm re-posting here in hopes that someone can help. If this is the wrong place feel free to let me know. I'm attempting to build Python 2.7.8 on my Android device; I'm using an environme