Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: -haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list
Ryan Gonzalez added the comment:
Ah, crud. androidfn.h was a header I added but forgot to put the patch for. I
just attached the patch for that now.
The commit I based the patches on was by Alexander Belopolsky and was named
merge. Committed on February 28.
--
Added file:
Cyd Haselton added the comment:
Latest error:
gcc --sysroot=/usr/gcc-4.9.2/sysroot -c -Wno-unused-result -Wsign-compare
-Wunreachable-code -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-Werror=declaration-after-statement -I. -IInclude -I./Include
-DPy_BUILD_CORE -o
Cyd Haselton added the comment:
issue_20306.patch won't install; attempting to do so yields the following:
patching file configure.ac
Hunk 56 FAILED 4944/4944.
AC_MSG_RESULT($ENSUREPIP)
AC_SUBST(ENSUREPIP)
Cyd Haselton added the comment:
Hey Ryan,
Just now patching downloaded/unzipped tip and was wondering if there was an
order in which patches should be applied.
I ask because i'm getting the following when applying the
android_segfault_fix.patch
/bld/python/cpython-3.4/cpython-3.4/Python $
Cyd Haselton added the comment:
UPDATE: I found the file in github, under master, in Python/. It's not in the
3.4 or origin/3.4 branches...aren't we working on those? Or does it not matter?
--
___
Python tracker rep...@bugs.python.org
Ryan Gonzalez added the comment:
I thought this was for the tip, i.e. the 3.5 dev...?
But I created the patches in the order that I wrote the descriptions in the
comment. So you might want to use that order.
If that fails, I can figure out the revision I was at when I created the
patches.
Cyd Haselton added the comment:
From previous post:
**
How does this sound?
* I'll clone the fork of the 3.4 branch I made in github, build and patch.
* Ryan will (as best as he can) grab said patches, regenerate them for the bug
tracker or forward port them to 3.5 (in
Cyd Haselton added the comment:
Ryan,
For now I'll make the edits to pyconfig.h manually after downloading the zip
from the tip and running configure with necessary params.
I'll do my best to get this done this weekend, but it may have to wait until
next.
--
Cyd Haselton added the comment:
Ryan,
From where do you want me to download Python for testing?
I'm assuming I need to test by a) downloading an unpatched 3.4.2, b) applying
patches, c) running ./configure make make install.. If this is not
correct let me know
--
Ryan Gonzalez added the comment:
No; you need the CPython tip. You can use https://github.com/python/cpython.
Other than that, it's the configure+make thing.
As I said before, the pyconfig.h changes aren't there yet. Trying to figure out
how I want to approach those.
--
Cyd Haselton added the comment:
Ryan,
Has anyone taken you up on the non-KBOX testing?
Do you need me to test the patches within the KBOX environment?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
Ryan Gonzalez added the comment:
Cyd: if you could do that, it would be great!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Ryan Gonzalez added the comment:
...except for the pyconfig.h changes. Need to do something with autoconf for
that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Ryan Gonzalez added the comment:
I am slowly attaching the patches I created.
Titles:
- issue_16353.patch - Issue 16353 for tip
- issue_20305_tweaked.patch - Issue 2305 for tip
- rjmatthews62_fixes_tweaked.patch - rjmatthew...@gmail.com's Android fixes (a
bit more modularized)
-
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file38578/issue_20305_tweaked.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file38582/rjmatthews62_fixes_tweaked.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file38579/issue_20306.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file38580/issue_21668.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file38581/unused_var.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file38576/kbox_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file38577/issue_16353.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Changes by Stefan Krah ste...@bytereef.org:
--
nosy: -skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list mailing
Cyd Haselton added the comment:
Dog just died unexpectedly, behind on photograph project, need to start on
Python tutorial, have a chat in a different language on Sunday I need to prep
for and its patch day tomorrow.
So yeah. Completely understand.
--
Ryan Gonzalez added the comment:
Ok, please bear with me. I'm going to be REALLY busy for a bit; I have a BIG
test/exam coming up next week, a music recital shortly afterwards, and lots of
stuff/studying in between.
Sorry for any delays!
--
___
Cyd Haselton added the comment:
Ryan,
What version of Android and KBOX are you using? Are you cross-compiling?
If not could you post the output of printenv from within KBOX here?
--
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
ImportError: cannot import name 'module_from_spec'
The command line uses the system python3, which is too old
and does not have 'module_from_spec' yet.
Try running ...
python3 -S -m sysconfig --generate-posix-vars
... and then continue with `make`.
We
Stefan Krah added the comment:
On Ubuntu, when I uploaded the script to #5404, I only needed:
./configure --prefix=/tmp/arm-install --without-ensurepip
--host=arm-linux-gnueabi --build=x86_64 --disable-ipv6
(And config.site of course.)
We just have to fix the pgen etc. issues and someone
Ethan Furman added the comment:
This would be a build-bot for cross-compiling? As opposed to an android
build-bot (which we'll also need) ?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
Ryan Gonzalez added the comment:
This is what I'm using:
PYTHON_FOR_BUILD=`realpath ../cpython/python` CC=arm-linux-androideabi-clang
CXX=arm-linux-androideabi-clang++ ./configure --host=arm-linux-androideabi
--build=x86_64 --disable-ipv6 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no
Ryan Gonzalez added the comment:
Python really needs some way of separating the host C compiler and the target C
compiler.
I'm giving up cross-compiling from my computer and am going to install KBOX on
an Android virtual device. It worked for Cyd, it'll work for me. Beats
compiling two
Stefan Krah added the comment:
Cross compiling worked for a while in 3.4. It broke again
because we don't have a buildbot for that.
You should not need 20 args for ./configure. At least on
Ubuntu the script from #5404 generally works, but indeed
pgen, importlib and the above issue are currently
Stefan Krah added the comment:
Technically we could use the Android buildbot to test both
(cross-compiling and Android breakage), but it would be nice
to have a separate buildbot that just tests cross-compiling
with an easier target (e.g. arm-linux-gnueabi).
--
Cyd Haselton added the comment:
Ryan,
There are utilities you'll need in the KBOX environment, some of which may not
be available at the KBOX download site.
You'll need to download the make, gcc 4.8.0 and gawk packages from the download
site, and vim and/or nano depending on your
Ryan Gonzalez added the comment:
Ugh...
I'll just cross my fingers and hope that the libfakechroot KBOX2 comes with is
new enough.
As for a text editor, I'll just probably use something external.
*crosses fingers*
--
___
Python tracker
Ryan Gonzalez added the comment:
I'm getting a weird error message building python:
ryan@DevPC-LX:~/stuff/cpydroid$ make
_PYTHON_PROJECT_BASE=/home/ryan/stuff/cpython _PYTHON_HOST_PLATFORM=linux-arm
PYTHONPATH=./Lib:./Lib/plat-linux python3 -S -m sysconfig --generate-posix-vars
;\
if
Cyd Haselton added the comment:
Ryan,
Here are the changes to pyconfig.h. I left out this
#define ANDROID 1
because GCC 4.8.x and up have -mandroid -mbionic that define __ANDROID__ so
I've been using that.
#define HAVE_BROKEN_MBSTOWCS 1
#undef HAVE_DEV_PTMX
#undef HAVE_GETHOSTBYNAME_R
#undef
Ryan Gonzalez added the comment:
Ahh...ok, then please post the changes. I want to burn autotools enough right
now; I doubt that redoing those changes would ease my anger. :)
--
___
Python tracker rep...@bugs.python.org
Cyd Haselton added the comment:
I can...
./configure --prefix=/usr/python --enable-shared --without-ensurepip
...but configure didn't set up pyconfig.h correctly with those options. There
are some changes I had to make post-configure to pyconfig.h and others when I
initially built
Ryan Gonzalez added the comment:
So...you didn't make the changes by hand? Could you just post whatever you
passed to configure?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Cyd Haselton added the comment:
I understand; I haven't made the edits to these files but the edits are needed
in order for the Android build to work properly.
How do you want me to handle them? I can post the expected values here as a
diff, or just as plain text...?
--
Cyd Haselton added the comment:
Ryan,
I believe I've gotten all non-configure dependent commits in.
How do you want me to handle post-configure edits I;ve made to get Python
working (i.e. changes to pyconfig.h, Modules/Setup...)
--
___
Python
Ryan Gonzalez added the comment:
Cyd:
What exactly do you mean by post-configure edits?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Ryan Gonzalez added the comment:
Cyd:
Don't upload them. Git won't even let you add pyconfig.h; running `git add
PC/pyconfig.h` won't say anything, but running `git status` will show that it
did not do anything.
--
___
Python tracker
Cyd Haselton added the comment:
Ryan,
Edits made to files generated or modified by running ./configure. Example:
pyconfig.h.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Cyd Haselton added the comment:
Ryan,
Sounds good. I think I've got all of the bug tracker patches
committed/pushed...now I need to do all of the other edits. Aiming to be
finished by Friday/Saturday.
--
___
Python tracker rep...@bugs.python.org
Ryan Gonzalez added the comment:
Cyd:
I was trying to see if I could build the latest Python for Android (not to get
it to run; just to get it to compile) so that your changes would
(theoretically) easier to update to the latest Python. That failed. Miserably.
Joys of cross-compiling Python.
Ryan Gonzalez added the comment:
Cyd:
Just run:
$ git commit -m Put some message here # commit the changes
$ git push # push the changes
I'm working on it, but I haven't even gotten it to build (CURSE YOU, AUTOCONF!)
--
___
Python tracker
Cyd Haselton added the comment:
Ryan,
Thanks. First commit in; all fixes for Android's broken mbstowcs, new
plat-android and plat-android/DLFCN.py.
What are you trying to build?
--
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
Fine, I'm also optimizing and the fix isn't going into libmpdec.
Android can use the Python version of decimal.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
Cyd Haselton added the comment:
Well, why don't you try? :)
Resource optimization.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Cyd Haselton added the comment:
Fine, I'm also optimizing and the fix isn't going into libmpdec.
Android can use the Python version of decimal.
Er, ok. Not entirely sure what this means, mostly because the handful of spare
cycles not allocated to a) getting a fork up, running and patched b)
Stefan Krah added the comment:
I wouldn't know if they're reported to the same bug tracker...it's possible
they aren't.
Well, why don't you try? :)
Additionally it's possible that the lack of locale support in libc isn't
considered a bug.
Their struct lconv violates both the C standard
Ryan Gonzalez added the comment:
Ok...so the joys of autoconf configuring bite again. ALL Android devices have
/dev/ptmx (adb even assumes it)...should the configure script be modified to
skip that check if cross-compiling for Android?
--
___
Cyd Haselton added the comment:
*ALL Android devices have /dev/ptmx (adb even assumes it)...should the
*configure script be modified to skip that check if cross-compiling for
*Android?
Yes, definitely. See the mods to pyconfig.h here
Stefan Krah added the comment:
c) constantly working at making the latest and greatest Android-friendly
But that is precisely what Android support, should it be added, means:
It does take constant work (and build slaves) to support a platform.
Unrelatedly, regarding the localeconv changes:
Ryan Gonzalez added the comment:
I'll try to do as much as I can to get this through. Once I reinstall the NDK
(I accidently wiped my hard drive with a bad dd command recently), I'll test
this on my old Android phone that still runs 2.3 and would be very happy if
someone else can test it
Ethan Furman added the comment:
I will work on the build slave (note: it will definitely be /work/ so if anyone
has the resource and know-how to just do it, I will not be offended ;) .
--
___
Python tracker rep...@bugs.python.org
Ethan Furman added the comment:
Cyd, if you want to be a CPython/Android resource that's great.
If you don't have time for it, I completely understand. What I'm hoping for is
to take your initial efforts and build from there, as there are others who can
take what you've started and run with
Cyd Haselton added the comment:
Stefan,
I wouldn't know if they're reported to the same bug tracker...it's possible
they aren't. Additionally it's possible that the lack of locale support in
libc isn't considered a bug.
Ethan,
Given Victor's recommendation of using the dev branch and the
Cyd Haselton added the comment:
Ethan,
The binary produced runs in the KBOX environment. It can be copied between
devices provided the target device has the KBOX environment installed.
Victor et al,
I read https://docs.python.org/devguide/devcycle.html#indevbranch a couple of
times and,
Ethan Furman added the comment:
I'm afraid I know next to nothing about git, so cannot help there.
I would think that it wouldn't be too hard for someone (such as Ryan or myself)
to forward port a set of 3.4.2 patches to 3.5 -- so whatever is easiest for you.
--
Cyd Haselton added the comment:
Given Stephan's comments regarding Android support I'm beginning to think that
I may have bitten off more than I can chew. Is there an option between
'constant work' and 'zero contribution'?
I am not by any means an Android developer so the following is
Stefan Krah added the comment:
BTW, PEP 11 now demands a stable buildbot for official platform support
(IMO a very sane policy).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
R. David Murray added the comment:
Most of us fall toward the lower end of constant work and zero
contribution, honestly, since the majority of us are doing it in spare time
and not getting paid for it. What is needed is a long-term commitment to fix
bugs if they show up when new changes are
Stefan Krah added the comment:
But NDK bugs are reported to the same bug tracker, aren't they?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Ethan Furman added the comment:
Sounds great!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list mailing list
Cyd Haselton added the comment:
How does this sound?
* I'll clone the fork of the 3.4 branch I made in github, build and patch.
* Ryan will (as best as he can) grab said patches, regenerate them for the bug
tracker or forward port them to 3.5 (in github? to Mercurial)
* I'll figure out the
Ryan Gonzalez added the comment:
Ok, if I don't finish it today, I *will* finish it tomorrow. Or Sunday. Sunday
is the latest, though I'm pretty sure I'll be done by Saturday.
Hardest part is likely going to be re-configuring the Android emulator to test
it.
Cyd (and anyone else who can), do
Ethan Furman added the comment:
Yup, that sounds right! ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list
Cyd Haselton added the comment:
...or, should I fork the 3.4 branch? If so, which one...3.4 or origin/3.4?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
STINNER Victor added the comment:
I don't think that Android support should be added to a stable branche
(2.7 or 3.4), only in the development branch.
You may maintain your own 2.7 or 3.4 fork if you want.
--
___
Python tracker
Cyd Haselton added the comment:
Thanks Ryan.
Should I create a branch off the master at github and patch there or just clone
the master and patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
Ethan Furman added the comment:
Once this android Python is built, can it:
- be copied from/to other android devices?
- run without KBOX?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
R. David Murray added the comment:
There is a github mirror of the hg repository
(https://github.com/python/cpython). Patches produced from it don't
automatically get review links in the tracker, but at least they would then be
against the most current source (and someone else could
Cyd Haselton added the comment:
Thanks for that suggestion R. David...that would be ideal given the 2.x
requirements of Mercurial would mean i'd need to re-port Python before tackling
a port of Mercurial.
I'll wait until Ryan chimes in before I start serious work with git, just in
case.
Ryan Gonzalez added the comment:
That's what I was saying; I'll update the patches myself. I highly doubt Cyd
wants to re-port Python again. :0
I'll ask on python-dev on which would be preferred: configure.ac edits or macro
tests.
--
___
Python
STINNER Victor added the comment:
Take a look at https://docs.python.org/devguide/gitdevs.html
Mercurial for git developers
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Cyd Haselton added the comment:
Thanks for the suggestion Victor, however I've only ported git to this
environment; the most I;ve used it is to run 'git clone' to pull source from a
repo. The recommendation from the mobile-sig mailing list is...given my lack of
familiarity with VCS..is to
Ryan Gonzalez added the comment:
So...
I know a decent amount of configure scripts, although Python's is easily going
to be the absolute longest I've ever touched.
Maybe these should be made against the 3.6 Mercurial source? I'm not sure if
the Python devs would prefer that.
Also, should
Cyd Haselton added the comment:
The attached g-zipped file contains the first set of patches required to build
Python 3.4.2 from source in the environment specified in the origonal post.
Will post the second/final set ASAP
--
Added file:
STINNER Victor added the comment:
It's not convinient to have patches in a tarball. Please at least open patches
one by one, or better: open one issue per patch. You should group similar
changes in a single patch: for example all changes related to wcstombs().
You should explain each change.
Changes by Cyd Haselton chasel...@gmail.com:
Removed file:
http://bugs.python.org/file38209/python-3.4.2-androidpatches-1.tar.gz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Cyd Haselton added the comment:
Apologies for the tarball, but all patches within are related to this issue
Removing tarball and will re-post individual, cleaned-up patches, grouped by
issue.
Ryan, can you re-do patch for pythonrun.c? If not. I'l. work it in.
--
Changes by Ryan Gonzalez rym...@gmail.com:
--
nosy: +Ryan.Gonzalez
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list
Changes by Russell Keith-Magee freakboy3...@gmail.com:
--
nosy: +freakboy3742
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list
New submission from Cyd Haselton:
This is a (hopefully) complete list of patches and modifications required to
natively build Python 3.4.2 on an Android device where
patches == listed issues in this bug tracker
modifications (mods) == unsubmitted patches and/or edits made to source
CAVEATS
101 - 188 of 188 matches
Mail list logo