Live data from Hacker News

Oasis: a small statically-linked Linux system

github.com

11–20 of 169 posts

Re: Oasis: a small statically-linked Linux system

#12

This seems to "statically link" binaries in the sense that each program it ships with is a standalone binary. Does anyone know whether it's possible to truly statically link an entire Linux install, in the sense that the whole system is a single statically linked file including the kernel, display manager, web browser, etc so that link-time optimization can deduplicate code across the entire system?

Yes, I know that it's NOT possible. Anything that uses the same libraries, e.g. GTK+, will end up calling gtk_init() multiple times. Callback functions with the same names will collide at link-time.

Despite the madness of the code that would be generated if the compiler allowed it, since it doesn't, you can expect a list of linker errors so long, that you can go to bed and wake up in the morning and it's still spewing to stderr.

Re: Oasis: a small statically-linked Linux system

#15

Would be cool to get a bit of a "why this matters" intro on repos like this. I clicked through the details, but left wondering if I have any potential use for this. Can I compile this onto a USB stick and use it as a throw-away boot Linux for maintenance tasks? Can I cross-compile this for embedded devices? What is the statically-linked advantage here? Not trying to minimize the effort, I would actually love to see m…

As someone who uses linux casually, I often experience pain when I download a program, try to run it, and it fails because some dependency is not installed or is not the right version. So you try to figure out how to install it and it in turn needs a couple of things.

All of this works fine if whatever package manager your distro uses has the program you want, but the package managers don't have evertying!

So I'd love an ecosystem where things tend to be statically linked unless there is a good reason not to.

Re: Oasis: a small statically-linked Linux system

#16
post #9

All README's should begin with some sort of mission statement. What is the goal or reason for the existence of this? I can imagine some, but I am not sure where this is heading.

Except that the README of this project answers all your questions. A list of distinctive features and a list of project's principles make up half of the README.

I read it. It does not say "why" anywhere.

Re: Oasis: a small statically-linked Linux system

#17
This would be 10x faster and smaller if they just built these components into Busybox.

Package management, library management, etc are solved problems when it comes to Linux distros. The only practical improvement you can make is containers (or similar).

Static binaries cannot deal with external dependencies, and many applications require external dependencies that cannot be compiled in. But even by trying to compile-in all the dependencies, you've only shifted the complexity from the filesystem to the build system, and you still have applications with incompatible features and interfaces across versions.

Re: Oasis: a small statically-linked Linux system

#18

This seems to "statically link" binaries in the sense that each program it ships with is a standalone binary. Does anyone know whether it's possible to truly statically link an entire Linux install, in the sense that the whole system is a single statically linked file including the kernel, display manager, web browser, etc so that link-time optimization can deduplicate code across the entire system?

> Does anyone know whether it's possible to truly statically link an entire Linux install

I think if you give busybox enough time, it might happen.

That's if systemd doesn't get there first, of course...

Re: Oasis: a small statically-linked Linux system

#19
post #9

Earlier quoted context omitted.

Except that the README of this project answers all your questions. A list of distinctive features and a list of project's principles make up half of the README.

I read it. It does not say "why" anywhere.

Why care about "why" when there is "why not".

Re: Oasis: a small statically-linked Linux system

#20

This seems to "statically link" binaries in the sense that each program it ships with is a standalone binary. Does anyone know whether it's possible to truly statically link an entire Linux install, in the sense that the whole system is a single statically linked file including the kernel, display manager, web browser, etc so that link-time optimization can deduplicate code across the entire system?

I am not sure what you mean.

The Linux kernel has dynamically loaded modules but you can build modules as statically part of the kernel. 'Y' instead of 'M' in the config.

It doesn't make sense to "statically link" a kernel to a program, or multiple programs together, which I read your comment to suggest. That would be a different thing than the term "statically link" refers to.

Post reply on HN