Gitian build should produce macOS dSYM symbol files #7770

issue laanwj openend this issue on March 30, 2016
  1. laanwj commented at 10:23 am on March 30, 2016: member

    Would be nice if the gitian build, when stripping, wrote the symbols to an external file (see https://stackoverflow.com/questions/866721/how-to-generate-gcc-debug-symbol-outside-the-build-target ).

    We get quite a lot of crashdumps, core files, for OSX, Windows and Linux. These generally contain addresses, but not symbols. A recent one is #7765.

    This is because the executables are stripped w/ make install_strip, but also because OSX/Windows doesn’t understand gdb’s symbol format even if it did include them. We don’t want to ship debug symbols with every download (it’d waste a lot of space and bitcoin.org server bandwidth - remember we’re static linking every executable, and have quite a lot of executables, and static linking gives lots of symbols, for every executable you have all the dependency symbols as well - and c++ symbols like from boost are huuuge).

    Currently we have to hack the descriptor (change install_strip to install, possible hack in -g) to make an executable with symbols to use addr2line etc. This is extra work every time (in #7582 I went through the trouble, for ex.). Would be nice to just have the symbol files available after a build. I don’t plan on uploading these files with releases. But for developers doing their own gitian build, they’d be extremely useful for troubleshooting problems reported with releases and RCs.

  2. laanwj added the label Build system on Mar 30, 2016
  3. jonasschnelli commented at 6:35 am on April 1, 2016: contributor

    Not very familiar with debug-symbols-only files,… but I guess, we could copy out the debug-symbol-information before we do the make install-strip.

    Maybe something like objcopy --only-keep-debug src/qt/bitcoin-qt src/qt/bitcoin-qt.dbg could work? OSX uses .dSYM files, there we might need to call dsymutil <binary> -o <binary>.dSYM. I try now to play with the gitian descriptor and see if we can export something useful during the build process.

  4. theuni commented at 7:22 am on April 1, 2016: member

    Agreed. IIRC OSX’s linker will automatically create a separate file automatically, with the right flags.

    I can take this one.

  5. laanwj assigned theuni on Apr 1, 2016
  6. fanquake commented at 7:04 am on June 22, 2016: member
    @laanwj Fixed by #8167 ?
  7. laanwj commented at 9:19 am on June 22, 2016: member
    Yep!
  8. laanwj closed this on Jun 22, 2016

  9. gmaxwell commented at 9:58 am on June 22, 2016: contributor
    Very cool
  10. jonasschnelli commented at 7:23 pm on June 22, 2016: contributor
    IMO only partial solved, we still need to track the missing OSX .dSYM files somewhere (I guess this was not solved by #8167)
  11. theuni commented at 3:00 am on June 23, 2016: member
    @jonasschnelli the new toolchhain produces a version of dsymutil that I hope works for us (seems to work for mozilla). Now that it’s in, I can try creating the .dSYMs and adding those to the split-debug script.
  12. laanwj reopened this on Jun 23, 2016

  13. laanwj added the label MacOSX on Nov 8, 2017
  14. MarcoFalke renamed this:
    Gitian build should produce external gdb symbol files
    Gitian build should produce macOS dSYM symbol files
    on Jul 18, 2018
  15. laanwj commented at 8:49 am on April 30, 2020: member
    Not sure how relevant this is anymore after four years. Not sure anyone is doing debugging on MacOS with external symbol files. Feel free to work on this but don’t think it’s worth keeping a tracking issue open for.
  16. laanwj closed this on Apr 30, 2020

  17. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me