Page MenuHomePhabricator

fs: work around u8path deprecated-declaration warnings with libc++
ClosedPublic

Authored by PiRK on Mon, Oct 27, 08:51.

Details

Summary

When building in c++20 mode using libc++, the following warning is
emitted:

bash
./fs.h:72:29: warning: 'u8path<std::string>' is deprecated [-Wdeprecated-declarations]
    return std::filesystem::u8path(utf8_str);
                            ^
/usr/lib/llvm-14/bin/../include/c++/v1/__filesystem/u8path.h:72:27: note: 'u8path<std::string>' has been explicitly marked deprecated here
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
                          ^
/usr/lib/llvm-14/bin/../include/c++/v1/__config:1042:43: note: expanded from macro '_LIBCPP_DEPRECATED_WITH_CHAR8_T'
                                          ^
/usr/lib/llvm-14/bin/../include/c++/v1/__config:1007:48: note: expanded from macro '_LIBCPP_DEPRECATED'
                                               ^
1 warning generated.

as u8path<std::string> is deprecated starting with c++20.

Co-authored-by: MacroFake <falke.marco@gmail.com>
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

This is a backport of core#25808

Test Plan

With and without bumping CMAKE_CXX_STANDARD to 20:

ninja all check-all
Check that this particular deprecation warning is no longer printed

Event Timeline

PiRK requested review of this revision.Mon, Oct 27, 08:51

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56300'
Triggered 2025-10-27 08:51:23 by 'Phabricator Staging (phabricator-staging)'
Started 2025-10-27 08:51:30 on agent 'N/A'
Finished 2025-10-27 08:51:30 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): '16dc71bd9b9e73d34b0e981eb9525b22a9852c2e' (branch: 'refs/tags/phabricator/diff/56300', checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1005350 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[08:51:23]W: bt15 (6s)
[08:51:23]i: TeamCity server version is 2025.03.1 (build 186125)
[08:51:23] : Finalize build settings
[08:51:23] : Collecting changes in 2 VCS roots
[08:51:23] :	 [Collecting changes in 2 VCS roots] VCS Root details
[08:51:23] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[08:51:23] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[08:51:23]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (2s)
[08:51:23]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper2969763360111237883.sh ls-remote origin
[08:51:23]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (2s)
[08:51:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper97285361327121643.sh ls-remote origin
[08:51:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[08:51:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[08:51:23]i: Detecting changes in VCS root 'abc-infrastructure' (used in 'Bitcoin-ABC Infra Checkout', 'Extract Electrum ABC from ABC' and 5 other configurations)
[08:51:23]i: Will collect changes for 'abc-infrastructure' starting from revision 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[08:51:23]i: Waiting for completion of current operations for the VCS root 'Bitcoin ABC Staging'
[08:51:25]i: Detecting changes in VCS root 'Bitcoin ABC Staging' (used in 'Diff Testing', 'Staging Checkout Dummy')
[08:51:25]i: Will collect changes for 'Bitcoin ABC Staging' starting from revision e19300ef289d49aec039981ea159af4b0cc63dec
[08:51:25] : Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout
[08:51:25] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Upper limit revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[08:51:25]i:	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] MaxModId = 83296
[08:51:25] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Computed revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[08:51:25] : Compute revision for 'Bitcoin ABC Staging'
[08:51:25] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: 16dc71bd9b9e73d34b0e981eb9525b22a9852c2e
[08:51:25]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86386
[08:51:25] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: 16dc71bd9b9e73d34b0e981eb9525b22a9852c2e
[08:51:30]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56301'
Triggered 2025-10-27 09:03:35 by 'Phabricator Staging (phabricator-staging)'
Started 2025-10-27 09:03:46 on agent 'N/A'
Finished 2025-10-27 09:03:46 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): '74cab4476d677f1cc887c0c6f3ee784756f3c11c' (branch: 'refs/tags/phabricator/diff/56301', checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1005370 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[09:03:35]W: bt15 (11s)
[09:03:35]i: TeamCity server version is 2025.03.1 (build 186125)
[09:03:35] : Finalize build settings
[09:03:35] : Collecting changes in 2 VCS roots
[09:03:35] :	 [Collecting changes in 2 VCS roots] VCS Root details
[09:03:35] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[09:03:35] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[09:03:35]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (6s)
[09:03:35]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper17990062000386892745.sh ls-remote origin
[09:03:35]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (6s)
[09:03:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper8964865899738007239.sh ls-remote origin
[09:03:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:03:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[09:03:36]i: Detecting changes in VCS root 'abc-infrastructure' (used in 'Bitcoin-ABC Infra Checkout', 'Extract Electrum ABC from ABC' and 5 other configurations)
[09:03:36]i: Will collect changes for 'abc-infrastructure' starting from revision 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:03:36]i: Waiting for completion of current operations for the VCS root 'Bitcoin ABC Staging'
[09:03:42]i: Detecting changes in VCS root 'Bitcoin ABC Staging' (used in 'Diff Testing', 'Staging Checkout Dummy')
[09:03:42]i: Will collect changes for 'Bitcoin ABC Staging' starting from revision e19300ef289d49aec039981ea159af4b0cc63dec
[09:03:42] : Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout
[09:03:42] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Upper limit revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:03:42]i:	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] MaxModId = 83296
[09:03:42] : Compute revision for 'Bitcoin ABC Staging'
[09:03:42] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: 74cab4476d677f1cc887c0c6f3ee784756f3c11c
[09:03:42]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86387
[09:03:42] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Computed revision: 602c7e2af027bb16cc6a4fc5a25601e8c853be5e
[09:03:42] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: 74cab4476d677f1cc887c0c6f3ee784756f3c11c
[09:03:46]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

Tail of the build log:

wallet_txn_doublespend.py --mineblock            | ✓ Passed  | 2 s
wallet_watchonly.py                              | ✓ Passed  | 1 s
wallet_watchonly.py --usecli                     | ✓ Passed  | 1 s
chronik_avalanche.py                             | ○ Skipped | 0 s
chronik_block.py                                 | ○ Skipped | 0 s
chronik_block_header.py                          | ○ Skipped | 0 s
chronik_block_info.py                            | ○ Skipped | 0 s
chronik_block_txs.py                             | ○ Skipped | 0 s
chronik_blockchain_info.py                       | ○ Skipped | 0 s
chronik_blocks.py                                | ○ Skipped | 0 s
chronik_chronik_info.py                          | ○ Skipped | 0 s
chronik_cors.py                                  | ○ Skipped | 0 s
chronik_disable_token_index.py                   | ○ Skipped | 0 s
chronik_disallow_prune.py                        | ○ Skipped | 0 s
chronik_electrum_basic.py                        | ○ Skipped | 0 s
chronik_electrum_blockchain.py                   | ○ Skipped | 0 s
chronik_lokad_id_group.py                        | ○ Skipped | 0 s
chronik_mempool_conflicts.py                     | ○ Skipped | 0 s
chronik_mempool_disconnectpool.py                | ○ Skipped | 0 s
chronik_pause.py                                 | ○ Skipped | 0 s
chronik_plugin_groups.py                         | ○ Skipped | 0 s
chronik_plugins.py                               | ○ Skipped | 0 s
chronik_plugins_setup.py                         | ○ Skipped | 0 s
chronik_raw_tx.py                                | ○ Skipped | 0 s
chronik_resync.py                                | ○ Skipped | 0 s
chronik_script_confirmed_txs.py                  | ○ Skipped | 0 s
chronik_script_history.py                        | ○ Skipped | 0 s
chronik_script_unconfirmed_txs.py                | ○ Skipped | 0 s
chronik_script_utxos.py                          | ○ Skipped | 0 s
chronik_scripthash.py                            | ○ Skipped | 0 s
chronik_serve.py                                 | ○ Skipped | 0 s
chronik_shutdown.py                              | ○ Skipped | 0 s
chronik_spent_by.py                              | ○ Skipped | 0 s
chronik_token_alp.py                             | ○ Skipped | 0 s
chronik_token_broadcast_txs.py                   | ○ Skipped | 0 s
chronik_token_burn.py                            | ○ Skipped | 0 s
chronik_token_id_group.py                        | ○ Skipped | 0 s
chronik_token_parse_failure.py                   | ○ Skipped | 0 s
chronik_token_script_group.py                    | ○ Skipped | 0 s
chronik_token_slp_fungible.py                    | ○ Skipped | 0 s
chronik_token_slp_mint_vault.py                  | ○ Skipped | 0 s
chronik_token_slp_nft1.py                        | ○ Skipped | 0 s
chronik_tx.py                                    | ○ Skipped | 0 s
chronik_tx_removal_order.py                      | ○ Skipped | 0 s
chronik_ws.py                                    | ○ Skipped | 0 s
chronik_ws_avalanche.py                          | ○ Skipped | 0 s
chronik_ws_ordering.py                           | ○ Skipped | 0 s
chronik_ws_ping.py                               | ○ Skipped | 0 s
chronik_ws_script.py                             | ○ Skipped | 0 s
feature_bind_port_discover.py                    | ○ Skipped | 0 s
feature_bind_port_externalip.py                  | ○ Skipped | 0 s
interface_usdt_net.py                            | ○ Skipped | 0 s
interface_usdt_utxocache.py                      | ○ Skipped | 0 s
interface_usdt_validation.py                     | ○ Skipped | 0 s

ALL                                              | ✓ Passed  | 1406 s (accumulated) 
Runtime: 118 s

ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
This revision is now accepted and ready to land.Mon, Oct 27, 13:28