Conversation

if you do a statically linked libc and have no other libaries can you make your binary basically run on any linux of current year +/- 10 years

2
0
0

my experience with linux binaries is that they usually bitrot faster than you'd like but i dont remember exactly what you do to avoid that

1
0
0

@artemis "link to really old glibc" is a big part of the meta and it does work pretty well, there are some other caveats but they're very application-specific so it's hard to give general advice

2
0
0

@artemis if you have any specific weird linux problem with ABI compat i'm more than happy to dig into it

0
0
0

@whitequark i suppose i'll discover the caveats for myself if they're relevant

1
0
0

@artemis a mistake people make is linking to libdbus or libpng or such, things you'd have in a normal ubuntu install. this bitrots much faster than kernel ABI

if you use a statically linked libc you can't use opengl which is why people link to old glibc (and then they end up not paying attention and getting libpng etc too, I think)

2
0
0

@artemis (well, technically nothing stops you from statically linking mesa but it's a massive can of worms that is probably not worth opening. and you don't get nvidia)

2
0
0

@artemis this sort of stuff is actually why i really like Flatpak! Flatpak is a Linux distro, so when you build your stuff against it you can be sure the distro will just... be there, OpenGL, NVIDIA and all.

1
0
0

@whitequark yeah makes sense. dont need opengl, do need audio though so i suppose i'd be figuring out whether i can statically link libpulse or if i would need to write my own minimal implementation of the protocol

1
0
0

@artemis you should be able to statically link ALSA, i think at this point the default ALSA device just goes to pulse in most Linux installs. this also gives you compat with non-pulse/pipewire systems for free

you also don't have to worry about the whole pulse/pipewire transition

1
0
0

@whitequark i probably should accept my fate and deal with writing alsa code yeah

1
0
0

@artemis can you not statically link openal btw?

1
0
0

@artemis actually what's your graphics? statically linking libSDL is probably the best you can get here

1
0
0

@artemis next version of ChiPass is going to ship with a statically linked Qt binary for Windows and Linux, which you'd think would be slow without GPU accel but it's just... normal

0
0
0

@whitequark @artemis i think i read about it in the context of switch homebrew. which does make sense there since dynamic linking infra tends to be both nonexistent and irrelevant for homebrew?

0
0
0

@artemis or do you plan to implement both X11 and Wayland

0
0
0