Debug depends/stl #4970

pull theuni wants to merge 12 commits into bitcoin:master from theuni:debug-depends-stl changing 16 files +128 −51
  1. theuni commented at 12:14 AM on September 24, 2014: member

    This depends on #4966 #4967 #4968 and #4969. Until those are merged or fixed in some way, it will fail tests. Thanks to ENikS for the motivation to get this done. This should generate the same test failures that msvc produces in its debug builds. It also allows for other tools to be plugged in down the road, namely clang's fsanitize options. For anyone (including pull-tester and Travis) building without using the new debug option, the depends changes are a no-op.

    This adds the concept of debug/release to the depends, which I’ve been meaning to do for quite a while. If debug is used (make DEBUG=1), the depends are compiled using their respective debug options and flags. These flags are passed down to Bitcoin as well.

    Additionally extra libstdc++ options are enabled, which will cause runtime failures for various stl bugs which would otherwise continue with undefined behavior. For these options, building Bitcoin with them is not enough, they require that dependencies are built the same way.

    Devs may also wish to use these debug depends when tracking down bugs deep within dependencies.

    This PR also fixes 2 of those stl issues. The rest have either already been fixed, or will be fixed by the PR’s listed above. At that point, the debug build should succeed and can be enabled for travis so that it may catch future issues.

  2. laanwj commented at 1:59 PM on September 25, 2014: member

    All the pulls you mentioned have been merged, needs rebase.

  3. laanwj commented at 2:02 PM on September 25, 2014: member

    BTW speaking of this, it would also be useful to be able to more easily build bitcoin + deps as "release with debug symbols", using the same CFLAGS and defines as the normal build but with debug symbols enabled. This allows addr2line for tracebacks on the gitian executables. This is currently possible but requires hacking in descriptors.

  4. depends: add the debug/release concept to depends 2027ad30e7
  5. depends: add debug/release flags for linux/osx/win
    Linux and mingw enable libstdc++ debugging for extra runtime checks. OSX
    doesn't play nice, so don't enable it there.
    f397304002
  6. depends: make sure openssl sees cppflags 7e99df78c4
  7. depends: boost: build for debug or release as requested
    Also hook up cppflags there, which was missing before.
    3b63df5fac
  8. depends: teach qt to honor debug/release
    This means it also needs to honor our flags, so patch them in as necessary.
    1d154db457
  9. depends: give miniupnpc cppflags b1efba8298
  10. depends: make LDFLAGS act like the other flags dc66ff53b4
  11. depends: add docs for debug 1f7fff2bee
  12. depends: disable reduced exports for debug builds
    Some debug options may not be compatible.
    00522cd45b
  13. tests: don't split an empty string a94496fbb6
  14. script: don't read past the end be6d87aa60
  15. travis: use debug for one build
    For the all-off build, enable the wallet and debug. This ensures that debug
    options will catch wallet problems as well.
    
    In order to make sure the no-wallet path is still tested, disable the wallet
    in the other x86_64 build.
    93e24dddf3
  16. theuni force-pushed on Sep 25, 2014
  17. BitcoinPullTester commented at 7:12 PM on September 25, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4970_93e24dddf3b7063a157b414c07e08ac7f31eaf03/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  18. theuni commented at 7:58 PM on September 25, 2014: member

    Rebased and tests pass now. @laanwj For now, you can just open hosts/linux.mk and add "-g" to the release flags. That will apply to all depends and bitcoin as well.

    Do you think it warrants another make option?

  19. Diapolo commented at 8:55 PM on September 25, 2014: none

    Great work here!

  20. laanwj commented at 7:05 AM on September 26, 2014: member

    Do you think it warrants another make option?

    Well, what I'd like to do is not really possible without changes to Gitian, I'm afraid (and certainly not before #4727 is merged). Ideally I'd like a -g argument on gitian, which would build everything w/ debug infos.

  21. laanwj commented at 7:10 AM on September 26, 2014: member

    ACK

  22. sipa commented at 6:37 PM on September 26, 2014: member

    utACK

  23. laanwj merged this on Sep 29, 2014
  24. laanwj closed this on Sep 29, 2014

  25. laanwj referenced this in commit 41150d601d on Sep 29, 2014
  26. DrahtBot locked this on Sep 8, 2021

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: 2026-04-18 15:15 UTC

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