root: separateDebugInfo = true#216864
Conversation
046dac4 to
81c3724
Compare
|
Makes sense, but how much closure space do we have to pay for this? |
|
The package size and the closure size grow smaller, which is somewhat strange. Update: Just compared the outputs with Meld, and the files are all there, plus two new files:
|
|
Result of 1 package failed to build:
5 packages built:
|
|
I'm afraid that the debug information has got stripped away. I saw the strip running during the Should we use |
81c3724 to
3f12c05
Compare
|
The |
3f12c05 to
5ed5749
Compare
At least I don't know how to make it work. |
|
The debug information occupies ~500MB when separated, but we get ~1.5GB size increasing when not splitted. The size of the ROOT derivation without the debug information is ~500MB. The size increasing directly reflects on the closure size. It simply doubles (from 1.6GB to 3.1GB) after |
|
The 2-4x increase would be hard to justify. Are you dealing with a large rebuild when setting up for a debug? |
|
Just didn't know it's that large. I had thought it would be trivial 😓 I'll ask in the ROOT forum if there's a way to use the separated debug information, as it would hopefully not increase the closure size of BTW, considering the huge size difference, is there something other than debug symbols that is normally stripped away? Update: Here's the post in the ROOT Forum: https://root-forum.cern.ch/t/any-way-to-have-roots-builtin-stack-trace-use-seperated-debug-information/53702 |
|
If you provide path to separated debug info to the ROOT, that would be a reference, so the closure size won't improve. |
|
The closure size of the The reference could be made available either through a wrapper package, say, A ROOT developer answered in the above forum post that ROOT uses Closure size comparison``` nixpkgs_timeshift (94a5042) [$] ❯ nix path-info -s .?ref=origin/master#root /nix/store/yscknw8l89m6xv46j4ff0mr7786fv22m-root-6.26.10 445477272nixpkgs_timeshift on root-debug-info [$] nixpkgs_timeshift on root-debug-info [$] nixpkgs_timeshift on root-debug-info [$] |
|
Ah! Here it is: |
|
@veprbl Do you think it's worth it to split the executable wrapping like what I did in the second commit? |
|
@ofborg build root.unwrapped.debug |
|
@ofborg build root-unwrapped.debug |
|
Building against wrapped root by default defeats the purpose of splitting the debug output. Did you mean to provide an optional wrapper? |
84a43a6 to
5ed5749
Compare
|
@veprbl Yes. It would be something like BTW, I just observed that |
|
@ofborg build root.debug |
Yes, it won't be possible to have that wrapper on macOS, see #203380.
I don't even see a need for the wrapper. You could add a hook in nix-support into |
5ed5749 to
9060d2d
Compare
|
Alright, I'll just keep it simple and enable the debug build only on Linux.
How do I add hooks to a specific output? BTW, loading the debug information causes the stack trace to take ~25s to show on my laptop (when testing with |
|
See https://nixos.wiki/wiki/Debug_Symbols for a write up about how to use separate debug info, and https://github.com/edolstra/dwarffs and https://github.com/symphorien/nixseparatedebuginfod for third party projects that make this easier to deal with. One of the main appeal of separate debug info is that you only download them when you use them, and in the case of root they are sizeable. |
You'd probably need to hack |
9060d2d to
5e9db21
Compare
5e9db21 to
c89c22a
Compare
|
thank you! |
Description of changes
Build CERN ROOT with
separateDebugInfo = truefor easier debugging.As a data analysis framework, users spend most of the time debugging their C++ analysis code, and errors like Segmentation Violation occur in various situations ranging from going out of bound to file missing due to network error. A call-stack error message with line numbers provides real help.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)