BUILD ERROR Generating ../../lv_mp.c FAILED: lv_mp.c

WSL2
Ubuntu 20.04.2 LTS
esp-idf v4.2
lv_micropython v1.14-457-g3bf6c7f12
Python 3.8.10
cmake version 3.10.2

esptool.py v3.0
Generated /mnt/c/SmartLOG/FW/Build/lv_micropython/ports/esp32/build-GENERIC_SPIRAM/bootloader/bootloader.bin
[1038/1396] Generating …/…/lv_mp.c
FAILED: lv_mp.c
cd /mnt/c/SmartLOG/FW/Build/lv_micropython/ports/esp32/build-GENERIC_SPIRAM/esp-idf/main && /home/rmg/mnt/c/SmartLOG/FW/Build/python_env/idf4.2_py3.8_env/bin/python3.8 /mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/gen_mpy.py -M lvgl -MP lv -MD /mnt/c/SmartLOG/FW/Build/lv_micropython/ports/esp32/build-GENERIC_SPIRAM/lv_mp.c.json -E /mnt/c/SmartLOG/FW/Build/lv_micropython/ports/esp32/build-GENERIC_SPIRAM/lv_mp.c.pp /mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/lvgl/lvgl.h > /mnt/c/SmartLOG/FW/Build/lv_micropython/ports/esp32/build-GENERIC_SPIRAM/lv_mp.c || ( rm -f /mnt/c/SmartLOG/FW/Build/lv_micropython/ports/esp32/build-GENERIC_SPIRAM/lv_mp.c && /bin/false )
Traceback (most recent call last):
File “/mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/gen_mpy.py”, line 299, in
ast = parser.parse(s, filename=’’)
File “/mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/…/pycparser/pycparser/c_parser.py”, line 149, in parse
return self.cparser.parse(
File “/mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/…/pycparser/pycparser/ply/yacc.py”, line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File “/mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/…/pycparser/pycparser/ply/yacc.py”, line 1199, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File “/mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/…/pycparser/pycparser/ply/yacc.py”, line 193, in call_errorfunc
r = errorfunc(token)
File “/mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/…/pycparser/pycparser/c_parser.py”, line 1861, in p_error
self._parse_error(
File “/mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/gen/…/pycparser/pycparser/plyparser.py”, line 67, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: /mnt/c/SmartLOG/FW/Build/lv_micropython/lib/lv_bindings/lvgl/src/core/…/misc/lv_txt.h:145:60: before: attribute
[1041/1396] Generating …/…/genhdr/mpversion.h
GEN /mnt/c/SmartLOG/FW/Build/lv_micropython/ports/esp32/build-GENERIC_SPIRAM/genhdr/mpversion.h
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
make: *** [Makefile:35: all] Error 2

TRIED…
typedef void * SemaphoreHandle_t;
to espidf.h right after typedef void * TaskHandle_t;

no change

Thank you for reporting this!

Fixed.
Please sync to latest version of lv_micropython, update submodules and try again.

I have latest (master) and still getting this error.

Submodule path ‘lib/lv_binding_micropython/driver/png/lodepng’: checked out ‘7fdcc96a5e5864eee72911c3ca79b1d9f0d12292’
Submodule path ‘lib/lv_binding_micropython/lvgl’: checked out ‘ec9b41a05fe378998ad8844b5989e00916c9b548’
Submodule path ‘lib/lv_binding_micropython/pycparser’: checked out ‘1706a39e0116dde0b2d1c52d67078a9a0ab4dbe7’

File “/repos/pycom-micropython-sigfox/lib/lv_binding_micropython/gen/…/pycparser/pycparser/plyparser.py”, line 67, in _parse_error
raise ParseError("%s: %s" % (coord, msg))

Hi @Phil_Jepsen !

We now have CI tests to make sure lv_micropython master branch is healthy.
These tests check that the unix, esp32 and stm32 ports are building without errors and even run tests on the unix port.
Currently all tests pass, as you can see on GitHub Actions.

Therefore your problem must be local to your environment.

  • What esp-idf version are you using?
  • Did you remember to update git submodules recursively?
  • Did you try to start over with fresh environment?