micropython / micropython

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
https://micropython.org
Other
19.22k stars 7.7k forks source link

issue in compiling (/ports/unix) make. #8081

Closed SivaBalaKrishnaK closed 2 years ago

SivaBalaKrishnaK commented 2 years ago

i am trying to compile /ports/unix version, (downloaded latest master branch version code.). did as follows, $ cd mpy-cross (completed with no errors) $ make (completed with no errors) $ cd ports/unix (completed with no errors) $ make submodules (completed with no errors) $ make (completed with errors)

error snapshot is as follows tbmnxvmuser@TBMNXVM01:/opt/builds/ESP8266/micropython/ports/unix$ make Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. CC ../../py/vm.c In file included from ../../py/vm.c:199:0: ../../py/vmentrytable.h: In function ‘mp_execute_bytecode’: ../../py/vmentrytable.h:40:5: error: initialized field overwritten [-Werror=override-init] [MP_BC_LOAD_CONST_FALSE] = &&entry_MP_BC_LOAD_CONST_FALSE, ^ ../../py/vmentrytable.h:40:5: error: (near initialization for ‘entry_table[80]’) [-Werror=override-init] ../../py/vmentrytable.h:41:5: error: initialized field overwritten [-Werror=override-init] [MP_BC_LOAD_CONST_NONE] = &&entry_MP_BC_LOAD_CONST_NONE,

dpgeorge commented 2 years ago

What compiler version are you using?

You can try the following to fix it:

$ make CFLAGS_EXTRA="-DMICROPY_OPT_COMPUTED_GOTO=0"