Compiling with FROZEN_MANIFEST fails to build mpy-cross if it hasn't been built separately first
Compiling with FROZEN_MANIFEST fails to build mpy-cross if it hasn't been built separately first.
Reproducer
(on current master)
git clean -fdx && echo "" > manifest.py && make -C ports/unix submodules && make -C ports/unix FROZEN_MANIFEST="$PWD/manifest.py"
Fails linking with:
LINK build/mpy-cross
/usr/bin/ld: build/py/qstr.o: in function `qstr_init':
qstr.c:(.text.qstr_init+0x7): undefined reference to `mp_qstr_frozen_const_pool'
collect2: error: ld returned 1 exit status
Bisect
Bisect points to f01d5fb657159f1afa9d41cf39830d17b791a67e as the culprit.
I assume the problem is that the mpy-cross Makefile inherits the wrong CFLAGS? Also, interestingly cmake-based ports have the same problem.
mpy-cross link error on MacOS
Hi,
I'm having fun porting MicroPython to the Texas Instruments Stellaris Launchpad. The "minimal" functionality works, including basic GPIO (LEDs, swiches), but I would like the cross compiler to create a Frozen Bytecode demo and building mpy-cross fails on my environment.
Last lines of make are:
Undefined symbols for architecture arm64:
"_nlr_push", referenced from:
_mp_iternext in runtime.o
_it_iternext in objgetitemiter.o
_main_ in main.o
(maybe you meant: _nlr_push_tail)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mpy-cross] Error 1
I am running MacOS Big Sur (11.3) on Apple M1 CPU. Any help would be appreciated.
Regards,
Yan.