**Expected behavior**
`make check` completes successfully when run on a freshly cloned [Bitcoin Core repo](https://github.com/bitcoin/bitcoin).

**Actual behavior**
`make check` fails with the following errors --

```
test/net_tests.cpp:446: error: in "net_tests/cnetaddr_tostring_canonical_ipv6": check net_addr.ToString() == expected_canonical_representation_output has failed [2001:db8::1:1:1:1:1 != 2001:db8:0:1:1:1:1:1]
test/net_tests.cpp:446: error: in "net_tests/cnetaddr_tostring_canonical_ipv6": check net_addr.ToString() == expected_canonical_representation_output has failed [2001:db8::1:1:1:1:1 != 2001:db8:0:1:1:1:1:1]
test/net_tests.cpp:446: error: in "net_tests/cnetaddr_tostring_canonical_ipv6": check net_addr.ToString() == expected_canonical_representation_output has failed [2001:db8::1:1:1:1:1 != 2001:db8:0:1:1:1:1:1]
test/net_tests.cpp:446: error: in "net_tests/cnetaddr_tostring_canonical_ipv6": check net_addr.ToString() == expected_canonical_representation_output has failed [2001:db8:aaaa:bbbb:cccc:dddd::1 != 2001:db8:aaaa:bbbb:cccc:dddd:0:1]
test/net_tests.cpp:446: error: in "net_tests/cnetaddr_tostring_canonical_ipv6": check net_addr.ToString() == expected_canonical_representation_output has failed [2001:db8:aaaa:bbbb:cccc:dddd::1 != 2001:db8:aaaa:bbbb:cccc:dddd:0:1]
...
...

Leaving test module "Bitcoin Core Test Suite"; testing time: 75790us

*** 5 failures are detected in the test module "Bitcoin Core Test Suite"
make[3]: *** [test/net_tests.cpp.test] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1
```

**To reproduce**
1. Follow the build steps available here -- [build-osx.md](https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md) -- on a macOS 10.14.  Install all required dependencies and the first set of optional dependencies.  Use `Wallet (only SQlite) and GUI Support` configuration.
2. Proceed until the "2. Compile" step under the "Building Bitcoin Core" section, at which point running `make check` will result in the error above.

**System information**

Not running Core yet; this is a build time issue when running `make check` on the bitcoin repo cloned from https://github.com/bitcoin/bitcoin/ master branch at commit c8571486364d6e9ca8c86bd1c81e230ca64f8904.

```
$ ./src/bitcoind -version
Bitcoin Core version v21.99.0-1ef34ee25ed3
```

System Version:	macOS 10.14.6 (18G8022)
Processor Name:	Intel Core i5
  Processor Speed:	1.6 GHz
  Number of Processors:	1
  Total Number of Cores:	2
  L2 Cache (per Core):	256 KB
  L3 Cache:	4 MB
  Memory:	8 GB
File System:	APFS
Physical Drive:
  Device Name:	APPLE SSD AP0128N
  Media Name:	AppleAPFSMedia
  Medium Type:	SSD
  Protocol:	PCI-Express
{
    static const char* suffix{".onion"};
    static constexpr size_t suffix_len{6};
    if (addr.size() <= suffix_len || addr.substr(addr.size() - suffix_len) != suffix) {
        return false;
    }
    bool invalid;
    const auto& input = DecodeBase32(addr.substr(0, addr.size() - suffix_len).c_str(), &invalid);
    if (invalid) {
        return false;
    }
    switch (input.size()) {
    case ADDR_TORV2_SIZE:
        m_net = NET_ONION;
        m_addr.assign(input.begin(), input.end());
        return true;
    case torv3::TOTAL_LEN: {
        Span<const uint8_t> input_pubkey{input.data(), ADDR_TORV3_SIZE};
        Span<const uint8_t> input_checksum{input.data() + ADDR_TORV3_SIZE, torv3::CHECKSUM_LEN};
        Span<const uint8_t> input_version{input.data() + ADDR_TORV3_SIZE + torv3::CHECKSUM_LEN, sizeof(torv3::VERSION)};
        if (input_version != torv3::VERSION) {
            return false;
        }
        uint8_t calculated_checksum[torv3::CHECKSUM_LEN];
        torv3::Checksum(input_pubkey, calculated_checksum);
        if (input_checksum != calculated_checksum) {
            return false;