Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

musl: provide debug info, separately, don't disable unwind tables #37710

Merged
merged 1 commit into from Mar 23, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Mar 23, 2018

Also by setting --enable-debug, asm is preprocessed with CFI directives.

Keep unwind tables does not increase size by much,
and helps debuggers and similar make sense of things.

Help tools (gdb/lldb/perf/etc.) walk through musl frames,
even without full debug info present.

Only minor increase in size and out-of-the-box experience
in scenarios like the folowing work better.

(Also makes debug info avail as separate output / dwarffs)

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Also by setting --enable-debug, asm is preprocessed with CFI directives.

Keep unwind tables does not increase size by much,
and helps debuggers and similar make sense of things.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: musl

Partial log (click to expand)

wrong ELF type
wrong ELF type
wrong ELF type
shrinking RPATHs of ELF executables and libraries in /nix/store/9vzqa5r0zlbnjhwlmkqc7ddg9mggpma6-musl-1.1.19-dev
patching script interpreter paths in /nix/store/9vzqa5r0zlbnjhwlmkqc7ddg9mggpma6-musl-1.1.19-dev
checking for references to /tmp/nix-build-musl-1.1.19.drv-0 in /nix/store/9vzqa5r0zlbnjhwlmkqc7ddg9mggpma6-musl-1.1.19-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/6xbwzrsv47f83agsi31wc2x8hyv24c1s-musl-1.1.19-debug
patching script interpreter paths in /nix/store/6xbwzrsv47f83agsi31wc2x8hyv24c1s-musl-1.1.19-debug
checking for references to /tmp/nix-build-musl-1.1.19.drv-0 in /nix/store/6xbwzrsv47f83agsi31wc2x8hyv24c1s-musl-1.1.19-debug...
/nix/store/srqs27wjlpsrsc1k3r9xqbfljh6v8x56-musl-1.1.19

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: musl

Partial log (click to expand)

Cannot nix-instantiate `musl' because:
�[31;1merror:�[0m while evaluating 'callPackageWith' at �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix�[0m:113:35, called from �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/all-packages.nix�[0m:13663:10:
while evaluating 'makeOverridable' at �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix�[0m:72:24, called from �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix�[0m:117:8:
while evaluating anonymous function at �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/musl/default.nix�[0m:1:1, called from �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix�[0m:74:12:
while evaluating 'mkDerivation' at �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/stdenv/generic/make-derivation.nix�[0m:15:5, called from �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/os-specific/linux/musl/default.nix�[0m:21:1:
while evaluating 'extendDerivation' at �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix�[0m:135:43, called from �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/stdenv/generic/make-derivation.nix�[0m:248:7:
while evaluating 'optionalAttrs' at �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/attrsets.nix�[0m:321:25, called from �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/stdenv/generic/make-derivation.nix�[0m:196:14:
assertion failed at �[1m/private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/stdenv/generic/make-derivation.nix�[0m:120:36

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: musl

Partial log (click to expand)

wrong ELF type
wrong ELF type
wrong ELF type
shrinking RPATHs of ELF executables and libraries in /nix/store/1ja50nnh5cihcqwjyl6qapbrmr7srzp8-musl-1.1.19-dev
patching script interpreter paths in /nix/store/1ja50nnh5cihcqwjyl6qapbrmr7srzp8-musl-1.1.19-dev
checking for references to /build in /nix/store/1ja50nnh5cihcqwjyl6qapbrmr7srzp8-musl-1.1.19-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/1330x4phsnsg3nmm0gvwn2gh49hgfjav-musl-1.1.19-debug
patching script interpreter paths in /nix/store/1330x4phsnsg3nmm0gvwn2gh49hgfjav-musl-1.1.19-debug
checking for references to /build in /nix/store/1330x4phsnsg3nmm0gvwn2gh49hgfjav-musl-1.1.19-debug...
/nix/store/6b4gm7g7705jdg1cjbv67c63c34r8rbj-musl-1.1.19

@dtzWill dtzWill merged commit 0183369 into NixOS:master Mar 23, 2018
@dtzWill dtzWill deleted the feature/musl-unwind branch March 23, 2018 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants