microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
42 stars 23 forks source link

Undefined symbols for arm64 - Issue building micropython v2 #89

Closed scath999 closed 2 years ago

scath999 commented 2 years ago

Have tried to build this project per the instructions for building v2 here.

End up with the following link error:

LINK mpy-cross
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

Any help?

microbit-carlos commented 2 years ago

What OS and architecture are you using? Is it Linux or macOS in arm64?

scath999 commented 2 years ago

My bad. Mac M1 - Monterey

microbit-carlos commented 2 years ago

Thanks @scath999, looks like it might be this issue: https://github.com/micropython/micropython/issues/7232

You could apply the patches listed there locally, or maybe try if you can install x86 gcc with rosetta and that might work?

scath999 commented 2 years ago

@microbit-carlos Much appreciated. That did fix the one issue - have now found others, but that's my boat to row.

Cheers!