-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static / musl build #25
Comments
After some testing it looks like rustybox can't build static?
|
In order to get a completely static binary, you'll need to use the |
Tried it:
|
Dockerfile to try the build:
|
Yeah, there will definitely be errors since this was c2rust'ed with glibc. But they should all be pretty similar and rustybox will be better for having them fixed! |
Would be great to have a static rustybox working 👍 |
Most of the errors above seems to be because
The errors shown above are because The root cause is that c2rust preprocess C files and this makes them non-portable. Also it seems that busybox need to be patched to build with musl (https://wiki.musl-libc.org/building-busybox.html), so I wouldn't expect to get rustybox working without the same patches. I think your best bet would be to take busybox and patch it, then transpile it with c2rust and a musl libc/clang/llvm |
Thanks for the pointers @kellda ! I wasn't aware that busybox had issues building with musl. Getting a static build working would be great. I think the main blocker is just going through and getting rid of |
Hi, is there progress with rustybox / static musl build? |
No, still in the same situation. OOC what do you need a static build for? |
I would sugest taking a look at https://github.com/uutils/coreutils |
I get the build working with a glibc based Host and nightly channel.
But it isn't static and it should be musl linux target.
Is it possible to build for musl target? Musl host build fails I know. So I would try to build on a glibc host with musl target. Should that work?
Or how else I could build a small static binary?
The text was updated successfully, but these errors were encountered: