Skip to content

Conversation

@codablock
Copy link

@codablock codablock commented Jun 26, 2019

First fix is to retry downloading of depends sources when a non-transient error happens. This should fix build failures like https://travis-ci.org/dashpay/dash/jobs/550612633

The second fix is to retry apt-get update and apt-get install by calling them manually with travis_retry instead of relying on the apt addon (which does not do retries). This should fix build failures like https://travis-ci.org/dashpay/dash/jobs/550205215

@codablock codablock force-pushed the pr_depends_download branch from f7e575e to 670752c Compare June 26, 2019 04:31
@codablock codablock added this to the 14.1 milestone Jun 26, 2019
This allows us to use travis_retry on these operations.
This avoids future confusion as we don't rely on curl anymore to properly
retry downloads. curls does only retry on transient errors, while Travis
might cause all kinds of errors which circumvent the retry logic of curl.
@codablock codablock force-pushed the pr_depends_download branch from 3324cfe to 41f46f5 Compare June 26, 2019 06:01
@codablock codablock changed the title Retry downloading of depends sources 3 times Fix 2 common Travis failures which happen when Travis has network issues Jun 26, 2019
@codablock
Copy link
Author

Luckily the currently running build now demonstrates the first fix: https://travis-ci.org/dashpay/dash/jobs/550641601#L647

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@UdjinM6 UdjinM6 merged commit 63424fb into dashpay:develop Jun 27, 2019
@codablock codablock deleted the pr_depends_download branch July 2, 2019 04:41
codablock added a commit to codablock/dash that referenced this pull request Jul 2, 2019
…ues (dashpay#3003)

* Retry downloading of depends sources 3 times

* Manually invoke apt-get update and install instead of using addon

This allows us to use travis_retry on these operations.

* Add exception for depends/Makefile in .gitignore

* Remove --retry from curl call

This avoids future confusion as we don't rely on curl anymore to properly
retry downloads. curls does only retry on transient errors, while Travis
might cause all kinds of errors which circumvent the retry logic of curl.
PastaPastaPasta added a commit that referenced this pull request Jul 19, 2024
bbc9957 fix: sidestep c++17 std::unary_function removal by compiling boost with c++11 (Kittywhiskers Van Gogh)
3c622a3 revert: partial dash#5610 (make depends compilable with Xcode 15 on macos) (Kittywhiskers Van Gogh)
f15e1db fix: make `std::unary_function` suppression flag no longer contingent on `--enable-suppress-external-warnings` (Kittywhiskers Van Gogh)
5db84e2 revert: partial dash#3003 (Fix 2 common Travis failures which happen when Travis has network issues) (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  Despite builders for BSD-based platforms being backported as early as [dash#5362](#5362), they didn't work on account of using a `curl` flag, `--retry`, that was lopped off other builders in [dash#3003](#3003) as a way to mitigate aberrant Travis CI-specific behaviour.

  As the variable `$(DOWNLOAD_RETRIES)` was removed as part of that mitigation, the introduction of builders that rely on this variable caused failures as the flag was accompanied by nothing. As our CI host isn't based on FreeBSD, this went unnoticed. When deciding between extending the existing patch and reverting it, reverting it proved to be more attractive on account of us no longer using Travis CI and the revert bringing us closer to upstream.

  Additionally, the `std::unary_function` patch that was introduced in [dash#5610](#5610) proves to be necessary on BSD-based platforms as well (had to be extended for and tested on GhostBSD, based on FreeBSD 13.2-STABLE, Clang 16). Instead of conditionally patching based on platform and compiler, a more reliable patch would be to downgrade the C++ version used to build Boost at the last version to have `std::unary_function`, which would be C++11, albeit deprecated ([source](https://en.cppreference.com/w/cpp/utility/functional/unary_function)).

  Though it's likely this route wasn't taken originally due to compiler errors that happened despite downgrading to C++11. These errors were due to the compiler objecting to `std::unary_function` usage in Boost headers, despite the backport of [bitcoin#25436](bitcoin#25436), which should've solved this problem. The reason the errors were still persisting is because the necessary flag, `-DBOOST_NO_CXX98_FUNCTION_BASE`, was only applied if `--enable-suppress-external-warnings` was set. CI didn't catch this, as the flag is always set, to keep log lengths manageable. This has been rectified.

  All changes combined, one should be able to build non-Qt Dash binaries using `depends` though building the Qt client from `depends`  unfortunately remains a problem, even upstream ([source](bitcoin#23955 (comment)), [source](bitcoin#23948 (comment))).

  ## Demo

  **Based on bbc9957**

  Built using:
  * **`depends` flags:** `NO_QT=1 ALLOW_HOST_PACKAGES=1 HOST=x86_64-unknown-freebsd13.2`
  * **`configure` flags :** `--prefix=$(pwd)/depends/x86_64-unknown-freebsd13.2 --enable-debug --enable-suppress-external-warnings --with-gui`
  * Qt installed using `pkg` (`qt5`)

  ![Dash-Qt running on GhostBSD](https://github.com/dashpay/dash/assets/63189531/608ff7e6-0e53-41a6-92dd-e31ab2c76e2e)

  ## Checklist:

  - [x] I have performed a self-review of my own code **(note: N/A)**
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    light ACK bbc9957
  PastaPastaPasta:
    utACK bbc9957
  knst:
    ACK bbc9957

Tree-SHA512: b29d6775f42965d2f09307aff0192012aa192e39e06a83b800613831dc00fc7173201d496117fbe86850f5208a0b7688a376f2ee618881c062c28d694085efc9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants