From 3c83b852c0018547ef3127a462345d1cefd0b930 Mon Sep 17 00:00:00 2001 From: Michael Huebler <mh@tosl.org> Date: Thu, 22 Aug 2019 06:09:11 +0000 Subject: [PATCH] docs(build): Add a note for macOS Update how-to-build.rst - Added another hint for macOS, for the common problem that strip fails on mpy-cross with "malformed object (unknown load command 9)" Manual merge for !173 --- Documentation/how-to-build.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/how-to-build.rst b/Documentation/how-to-build.rst index 0b616ab2..177bdbfa 100644 --- a/Documentation/how-to-build.rst +++ b/Documentation/how-to-build.rst @@ -144,6 +144,15 @@ In order to do a rebuild you can issue a clean command to ninja via Otherwise, rerunning ``./bootstrap.sh`` will also clean the build-directory. +.. note:: + + **macOS**: If ``strip`` fails to work on the freshly compiled ``mpy-cross``: + "strip: object: (...)/lib/micropython/micropython/mpy-cross/mpy-cross + malformed object (unknown load command 9)", you a likely not using the + `strip` that matches to your ``clang``. Do ``which strip && which clang``, + and if the paths don't match, clean up your PATHs, or as a quick hack, + create a symlink for strip. + .. note:: If you try to flash pycardium_epicardium.bin (renamed to card10.bin) @@ -152,4 +161,4 @@ Otherwise, rerunning ``./bootstrap.sh`` will also clean the build-directory. was >1MB. This was caused by the ``tr`` tool in the build process (it's supposed to create a large file with 0xff in it) - this requires the LC_ALL environment variable to be not set, or set to "C" - (but not UTF8 or similar). \ No newline at end of file + (but not UTF8 or similar). -- GitLab