3 ms·
Does Nix really not have debug symbols available for most packages? That's astonishing....
by richardwhiuk 5y ago
Does Nix really not have debug symbols available for most packages? That's astonishing....
- outworlder 5y agoNix is the package manager. NixOS is the OS. It's very common to strip debug symbols from packages. For Ubuntu, it's even a different repository! I fail to see why that's astonishing.
- whateveracct 5y agoPeople can be astonished by anything if they didn't ask the right questions before spouting answers :)
- comex 5y agoSplitting debug symbols into separate packages is expected. Splitting them into a separate repository is a bit surprising but no big deal. The problem with NixOS is that it doesn’t ship debug symbols at all. Nix does at least make it easy to rebuild a package with debug symbols enabled, but: - Some packages take a very long time to rebuild. - IIUC, the standard builds are done without debug info enabled at all, rather than building with it enabled and then deleting it. Usually, whether debug info is enabled shouldn’t affect any other aspects of code generation, so rebuilding with debug info should produce a symbol-rich binary that’s compatible with existing core dumps for the original binary. But this is not always the case. - If the package you want debug info for is a library, Nix will want to rebuild not just the library itself but everything that (transitively) depends on it. This is really a more general problem with Nix: it has zero notion of ABI compatibility. But always building with debug info would work around the problem.
- kingforaday 5y agoI think standard practice is to strip the binary before release.
- er4hn 5y agoOne feature of Nix is to be able to rebuild something the same way on different systems. The article suggests that adding the debug symbols is a simple flag in the build expression. Based on that, you shouldn't need the debug symbols in advance, though ymmv, when trying to debug an issue in container A on dev machine B.