Page MenuHomePhabricator

Bump Rust version to 1.80
Changes PlannedPublic

Authored by tobias_ruck on Jul 29 2024, 18:44.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

Rust 1.78 dropped support for Windows 7, which forces us to add the Bcrypt library (see D16547), and adds the bcryptprimitives.dll and api-ms-win-core-synch-l1-2-0.dll libraries. Since these are core libraries, it's fine to add them. N.B.: BCryptGenRandom is needed by the rand crate.

In D16548, we bump the minimum required Windows version to 10 to align with this diff.

Rust 1.79 introduced a breaking change that forces package names with dashes to become underscores, which caused problems with Corrosion, see D16381.

Depends on D16547 and D16548.

Test Plan
./rustup-init -y --default-toolchain=1.80.0
source ~/.cargo/env
cmake -GNinja -DBUILD_BITCOIN_CHRONIK=on ..
ninja check-functional

Event Timeline

Tail of the build log:

   Doc-tests chronik_bridge

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_db

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_http

running 1 test
test chronik/chronik-http/src/protobuf.rs - protobuf::Protobuf (line 29) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.34s

   Doc-tests chronik_indexer

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_plugin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_plugin_common

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_plugin_impl

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_proto

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_util

running 2 tests
test chronik/chronik-util/src/log.rs - log::log (line 65) ... ignored
test chronik/chronik-util/src/log.rs - log::log_chronik (line 87) ... ignored

test result: ok. 0 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.00s

ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik-plugins failed with exit code 1

Tail of the build log:

   Doc-tests chronik_bridge

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_db

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_http

running 1 test
test chronik/chronik-http/src/protobuf.rs - protobuf::Protobuf (line 29) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.32s

   Doc-tests chronik_indexer

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_plugin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_plugin_common

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_plugin_impl

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_proto

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests chronik_util

running 2 tests
test chronik/chronik-util/src/log.rs - log::log (line 65) ... ignored
test chronik/chronik-util/src/log.rs - log::log_chronik (line 87) ... ignored

test result: ok. 0 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.00s

ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik failed with exit code 1

Tail of the build log:

Warning: .drectve `-exclude-symbols:"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h2292d98ac93d9bb4E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h85bac00b84bac232E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17he9f6c949c94cf9bdE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17hf0cc4874e4dfff5dE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17hf782068097d8fbd4E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN77_$LT$alloc..raw_vec..RawVec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h63babe876d06fd1bE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN77_$LT$alloc..raw_vec..RawVec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h82bac4614ff61d2bE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN77_$LT$alloc..raw_vec..RawVec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17haee23202559faf2bE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN77_$LT$alloc..raw_vec..RawVec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc2886c9cba7f3f77E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN77_$LT$alloc..raw_vec..RawVec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc2d412215d256fc3E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN77_$LT$alloc..raw_vec..RawVec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc9e15a34ef9c4552E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN77_$LT$alloc..raw_vec..RawVec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hf4f2d9425c6787cfE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17hfe6a828720128a56E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h58eb289668c3e4fcE" ' unrecognized
Warning: corrupt .drectve at end of def file
Warning: .drectve `-exclude-symbols:"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h3a63532126e13a99E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h7422a72a4ec1015fE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h14e71dcd707333b0E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h187b4dab56c502ccE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h1cbcaafe0586d177E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h1f97cb5a85fa0bc5E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h24cb7b85e4eb1bb9E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h5eb3bc01e046c7f1E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h60b7859598417c16E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h75c3b4b4269e4b7eE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h885318e49df752c6E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17ha0fb2c52b5d2d621E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hcaa21daca33a18d8E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hccad0e44f9dc06f2E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hea9c40d75bcea5f8E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17heb1e3cba22047d5dE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hef62c8c3c1b38ff9E" ' unrecognized
Warning: corrupt .drectve at end of def file
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h0548fb06e93b484dE" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h40e763f84d367462E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h49ef319d56ad8f09E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h54dc1099637c15f9E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17h925b1d7d05f27a72E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17hceebe13180bd7999E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17he9f96ed3e6fd5c80E" ' unrecognized
Warning: .drectve `-exclude-symbols:"_ZN5alloc4sync16Arc$LT$T$C$A$GT$9drop_slow17hf9177c5dff7acb07E" ' unrecognized
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
x86_64-w64-mingw32-ld: chronik/libchronik_lib.a(getrandom-0fce6569fe435aef.getrandom.1c0d454e1f9d418d-cgu.0.rcgu.o):getrandom.1c0d454e:(.text+0x353): undefined reference to `BCryptGenRandom'
collect2: error: ld returned 1 exit status
[526/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bantablemodel.cpp.obj
[527/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/networkstyle.cpp.obj
[528/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/notificator.cpp.obj
[529/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/modaloverlay.cpp.obj
[530/593] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/coin_selection.cpp.obj
[531/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/clientmodel.cpp.obj
[532/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoingui.cpp.obj
[533/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoin-qt-base_autogen/mocs_compilation.cpp.obj
[534/593] Building CXX object src/bench/CMakeFiles/bitcoin-bench.dir/wallet_balance.cpp.obj
[535/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/intro.cpp.obj
[536/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoin.cpp.obj
[537/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/optionsdialog.cpp.obj
[538/593] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/guiutil.cpp.obj
ninja: build stopped: subcommand failed.
Build guix-win failed with exit code 1

Tail of the build log:

-- Looking for __builtin_popcount
-- Looking for __builtin_popcount - found
-- Looking for __builtin_saddll_overflow
-- Looking for __builtin_saddll_overflow - found
-- Looking for __builtin_ssubll_overflow
-- Looking for __builtin_ssubll_overflow - found
-- Configuring done
-- Generating done
-- Build files have been written to: /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/native
[3/17] Generating ../cargo/build/x86_64-pc-windows-gnu/cxxbridge/chronik-bridge/src/ffi.rs.cc, ../cargo/build/x86_64-pc-windows-gnu/cxxbridge/chronik_lib/src/ffi.rs.cc
Generating cxx bridge files
[4/10] Building native src/secp256k1/gen_context
ninja: no work to do.
[6/10] Running security-check.py on bitcoin-cli...
[7/10] Running security-check.py on bitcoin-tx...
[8/10] Running security-check.py on bitcoin-wallet...
[9/10] Running security-check.py on bitcoind...
[10/10] Running security-check.py on bitcoin-qt...
[0/17] cd /bitcoin/chronik/chronik-lib && /gnu/store/7ialc5c3b7if7qpr1gvzg88hinngiy7k-cmake-minimal-3.24.2/bin/cmake -E env CC_x86_64_pc_windows_gnu=/home/bitcoinabc/.guix-profile/bin/x86_64-w64-mingw32-gcc CXX_x86_64_pc_windows_gnu=/home/bitcoinabc/.guix-profile/bin/x86_64-w64-mingw32-g++ AR_x86_64_pc_windows_gnu=/home/bitcoinabc/.guix-profile/bin/x86_64-w64-mingw32-ar CORROSION_BUILD_DIR=/bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/chronik CARGO_BUILD_RUSTC=/home/bitcoinabc/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/bin/rustc /home/bitcoinabc/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/bin/cargo rustc --lib --target=x86_64-pc-windows-gnu --package chronik_lib --manifest-path /bitcoin/chronik/chronik-lib/Cargo.toml --target-dir /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/./cargo/build --release --locked -- -Cdefault-linker-libraries=yes -Clink-args=--target=x86_64-w64-mingw32
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
    Finished `release` profile [optimized] target(s) in 0.11s
[1/17] Preparing native build...
-- Looking for __builtin_clz
-- Looking for __builtin_clz - found
-- Looking for __builtin_clzl
-- Looking for __builtin_clzl - found
-- Looking for __builtin_clzll
-- Looking for __builtin_clzll - found
-- Looking for __builtin_popcount
-- Looking for __builtin_popcount - found
-- Looking for __builtin_saddll_overflow
-- Looking for __builtin_saddll_overflow - found
-- Looking for __builtin_ssubll_overflow
-- Looking for __builtin_ssubll_overflow - found
-- Configuring done
-- Generating done
-- Build files have been written to: /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/native
[2/17] Running utility command for _cargo-build_chronik_lib
[3/9] Building native src/secp256k1/gen_context
ninja: no work to do.
[5/9] Running symbol-check.py on bitcoin-cli...
[6/9] Running symbol-check.py on bitcoin-tx...
[7/9] Running symbol-check.py on bitcoin-wallet...
[8/9] Running symbol-check.py on bitcoind...
FAILED: src/CMakeFiles/symbol-check-bitcoind /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src/CMakeFiles/symbol-check-bitcoind 
cd /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src && /home/bitcoinabc/.guix-profile/bin/python3.10 /bitcoin/contrib/devtools/symbol-check.py /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src/bitcoind.exe
api-ms-win-core-synch-l1-2-0.dll is not in ALLOWED_LIBRARIES!
bcryptprimitives.dll is not in ALLOWED_LIBRARIES!
/bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src/bitcoind.exe: failed DYNAMIC_LIBRARIES
[9/9] Running symbol-check.py on bitcoin-qt...
FAILED: src/qt/CMakeFiles/symbol-check-bitcoin-qt /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src/qt/CMakeFiles/symbol-check-bitcoin-qt 
cd /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src/qt && /home/bitcoinabc/.guix-profile/bin/python3.10 /bitcoin/contrib/devtools/symbol-check.py /bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src/qt/bitcoin-qt.exe
api-ms-win-core-synch-l1-2-0.dll is not in ALLOWED_LIBRARIES!
bcryptprimitives.dll is not in ALLOWED_LIBRARIES!
/bitcoin/distsrc-c31e847ba04b-x86_64-w64-mingw32/src/qt/bitcoin-qt.exe: failed DYNAMIC_LIBRARIES
ninja: build stopped: subcommand failed.
Build guix-win failed with exit code 1

remove Config dead code instead of pretending it isn't dead

rebase, add comment for bcryptprimitives.dll

Fabien added a subscriber: Fabien.
Fabien added inline comments.
contrib/devtools/symbol-check.py
154 ↗(On Diff #48912)
This revision is now accepted and ready to land.Jul 30 2024, 12:32