Xinyuan-LilyGO / lilygo-micropython

Micropython for LILYGO boards
GNU General Public License v3.0
88 stars 28 forks source link

T-Display S3 doesn't build #19

Closed scruss closed 1 year ago

scruss commented 1 year ago

Build environment: Ubuntu 22.04

Steps to build:

sudo apt-get install git make python3 python3-pip cmake quilt
git clone https://github.com/Xinyuan-LilyGO/lilygo-micropython.git
cd lilygo-micropython/
cp config_T-DisplayS3 config
make

Fails with:

CC ../py/parse.c
CC ../py/scope.c
CC ../py/compile.c
../py/compile.c: In function ‘compile_built_in_decorator’:
../py/compile.c:861:24: error: ‘MP_QSTR_asm_thumb’ undeclared (first use in this function); did you mean ‘MP_QSTR_ustruct’?
  861 |     } else if (attr == MP_QSTR_asm_thumb) {
      |                        ^~~~~~~~~~~~~~~~~
      |                        MP_QSTR_ustruct
../py/compile.c:861:24: note: each undeclared identifier is reported only once for each function it appears in
../py/compile.c:863:24: error: ‘MP_QSTR_asm_xtensa’ undeclared (first use in this function); did you mean ‘MP_QSTR_atten’?
  863 |     } else if (attr == MP_QSTR_asm_xtensa) {
      |                        ^~~~~~~~~~~~~~~~~~
      |                        MP_QSTR_atten
../py/compile.c: In function ‘compile_scope_inline_asm’:
../py/compile.c:3284:26: error: ‘MP_QSTR_align’ undeclared (first use in this function); did you mean ‘MP_QSTR_asin’?
 3284 |         } else if (op == MP_QSTR_align) {
      |                          ^~~~~~~~~~~~~
      |                          MP_QSTR_asin
make[2]: *** [../py/mkrules.mk:80: /home/scruss/c/lilygo-micropython/build_dir/esp32s3/build-LILYGO_T-DisplayS3/py/compile.o] Error 1
make[2]: Leaving directory '/home/scruss/c/lilygo-micropython/build_dir/esp32s3/micropython/mpy-cross'
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
make[1]: *** [Makefile:42: all] Error 2
make[1]: Leaving directory '/home/scruss/c/lilygo-micropython/build_dir/esp32s3/micropython/ports/esp32'
make: *** [Makefile:36: all] Error 2
scruss commented 1 year ago

After reading Build Failure #6 issue, I have found a way to build this correctly. ninja must be remove from the system, and concurrent build processes make the compilation fail.

So my revised successful build process, which created a binary file and instructions for installing it, is:

sudo apt-get install git make python3 python3-pip cmake quilt
sudo apt remove ninja-build
git clone https://github.com/Xinyuan-LilyGO/lilygo-micropython.git
cd lilygo-micropython/
cp config_T-DisplayS3 config
make -j1

Please close this issue once the changes have been made in the documentation