← index #14536PR #14344
Off-topic · high · value 1.004
QUERY · ISSUE

docs: Windows port README should include `make submodule` as a build step

openby mattytrentiniopened 2024-05-19updated 2024-07-06
docsport-windows

Checks

  • I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.

  • I've searched for existing issues and didn't find any that matched.

Documentation URL

https://github.com/micropython/micropython/blob/master/ports/windows/README.md

Description

The build steps for the Windows port are missing make submodule. Build errors occur because micropython-lib (specifically the ssl module) isn't found if that command isn't executed.

CANDIDATE · PULL REQUEST

Fix 'make submodules' when building out-of-tree

mergedby cwaltheropened 2024-04-21updated 2024-08-26
py-core

When MicroPython is used as a submodule and built using make from the containing project, e.g. following the instructions for the embed port, make submodules fails because it goes looking for the sub-sub-module paths in the outer repository instead of in the micropython repository.

This is fixed by the attached commit: invoke git inside the micropython submodule instead of at the outer project level.

(I initially thought that this would affect not just the embed port but also external board definitions, but it turns out it does not, because in the external-board-definition process MicroPython is build by a sub-make that operates inside the MicroPython submodule.)

Steps to reproduce

git init mpembedder
cd mpembedder
git submodule add https://github.com/micropython/micropython.git micropython
cp micropython/examples/embedding/* .
perl -pi -e 's|MICROPYTHON_TOP = ../..|MICROPYTHON_TOP = micropython|' micropython_embed.mk
echo 'require("time")' > manifest.py
make -f micropython_embed.mk FROZEN_MANIFEST=manifest.py submodules

Actual result

Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Updating submodules: lib/micropython-lib
error: pathspec 'micropython/lib/micropython-lib' did not match any file(s) known to git
make: *** [submodules] Error 1

Expected result

Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Updating submodules: lib/micropython-lib
Submodule 'lib/micropython-lib' (https://github.com/micropython/micropython-lib.git) registered for path 'lib/micropython-lib'
Cloning into '/Users/cwalther/mpembedder/micropython/lib/micropython-lib'...
Submodule path 'lib/micropython-lib': checked out 'ddb1a279578bfff8c1b18aff3baa668620684f64'

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied