ulab as mpy v1.13 building fail

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
wangshujun@tom.com
Posts: 12
Joined: Fri Feb 15, 2019 9:22 am

ulab as mpy v1.13 building fail

Post by wangshujun@tom.com » Tue Feb 09, 2021 3:55 am

can you help me?
use command:

make -j3 BOARD=GENERIC_SPIRAM USER_C_MODULES=../../../micropython-ulab all

output:

CC ../../../micropython-ulab/code/scipy/optimize/optimize.c
CC ../../../micropython-ulab/code/scipy/signal/signal.c
CC ../../../micropython-ulab/code/scipy/special/special.c
../../../micropython-ulab/code/scipy/optimize/optimize.c: In function 'optimize_bisect':
../../../micropython-ulab/code/scipy/optimize/optimize.c:64:11: error: 'MP_QSTR_xtol' undeclared (first use in this function)
{ MP_QSTR_xtol, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_PTR(&xtolerance)} },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:64:11: note: each undeclared identifier is reported only once for each function it appears in
../../../micropython-ulab/code/scipy/optimize/optimize.c:65:11: error: 'MP_QSTR_maxiter' undeclared (first use in this function)
{ MP_QSTR_maxiter, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 100} },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c: In function 'optimize_fmin':
../../../micropython-ulab/code/scipy/optimize/optimize.c:133:11: error: 'MP_QSTR_xatol' undeclared (first use in this function)
{ MP_QSTR_xatol, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_PTR(&xtolerance)} },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:133:11: error: initializer element is not constant
../../../micropython-ulab/code/scipy/optimize/optimize.c:133:11: note: (near initialization for 'allowed_args[2].qst')
../../../micropython-ulab/code/scipy/optimize/optimize.c:134:11: error: 'MP_QSTR_fatol' undeclared (first use in this function)
{ MP_QSTR_fatol, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_PTR(&xtolerance)} },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:134:11: error: initializer element is not constant
../../../micropython-ulab/code/scipy/optimize/optimize.c:134:11: note: (near initialization for 'allowed_args[3].qst')
../../../micropython-ulab/code/scipy/optimize/optimize.c:135:11: error: 'MP_QSTR_maxiter' undeclared (first use in this function)
{ MP_QSTR_maxiter, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 200} },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:135:11: error: initializer element is not constant
../../../micropython-ulab/code/scipy/optimize/optimize.c:135:11: note: (near initialization for 'allowed_args[4].qst')
../../../micropython-ulab/code/scipy/optimize/optimize.c: In function 'optimize_newton':
../../../micropython-ulab/code/scipy/optimize/optimize.c:358:11: error: 'MP_QSTR_tol' undeclared (first use in this function)
{ MP_QSTR_tol, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_rom_obj = MP_ROM_PTR(&xtolerance) } },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:358:11: error: initializer element is not constant
../../../micropython-ulab/code/scipy/optimize/optimize.c:358:11: note: (near initialization for 'allowed_args[2].qst')
../../../micropython-ulab/code/scipy/optimize/optimize.c:359:11: error: 'MP_QSTR_rtol' undeclared (first use in this function)
{ MP_QSTR_rtol, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_rom_obj = MP_ROM_PTR(&rtolerance) } },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:359:11: error: initializer element is not constant
../../../micropython-ulab/code/scipy/optimize/optimize.c:359:11: note: (near initialization for 'allowed_args[3].qst')
../../../micropython-ulab/code/scipy/optimize/optimize.c:360:11: error: 'MP_QSTR_maxiter' undeclared (first use in this function)
{ MP_QSTR_maxiter, MP_ARG_KW_ONLY | MP_ARG_INT, { .u_int = 50 } },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:360:11: error: initializer element is not constant
../../../micropython-ulab/code/scipy/optimize/optimize.c:360:11: note: (near initialization for 'allowed_args[4].qst')
In file included from ../../../micropython-ulab/code/scipy/optimize/optimize.c:16:0:
../../../micropython-ulab/code/scipy/optimize/optimize.c: At top level:
../../../micropython-ulab/code/scipy/optimize/optimize.c:394:58: error: 'MP_QSTR_optimize' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_optimize) },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../py/obj.h:96:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:394:42: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_optimize) },
^
../../py/obj.h:96:30: note: (near initialization for 'ulab_scipy_optimize_globals_table[0].value')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:394:42: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_optimize) },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:396:27: error: 'MP_QSTR_bisect' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR_bisect), (mp_obj_t)&optimize_bisect_obj },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../py/obj.h:96:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:396:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_bisect), (mp_obj_t)&optimize_bisect_obj },
^
../../py/obj.h:96:30: note: (near initialization for 'ulab_scipy_optimize_globals_table[1].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:396:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_bisect), (mp_obj_t)&optimize_bisect_obj },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:402:27: error: 'MP_QSTR_fmin' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR_fmin), (mp_obj_t)&optimize_fmin_obj },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../py/obj.h:96:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:402:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_fmin), (mp_obj_t)&optimize_fmin_obj },
^
../../py/obj.h:96:30: note: (near initialization for 'ulab_scipy_optimize_globals_table[2].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:402:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_fmin), (mp_obj_t)&optimize_fmin_obj },
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:405:27: error: 'MP_QSTR_newton' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR_newton), (mp_obj_t)&optimize_newton_obj },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../py/obj.h:96:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:405:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_newton), (mp_obj_t)&optimize_newton_obj },
^
../../py/obj.h:96:30: note: (near initialization for 'ulab_scipy_optimize_globals_table[3].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/optimize/optimize.c:405:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_newton), (mp_obj_t)&optimize_newton_obj },
^
../../../micropython-ulab/code/scipy/signal/signal.c: In function 'signal_sosfilt':
../../../micropython-ulab/code/scipy/signal/signal.c:58:11: error: 'MP_QSTR_sos' undeclared (first use in this function)
{ MP_QSTR_sos, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_rom_obj = mp_const_none } },
^
../../../micropython-ulab/code/scipy/signal/signal.c:58:11: note: each undeclared identifier is reported only once for each function it appears in
../../../micropython-ulab/code/scipy/signal/signal.c:59:11: error: 'MP_QSTR_x' undeclared (first use in this function)
{ MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_rom_obj = mp_const_none } },
^
../../../micropython-ulab/code/scipy/signal/signal.c:60:11: error: 'MP_QSTR_zi' undeclared (first use in this function)
{ MP_QSTR_zi, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = mp_const_none } },
^
In file included from ../../py/mpstate.h:35:0,
from ../../py/runtime.h:29,
from ../../../micropython-ulab/code/scipy/signal/signal.c:17:
../../../micropython-ulab/code/scipy/signal/signal.c: At top level:
../../../micropython-ulab/code/scipy/signal/signal.c:139:58: error: 'MP_QSTR_signal' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_signal) },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../py/obj.h:96:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/signal/signal.c:139:42: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_signal) },
^
../../py/obj.h:96:30: note: (near initialization for 'ulab_scipy_signal_globals_table[0].value')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/signal/signal.c:139:42: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_signal) },
^
../../../micropython-ulab/code/scipy/signal/signal.c:141:27: error: 'MP_QSTR_spectrogram' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR_spectrogram), (mp_obj_t)&signal_spectrogram_obj },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../py/obj.h:96:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/signal/signal.c:141:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_spectrogram), (mp_obj_t)&signal_spectrogram_obj },
^
../../py/obj.h:96:30: note: (near initialization for 'ulab_scipy_signal_globals_table[1].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/signal/signal.c:141:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_spectrogram), (mp_obj_t)&signal_spectrogram_obj },
^
../../../micropython-ulab/code/scipy/signal/signal.c:144:27: error: 'MP_QSTR_sosfilt' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR_sosfilt), (mp_obj_t)&signal_sosfilt_obj },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../py/obj.h:96:30: error: initializer element is not constant
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/signal/signal.c:144:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_sosfilt), (mp_obj_t)&signal_sosfilt_obj },
^
../../py/obj.h:96:30: note: (near initialization for 'ulab_scipy_signal_globals_table[2].key')
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/signal/signal.c:144:11: note: in expansion of macro 'MP_OBJ_NEW_QSTR'
{ MP_OBJ_NEW_QSTR(MP_QSTR_sosfilt), (mp_obj_t)&signal_sosfilt_obj },
^
In file included from ../../py/mpstate.h:35:0,
from ../../py/runtime.h:29,
from ../../../micropython-ulab/code/scipy/special/special.c:16:
../../../micropython-ulab/code/scipy/special/special.c:22:58: error: 'MP_QSTR_special' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_special) },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
../../../micropython-ulab/code/scipy/special/special.c:33:21: error: 'MP_QSTR_gammaln' undeclared here (not in a function)
{ MP_OBJ_NEW_QSTR(MP_QSTR_gammaln), (mp_obj_t)&vectorise_lgamma_obj },
^
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
^
make: *** [../../py/mkrules.mk:77:build-GENERIC_SPIRAM/code/scipy/optimize/optimize.o] 错误 1

User avatar
dhylands
Posts: 3599
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: ulab as mpy v1.13 building fail

Post by dhylands » Tue Feb 09, 2021 4:54 pm

Anytime I run into QSTR building errors I do a clean and try again.

Post Reply