Page MenuHomePhabricator

Call unicode API on Windows
ClosedPublic

Authored by PiRK on Jan 11 2022, 13:53.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC891d5ad3c17f: Call unicode API on Windows
Summary

Rationale from issue core#13869:

Currently Bitcoin uses the ANSI encoding on Windows so that it would affected by user's language settings, they might not able to open some non-ASCII name files.

This should unbreak the windows build, which was broken by D10801.

This is a backport of core#13888

Depends on D10816

Test Plan

@bot build-win64 gitian-win

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 11 2022, 13:53

@bot build-win64 gitian-win

Tail of the build log:

-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[427/784] Building C object src/secp256k1/CMakeFiles/secp256k1-exhaustive_tests.dir/src/tests_exhaustive.c.obj
[428/784] Linking C executable src/secp256k1/secp256k1-exhaustive_tests.exe
[429/784] Installing component secp256k1-secp256k1-exhaustive_tests
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1-secp256k1-exhaustive_tests"
-- Installing: /results/artifacts/bin/secp256k1-exhaustive_tests.exe
[430/784] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.obj
[431/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/fixture.cpp.obj
[432/784] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.obj
[433/784] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.obj
[434/784] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.obj
[435/784] Building CXX object src/CMakeFiles/server.dir/validation.cpp.obj
[436/784] Building C object src/secp256k1/CMakeFiles/secp256k1-tests.dir/src/tests.c.obj
[437/784] Linking C executable src/secp256k1/secp256k1-tests.exe
[438/784] Installing component secp256k1-secp256k1-tests
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1-secp256k1-tests"
-- Installing: /results/artifacts/bin/secp256k1-tests.exe
[439/784] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/fixture.cpp.obj
[440/784] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.obj
[441/784] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.obj
[442/784] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.obj
[443/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/util.cpp.obj
[444/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/proofcomparator_tests.cpp.obj
[445/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/delegation_tests.cpp.obj
[446/784] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.obj
[447/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.obj
[448/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/proof_tests.cpp.obj
[449/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.obj
[450/784] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/eda_tests.cpp.obj
[451/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/proofpool_tests.cpp.obj
[452/784] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/aserti32d_tests.cpp.obj
[453/784] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/daa_tests.cpp.obj
[454/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.obj
[455/784] Building CXX object src/pow/test/CMakeFiles/test-pow.dir/grasberg_tests.cpp.obj
[456/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.obj
[457/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/peermanager_tests.cpp.obj
[458/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.obj
[459/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.obj
[460/784] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.obj
[461/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.obj
[462/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.obj
[463/784] Building CXX object src/avalanche/test/CMakeFiles/test-avalanche.dir/processor_tests.cpp.obj
[464/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.obj
[465/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.obj
[466/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.obj
[467/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.obj
[468/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.obj
[469/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.obj
[470/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.obj
[471/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.obj
[472/784] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.obj
ninja: build stopped: cannot make progress due to previous errors.
Build build-win64 failed with exit code 1

Tail of the build log:

[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31725 -> phabricator/diff/31725
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31728 -> phabricator/diff/31728
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31733 -> phabricator/diff/31733
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31737 -> phabricator/diff/31737
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31743 -> phabricator/diff/31743
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31744 -> phabricator/diff/31744
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31745 -> phabricator/diff/31745
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31746 -> phabricator/diff/31746
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31747 -> phabricator/diff/31747
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31748 -> phabricator/diff/31748
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31749 -> phabricator/diff/31749
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31750 -> phabricator/diff/31750
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31751 -> phabricator/diff/31751
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31765 -> phabricator/diff/31765
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/31767 -> phabricator/diff/31767
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/8992  -> phabricator/diff/8992
[14:09:57] :	 [Step 1/1]  * [new tag]             phabricator/diff/8993  -> phabricator/diff/8993
[14:09:57] :	 [Step 1/1]  * [new branch]          master                 -> master
[14:09:57] :	 [Step 1/1] --- Building for buster amd64 ---
[14:09:57] :	 [Step 1/1] Stopping target if it is up
[14:09:57] :	 [Step 1/1] Error response from daemon: No such container: gitian-target
[14:09:57] :	 [Step 1/1] Error: No such container: gitian-target
[14:09:57] :	 [Step 1/1] Making a new image copy
[14:09:57] :	 [Step 1/1] Starting target
[14:09:57] :	 [Step 1/1] Checking if target is up.
[14:09:57] :	 [Step 1/1] Preparing build environment
[14:09:57] :	 [Step 1/1] Adding repositories to the sources list (log in var/install.log)
[14:09:57] :	 [Step 1/1] Updating apt-get repository (log in var/install.log)
[14:09:57] :	 [Step 1/1] Installing additional packages (log in var/install.log)
[14:09:57] :	 [Step 1/1] Installing additional packages from repository buster-backports (log in var/install.log)
[14:09:57] :	 [Step 1/1] Upgrading system, may take a while (log in var/install.log)
[14:09:57] :	 [Step 1/1] Creating package manifest
[14:09:57] :	 [Step 1/1] Creating build script (var/build-script)
[14:09:57] :	 [Step 1/1] Running build script (log in var/build.log)
[14:09:57] :	 [Step 1/1] ./bin/gbuild:23:in `system!': failed to run on-target setarch x86_64 bash -x < var/build-script > var/build.log 2>&1 (RuntimeError)
[14:09:57] :	 [Step 1/1] 	from ./bin/gbuild:185:in `build_one_configuration'
[14:09:57] :	 [Step 1/1] 	from ./bin/gbuild:339:in `block (2 levels) in <main>'
[14:09:57] :	 [Step 1/1] 	from ./bin/gbuild:334:in `each'
[14:09:57] :	 [Step 1/1] 	from ./bin/gbuild:334:in `block in <main>'
[14:09:57] :	 [Step 1/1] 	from ./bin/gbuild:332:in `each'
[14:09:57] :	 [Step 1/1] 	from ./bin/gbuild:332:in `<main>'
[14:09:57] :	 [Step 1/1] Build gitian-win failed with exit code 1
[14:09:57]W:	 [Step 1/1] Process exited with code 1
[14:09:58]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[14:09:58] :	 [Step 1/1] Waiting for 1 service processes to complete
[14:09:58]E:	 [Step 1/1] Ant JUnit report watcher
[14:09:58]E:		 [Ant JUnit report watcher] No reports found for paths:
[14:09:58]E:		 [Ant JUnit report watcher] /home/teamcity/buildAgent/work/jailed-build/results/artifacts/junit/*.xml
[14:09:59]E:	 [Step 1/1] Step Command Line failed
[14:09:59]E: Ant JUnit report watcher
[14:09:59]E:	 [Ant JUnit report watcher] No reports found for paths:
[14:09:59]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[14:09:59]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[14:09:59] : Publishing internal artifacts (1s)
[14:10:00] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[14:10:00] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[14:09:59]W: Publishing artifacts (2s)
[14:09:59] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml]
[14:09:59]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[14:10:02] : Build finished

MoveFileExA -> MoveFileExW

Also, arc diff --nolint to ignore a false positive. I ran arc lint before that to ensure there is no other linter issue.

This revision is now accepted and ready to land.Jan 11 2022, 16:13