News for hackers. Stuff that matters.
Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by wtetzner on Thursday October 25, 2018 @10:24AM (#18301117)
> It's still a PITA to deploy a compiled app on Linux with unclear glibc versions and amazingly it's worse than MS DLL hell of MSVC redistributable shambles.

One option is to statically link against musl libc [1].

The kernel ABI is about the only stable thing you can rely on (which is something you _can't_ rely on for macOS or Windows).

[1] https://www.musl-libc.org/

Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by AnIdiotOnTheNet on Thursday October 25, 2018 @03:17PM (#18303714)
> The kernel ABI is about the only stable thing you can rely on (which is something you _can't_ rely on for macOS or Windows).

In Windows's case, technically accurate but not really relevant, since the interface for working with the base DLLs like kernel32, user32, etc. hasn't changed.

Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by wtetzner on Thursday October 25, 2018 @08:14PM (#18305775)
Sorry I wasn't clearer. I just meant that on Windows and macOS, you can rely on certain userland libraries, but not the kernel ABI, while on Linux you can rely on the kernel ABI, but not the libraries.
Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by Procedural on Saturday October 27, 2018 @04:01AM (#18314792)
Note a program compiled with musl can't use shared libraries which were compiled with glibc. I wrote my own tiny x64 C standard library which, unlike musl, is compatible with other glibc libraries: https://github.com/procedural/c_stdlib
Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by scns on Thursday October 25, 2018 @02:35PM (#18303352)
Is it not possible to link glibc staticalliy? IIRC musl has readability and code size in mind while glibc optimizes for performance at the cost of readability and codesize.
Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by nineteen999 on Thursday October 25, 2018 @05:20PM (#18304679)
The problem that I know of is that glibc supports loading DSO modules, eg. for NSS, so it's not going to support pluggable NSS sources like LDAP etc when statically linked. There are workarounds, however:

https://stackoverflow.com/questions/3430400/linux-static-lin...

Can't imagine many Linux gamers are going to need NSS support in their game binaries. It's a bit of a stretch to say glibc doesn't support static linking, perhaps "officially" it doesn't, its just not all the extended features are going to work.

Static linking is generally going to be frowned upon these days however since you're effectively linking security issues into the binary forever.

Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by rurban on Friday October 26, 2018 @10:57AM (#18309783)
Not really. musl optimizes for performance and codesize, whilst glibc optimizes for the random user who needs to read error message in farsi and logs on via an external LDAP service, and needs LD and MALLOC hooks to debug weird edge cases.

glibc unicode tables are huge, musl are tiny.

glibc uses assembler optimizations for everything, whilst musl uses compiler auto-vectorization, which mostly beats handwritten assembly, esp. with constant arguments.

Re:Ditching Windows: 2 Weeks with Ubuntu Linux on the Dell X... by dazzawazza on Thursday October 25, 2018 @10:50AM (#18301303)
Thank you. musl looks very interesting. It's something I didn't consider, I'll add it to my research list :)