Tiny Core Base > Raspberry Pi
Lost while trying to compile Python 3.11.1
Juanito:
This seems to cure the ncurses problem:
edit setup.py to read:
curses_includes.append('/usr/local/include/ncursesw')
elcouz:
--- Quote from: Juanito on January 22, 2023, 02:10:45 AM ---This seems to cure the ncurses problem:
edit setup.py to read:
curses_includes.append('/usr/local/include/ncursesw')
--- End quote ---
I forgot to mention this was already done since the beginning.
But anyway I kinda redneck my way through compilation (after many many tries) of Python 3.11.1...
To successfully compile it I needed to ditch the CFLAGS/CXXFLAGS flags.
This is the step I did:
- Extract source files
- edit setup.py to change curses_includes.append path to /usr/local/include/ncursesw
- ./configure --prefix=/usr/local --enable-shared --enable-optimizations <--- slower but worth it
- make -j -l 4
- make altinstall DESTDIR=/tmp/python3.11
- mksquashfs /tmp/python3.11 python3.11.tcz
- cp /tmp/python3.11.tcz /mnt/mmcblkp2/tce/optional
If I added the CFLAGS/CXXFLAGS flags, make will always fail afterward ... I tried many flags settings ... spend two days watching compilation fails :'(
tce-load -i python3.11
all good now ,,, thanks!
Juanito:
I just tested on an RPi3 running piCore-13.1 and this works:
--- Code: ---tce-load -i compiletc sqlite3-dev tk-dev glib2-dev gdbm-dev libEGL-dev readline-dev liblzma-dev openssl-dev
wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tar.xz
tar xf *tar*
cd Python-3.11.1
edit setup.py
curses_includes.append('/usr/local/include/ncursesw')
CPPFLAGS="-I/usr/local/include/ncursesw" CC="gcc -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" CXX="g++ -mtune=-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --localstatedir=/var --enable-shared --with-system-expat --with-system-ffi --with-ensurepip=yes
find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;
find . -name Makefile -type f -exec sed -i 's/-g -O3//g' {} \;
find . -name Makefile -type f -exec sed -i 's/flto-partition=none -g/flto-partition=none/g' {} \;
make [12m 38.39s]
sudo make install
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version