Python Forum
cross-compiling python with zlib support
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cross-compiling python with zlib support
#1
Hi There
Has anybody ever tried to cross-compile python with zlib support for another architecture?
I'm trying to cross-compile Python for my embedded ARM system.

here are the triplets:

HOST = arm-linux-musleabi
BUILD = x86_64-linux-gnu



I've already cross-compiled python without zlib support and it sort of works. I'm running it on my Android
Phone.

Here's a Screenshot:
https://drive.google.com/file/d/1vTVqtRl...PVFCi/view

The configure command i give to produce Python is this

../Python-2.7.14/configure --host=arm-linux-musleabi --build=x86_64-linux-gnu --prefix=/home/michele/PythonAndroid/prefix/python2 --disable-ipv6 ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no | tee ../python2-configure.log

how do I add zlib support?

I have installed zlib inside my cross-compiler and I have uncommented a line inside the file (build_dir)/Modules/Setup to force the building of the zlib module but it doesn't work.
Reply
#2
you may want to take a look at MicroPython: https://micropython.org/
Reply
#3
@Larz60+
Thanks a lot for the reply, but I still would like to cross-compile the whole Python distribution using my arm-linux-musleabi cross-compiler. I'm doing it for the sake of learning. It might be cool if I succeed in doing this.

Python's make program says that I should take a look at the setup.py inside the source tree to look for what's missing to build the module.. but I don't know how to adapt that file so it can find the zlib.h and libz.so library
Reply
#4
Have you read: https://docs.python.org/3.6/distutils/setupscript.html
and another: https://pythonhosted.org/an_example_pypi...tools.html
Reply
#5
The module of zlib that i'm trying to cross-compile is inside the main python distribution. the setup.py file is not one of an ordinary program but the one of the python package
Reply
#6
Hi and sorry for bringing up that thread again!

I have exactly the the same problem as michelebucca. Did you ever succeed in building Python with zlib support?

Cheers,
Marcus
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  compiling with an undefined variable Skaperen 0 991 Nov-10-2022, 11:59 PM
Last Post: Skaperen
  Should Python support i suffix for complex numbers as well as j ? stevendaprano 3 1,421 May-21-2022, 08:37 AM
Last Post: stevendaprano
  Is Python Support Graphical User Interface? ankitdixit 4 2,246 Apr-29-2022, 09:26 PM
Last Post: Axel_Erfurt
  compiling numpy, getting C source Skaperen 10 3,674 Nov-20-2021, 12:41 AM
Last Post: Skaperen
  python compiling and sql? abrogard 2 2,268 Oct-27-2020, 06:37 AM
Last Post: buran
  Python/winrt support for python 3.8 version pbvinoth 2 3,677 Jul-08-2020, 02:03 PM
Last Post: snippsat
  Improved Python support in SonarLint (PyCharm! Eclipse!) ganncamp 0 2,471 Apr-29-2020, 06:25 PM
Last Post: ganncamp
  SonarCloud, SonarQube support Python 3.8, add rules for method signature & visibility ganncamp 0 1,747 Mar-31-2020, 04:29 PM
Last Post: ganncamp
  Future of Jython now Python 2 support ended Wattletree 1 2,304 Mar-19-2020, 10:13 PM
Last Post: Larz60+
  compiling various versions of Python, which toolchain? Skaperen 4 2,712 Jun-06-2019, 06:28 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020