←back to thread

306 points dxs | 5 comments | | HN request time: 0s | source
Show context
enriquto ◴[] No.44070852[source]
Never understood the point of flatpak, snap and the like. Can't you just distribute static binaries? They are not that hard to compile.

(I mean, from the distributing point of view. The sandboxing and resource management is a OS-thing that should be an orthogonal issue. Users must be able to sandbox programs that they don't trust, regardless to how they are packaged and distributed.)

replies(4): >>44070906 #>>44070908 #>>44070918 #>>44071467 #
brnt ◴[] No.44070908[source]
I did not find packaging up an AppImage that is actually compatible across distro's and version all that straightforward, and we were not even using Qt or GTK/libadwaita. How is this easy, in your experience?
replies(1): >>44070933 #
enriquto ◴[] No.44070933[source]
> How is this easy, in your experience?

add -static to your link flags? Sometimes you need to fiddle a bit with the order of the libraries, but that's it.

In the ideal case, for maximum portability, i'd like to use the αpε format!

replies(1): >>44071267 #
sirwhinesalot ◴[] No.44071267[source]
Have you actually tried to make a fully statically linked GUI app on Linux?
replies(1): >>44072403 #
1. enriquto ◴[] No.44072403[source]
Just did it!

I had to add "-static" to LDFLAGS and "-lxcb -lXau -lXdmcp" to LDLIBS, for an increase in binary size from 1MB to 3MB. It's a plain X program, i guess if you use fancy toolkits it may be harder.

replies(2): >>44072892 #>>44113186 #
2. brnt ◴[] No.44072892[source]
If anything more than plain X is fancy to you...
3. sirwhinesalot ◴[] No.44113186[source]
Try getting 3D rendering now. Your statically linked libc will fail to load the GPU driver and your app won't work :)
replies(1): >>44134432 #
4. enriquto ◴[] No.44134432[source]
True. And that's why linus showing the finger to nvidia was an exhilarating relief to so many people. The gpu driver shenanigans are horrific to contour, but they are completely unnecessary on technical grounds. All the difficulties are purposefully introduced by the graphics card hardware companies. I'd say "fuck it" and do the rendering in the cpu only, which is almost always possible.
replies(1): >>44158931 #
5. sirwhinesalot ◴[] No.44158931{3}[source]
I agree, but hopefully it's clear that there's a major problem all these crazy solutions are trying to work around.