← index #17399PR #15724
Related · high · value 3.389
QUERY · ISSUE

docs: pots/unix (standalone) has no instructions to build static linked micropython instance

openby o-murphyopened 2025-05-30updated 2025-07-07
docsport-unix

Documentation URL

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

Description

The ports/unix instructions not provide a way to build micropython with LDFLAGS -static to link ld statically. So even if you trying to build standalone binary it still build dynamic linked instance (e.g. ld.so.1). Dynamic linking to system ld.so.1 makes impossible to run binary on systems like Buildroot Linux

For make fully standalone static linked build you should directly modify Makefile cause make not handle LDFLAGS and docs not give instructions for this case.

Relative to issue: https://github.com/micropython/micropython/issues/17353

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

unix: Expand the build steps in the README.

mergedby projectgusopened 2024-08-27updated 2024-09-06
docsport-unix

Summary

  • Present the default build dependencies in one place at the top, and make a separate section about building standalone.

  • Add steps for the "minimal" variant as well.

  • Document that building standalone requires autoconf and libtool.

  • Allow MICROPY_STANDALONE to be set as an environment variable (makes for easier documentation as well, as it has to be set for multiple make invocations).

Closes #11313

Testing

I tested these changes by running various install and build steps in some throwaway Ubuntu 20.04 LTS containers (via podman run -it --rm ubuntu:20.04).

This work was funded through GitHub Sponsors.

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