landley / toybox

toybox
http://landley.net/toybox
BSD Zero Clause License
2.44k stars 340 forks source link

[Documentation / FAQ] Add "can toybox be compiled in a static manner, like busybox", and "is ncurses required" #517

Open rubyFeedback opened 2 months ago

rubyFeedback commented 2 months ago

You guys have a FAQ already, but most of the entries link to a video. I can not watch a whole video. I would prefer short statements as answers. (Both a video AND the answer may be the best solution).

I came specifically here right now because I had problems with busybox. I can not compile it with ncurses; I can compile htop and other applications that depend on ncurses fine, so this is a flaw in busybox's build system. Unfortunately the last change to busybox appears to have been +1 year ago so the project may be dead. Hopefully toybox can replace that use case I have for busybox.

Why do I use busybox?

I compile it via static option from the make menuconfig menu. I need it in case I break some shared library on my custom linux system. Hopefully toybox can replace busyboxy here.

Anyway. For this issue request I would like to suggest two new entries into the FAQ:

(1) can toybox be compiled in a static manner, like busybox
(2) is ncurses required for the above ^^^

Hopefully this could be added to the FAQ. Perhaps the FAQ can be a separate .md document rather than be put into the main README here, but this is entirely up to you of course.

Thank you for reading this issue request.

landley commented 2 months ago

The last commit to https://git.busybox.net/busybox/log/ was 8 weeks ago. I suspect Alpine Linux and Buildroot and so on would notice if it was dead?

How do "most of the entries" link to a video? There are 17 questions in the FAQ and only three links to videos from that page: one to my 2013 talk on why toybox exists (also in the nav bar on the left), one to a talk from an ex-debiain maintainer about why time based releases are a good thing (me citing my sources for where I got the idea, it was from that talk), and one to a 38 second clip of the 1980 hitchhiker's guide to the galaxy BBC television miniseries about vogon poetry (citing where I got the phrase "in brief: avoid").

The relevant FAQ entry for your question seems to be https://landley.net/toybox/faq.html#cross which doesn't link to a video. There's more about static linking in the next FAQ entry https://landley.net/toybox/faq.html#targets and I found those by doing a ctrl-f search for "static" in the page.

terefang commented 1 month ago

I came specifically here right now because I had problems with busybox. I can not compile it with ncurses; I can compile htop and other applications that depend on ncurses fine, so this is a flaw in busybox's build system. Unfortunately the last change to busybox appears to have been +1 year ago so the project may be dead. Hopefully toybox can replace that use case I have for busybox.

i am statically building both toybox and busybox using a musl-cross toolchain from

i just looked at my build scripts and up to busybox 1.36.1, ncurses is not required – at least not for my feature enabled.

depending on the feature enabled in toybox you might require building and installing libressl and libz into the toolchain first.

you might want to know that gnu coreutils can now also be build single-binary and statically linked with musl-cross toolchain if that satisfies your use-case.