How to build Python - t-kuha/zynq-library GitHub Wiki
Environment
Python |
Petalinux |
3.6.2 |
2017.2 |
3.6.4 |
2017.4 |
3.6.5 |
2018.2 |
Get source code
Building for host
- You first have to build for host
$ ./configure --prefix=<host output directory> --enable-optimizations
$ make -j`nproc`
$ make install
Building for target
- We have to work in totally different source root...
$ PATH=<host output directory>/bin:${PATH} \
> ./configure \
> --build=arm --host=arm-linux-gnueabihf \
> --prefix=<output directory> \
> --enable-shared --enable-optimizations --disable-ipv6 \
> ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no
# Compile & install
$ PATH=<host output directory>/bin:${PATH} make -j`nproc`
$ PATH=<host output directory>/bin:${PATH} make install
Cython
$ PATH=<cross output directory>/bin:${PATH} \
> CC=arm-linux-gnueabihf-gcc \
> LINKCC=arm-linux-gnueabihf-gcc \
> LDSHARED='arm-linux-gnueabihf-gcc -shared'
> CFLAGS=-I<cross output directory>/include/python3.6m \
> make -j`nproc