Patch around multiple definition issues in Qt, and enable -ltcg
when using LTO=1
.
Split from #25391.
-ltcg
for windows under LTO
#28532
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | hebasto |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Testing 7b96d536ffdb3addc8e794dab007c0327e734628. It looks good so far:
0$ make -C depends qt_configured HOST=x86_64-w64-mingw32 LTO=1
1...
2Configure summary:
3
4Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
5Building for: win32-g++ (x86_64, CPU features: mmx sse sse2)
6Target compiler: gcc 10.0.0
7Configuration: cross_compile sse2 aesni sse3 ssse3 sse4_1 sse4_2 largefile ltcg precompile_header rdrnd rdseed shani silent x86SimdAlways release c++11 c++14 c++17 c++1z static stl
8Build options:
9 Mode ................................... release
10 Optimize release build for size ........ no
11 Building shared libraries .............. no
12 Using C standard ....................... C11
13 Using C++ standard ..................... C++17
14 Relocatable ............................ no
15 Using precompiled headers .............. yes
16 Using LTCG ............................. yes
17...
Without the windows_lto.patch
I cannot reproduce “multiple definitions” errors.
Using:
0x86_64-w64-mingw32-g++-posix (GCC) 10-posix 20220113
Are steps to reproduce it available?
Actually, just building master with LTO=1
will result in the failure. i.e
0make -C depends HOST=x86_64-w64-mingw32 LTO=1 -j9
1./autogen.sh
2CONFIG_SITE=/home/ubuntu/ci_scratch/depends/x86_64-w64-mingw32/share/config.site ./configure
3....
4 with gui / qt = no
5<snip>
6 LTO = yes
with the following in config.log:
0/usr/bin/x86_64-w64-mingw32-ld: simplewidgets.o (symbol from plugin):(.gnu.linkonce.t._ZN19QAccessibleLineEditD1Ev[_ZThn40_N19QAccessibleLineEditD1Ev]+0x0): multiple definition of `QAccessibleLineEdit::~QAccessibleLineEdit()'; rangecontrols.o (symbol from plugin):(.gnu.linkonce.t._ZN19QAccessibleLineEditD1Ev[_ZThn16_N19QAccessibleLineEditD1Ev]+0x0): first defined here
What steps did you use to try and build?
Actually, just building master with
LTO=1
will result in the failure. i.e0make -C depends HOST=x86_64-w64-mingw32 LTO=1 -j9 1./autogen.sh 2CONFIG_SITE=/home/ubuntu/ci_scratch/depends/x86_64-w64-mingw32/share/config.site ./configure 3.... 4 with gui / qt = no 5<snip> 6 LTO = yes
Right. That escaped my attention.
I’ve tested 3f153fa5c1377a1a54d85ed1c6e76eb227ca21bb and reviewed the suggested patch.
nit: Suggesting to add a link to the upstream issue to the patch.
Building of bitcoin-qt.exe
binary ends with a massive number of -Wfree-nonheap-object
and -Wodr
warnings. Are we OK with them?
warnings. Are we OK with them?
Well it depends, what are they? Which code do they come from (I assume qt?)? Are they correct? Which compiler do they occur with? Does the binary still work? LTO is still opt-in in any case, so I don’t think some warnings are currently a blocker here (unless you’re planning on patching qt).
warnings. Are we OK with them?
Well it depends, what are they? Which code do they come from (I assume qt?)?
Correct.
Which compiler do they occur with?
x86_64-w64-mingw32-g++ (GCC) 10-posix 20220113
Does the binary still work?
Yes.
Actually, building bitcoin-qt for Linux under LTO also produces similar warnings, so can you confirm that what you’re seeing is directly related to the patch being applied here?
I don’t think they a related.
Patch around multiple definition issues in Qt.
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
Guix build (aarch64):
001cbbeddf52eebbcd390aa169146cfc64ef85a38872baa86abf46327dfcbeb9f guix-build-f0cebbdb2a1a/output/aarch64-linux-gnu/SHA256SUMS.part
194fae6a5e94adc27dc2d7e3a8902f9e7d216a6acd0995ce5bf0cb5b3f3c2876b guix-build-f0cebbdb2a1a/output/aarch64-linux-gnu/bitcoin-f0cebbdb2a1a-aarch64-linux-gnu-debug.tar.gz
2ec377f0d436752f44b71ef257641135e479ffca32cc7bd3fa06c9799d2d0ec87 guix-build-f0cebbdb2a1a/output/aarch64-linux-gnu/bitcoin-f0cebbdb2a1a-aarch64-linux-gnu.tar.gz
34eb26bedc2ca129dbb063217cddda6dee4bcfc0b2ee0c1115d1ae4daf15f85f5 guix-build-f0cebbdb2a1a/output/arm-linux-gnueabihf/SHA256SUMS.part
4fc99f934f5f3d289339c6d901eb552a30bd05853cb7b6c0ee80a57a0d75ded2e guix-build-f0cebbdb2a1a/output/arm-linux-gnueabihf/bitcoin-f0cebbdb2a1a-arm-linux-gnueabihf-debug.tar.gz
518b373fa039e135b4380174f12781374ec9d9a6abd6663233fedcd200664f929 guix-build-f0cebbdb2a1a/output/arm-linux-gnueabihf/bitcoin-f0cebbdb2a1a-arm-linux-gnueabihf.tar.gz
68ca14c4bc4133b96c70e37b383ee739e9b7849c08654e537d2aafaa30b041192 guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/SHA256SUMS.part
7d027cffbd02d5f46138ea55273e38c8940b4c2d046c74a9e5fda53387865d5cc guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/bitcoin-f0cebbdb2a1a-arm64-apple-darwin-unsigned.tar.gz
8f92487934b55999f4118cf48a779f545f9a6e3d483cf919deea7210476dbf44b guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/bitcoin-f0cebbdb2a1a-arm64-apple-darwin-unsigned.zip
9e8828cf3212a8a3672395829f2d05261c95a4afe31fddef8ffa9faafd6b13508 guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/bitcoin-f0cebbdb2a1a-arm64-apple-darwin.tar.gz
10cc16f5d83105302c8cf462a625fad7a8c1edcdcb6229188e97ecc1ade6644adc guix-build-f0cebbdb2a1a/output/dist-archive/bitcoin-f0cebbdb2a1a.tar.gz
110b253f5fc819abf7a55a3565587b83e20f846f6b2eb9da20d4b3af4a46028193 guix-build-f0cebbdb2a1a/output/powerpc64-linux-gnu/SHA256SUMS.part
12a66ed663c4efe577c619c66e672a7b42875cc56ad2fec25bb858cca556470a58 guix-build-f0cebbdb2a1a/output/powerpc64-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64-linux-gnu-debug.tar.gz
13f6e0402ca1f77d25fb7aedbe224592cd92bc923a7795f79fa209475cfd251a73 guix-build-f0cebbdb2a1a/output/powerpc64-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64-linux-gnu.tar.gz
1461c9096ad863ef2dbdc7f8679f13ad1ae74a2fa0b26fb8fa4ecf1bdd63599744 guix-build-f0cebbdb2a1a/output/powerpc64le-linux-gnu/SHA256SUMS.part
157392e04650e09f009b79bca40d81423a9b02654d4851648d531f84ca8034ac24 guix-build-f0cebbdb2a1a/output/powerpc64le-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64le-linux-gnu-debug.tar.gz
16883e7c841ef7fdf96e9a078179acade46c610bd01c0e0fe6694ecdb44d8a3e40 guix-build-f0cebbdb2a1a/output/powerpc64le-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64le-linux-gnu.tar.gz
17744e4852a2ed0c1fdf5c304d1aef535c969b3d144298f9ec377da3a8f77e0780 guix-build-f0cebbdb2a1a/output/riscv64-linux-gnu/SHA256SUMS.part
18654782521b4355ff4b134b8838adc5d883d435c4677d5e49853f86a90f982cfa guix-build-f0cebbdb2a1a/output/riscv64-linux-gnu/bitcoin-f0cebbdb2a1a-riscv64-linux-gnu-debug.tar.gz
199792b7910451b908b9699791c54607527b925f353696d50adc499d7ae2433183 guix-build-f0cebbdb2a1a/output/riscv64-linux-gnu/bitcoin-f0cebbdb2a1a-riscv64-linux-gnu.tar.gz
20c937d24d5ba15c03d4f3ef6a79a83fb42132914ac89d5b87c7d7109ee3e017b7 guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/SHA256SUMS.part
21a57be735d7517e2e2f422903cf900090668931a617368ce6cb6cd15828240d7a guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/bitcoin-f0cebbdb2a1a-x86_64-apple-darwin-unsigned.tar.gz
2288daf2e69b4d0ae5805ea2912149a3bd56158fbcc9587ddce0197b907448f354 guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/bitcoin-f0cebbdb2a1a-x86_64-apple-darwin-unsigned.zip
234ee080d775b42e6eb62f480388c9dce7b51da614c6c2c089c1ae5ef61d1cb1b2 guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/bitcoin-f0cebbdb2a1a-x86_64-apple-darwin.tar.gz
2409d4e09a8e8fd2fa79c936168afc13858933a09cc57563c47ad22d4cbae83358 guix-build-f0cebbdb2a1a/output/x86_64-linux-gnu/SHA256SUMS.part
255c15c22a3618bfdd68c077728f0c29460ca030e3db3c5ae8f7de137b302108c9 guix-build-f0cebbdb2a1a/output/x86_64-linux-gnu/bitcoin-f0cebbdb2a1a-x86_64-linux-gnu-debug.tar.gz
268cb3859a60d4959f50bee7a38d7fc2f4f14e9a8f3b2bd61758db6caedfb60ea0 guix-build-f0cebbdb2a1a/output/x86_64-linux-gnu/bitcoin-f0cebbdb2a1a-x86_64-linux-gnu.tar.gz
27673745d4a58e3be09edfbc636b59e236dbd4b81435b316cae61f61371bd128c1 guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/SHA256SUMS.part
28532d405d395213187c94054da5b932380284cc51c558364a81529af107e92e82 guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64-debug.zip
293b98c83395cf15ff055f4d726fe81cec2f12df890664c625e036d3df6f8682af guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64-setup-unsigned.exe
301f01ca40ac10798b9fc9eb16298d63b09daf7d2872e138fb8ea29bc51d363122 guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64-unsigned.tar.gz
316fafab859b384a99c1919486d7110c68280820b10993807145f4f7d081d9b80e guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64.zip
My Guix builds:
0x86_64
101cbbeddf52eebbcd390aa169146cfc64ef85a38872baa86abf46327dfcbeb9f guix-build-f0cebbdb2a1a/output/aarch64-linux-gnu/SHA256SUMS.part
294fae6a5e94adc27dc2d7e3a8902f9e7d216a6acd0995ce5bf0cb5b3f3c2876b guix-build-f0cebbdb2a1a/output/aarch64-linux-gnu/bitcoin-f0cebbdb2a1a-aarch64-linux-gnu-debug.tar.gz
3ec377f0d436752f44b71ef257641135e479ffca32cc7bd3fa06c9799d2d0ec87 guix-build-f0cebbdb2a1a/output/aarch64-linux-gnu/bitcoin-f0cebbdb2a1a-aarch64-linux-gnu.tar.gz
44eb26bedc2ca129dbb063217cddda6dee4bcfc0b2ee0c1115d1ae4daf15f85f5 guix-build-f0cebbdb2a1a/output/arm-linux-gnueabihf/SHA256SUMS.part
5fc99f934f5f3d289339c6d901eb552a30bd05853cb7b6c0ee80a57a0d75ded2e guix-build-f0cebbdb2a1a/output/arm-linux-gnueabihf/bitcoin-f0cebbdb2a1a-arm-linux-gnueabihf-debug.tar.gz
618b373fa039e135b4380174f12781374ec9d9a6abd6663233fedcd200664f929 guix-build-f0cebbdb2a1a/output/arm-linux-gnueabihf/bitcoin-f0cebbdb2a1a-arm-linux-gnueabihf.tar.gz
78ca14c4bc4133b96c70e37b383ee739e9b7849c08654e537d2aafaa30b041192 guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/SHA256SUMS.part
8d027cffbd02d5f46138ea55273e38c8940b4c2d046c74a9e5fda53387865d5cc guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/bitcoin-f0cebbdb2a1a-arm64-apple-darwin-unsigned.tar.gz
9f92487934b55999f4118cf48a779f545f9a6e3d483cf919deea7210476dbf44b guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/bitcoin-f0cebbdb2a1a-arm64-apple-darwin-unsigned.zip
10e8828cf3212a8a3672395829f2d05261c95a4afe31fddef8ffa9faafd6b13508 guix-build-f0cebbdb2a1a/output/arm64-apple-darwin/bitcoin-f0cebbdb2a1a-arm64-apple-darwin.tar.gz
11cc16f5d83105302c8cf462a625fad7a8c1edcdcb6229188e97ecc1ade6644adc guix-build-f0cebbdb2a1a/output/dist-archive/bitcoin-f0cebbdb2a1a.tar.gz
120b253f5fc819abf7a55a3565587b83e20f846f6b2eb9da20d4b3af4a46028193 guix-build-f0cebbdb2a1a/output/powerpc64-linux-gnu/SHA256SUMS.part
13a66ed663c4efe577c619c66e672a7b42875cc56ad2fec25bb858cca556470a58 guix-build-f0cebbdb2a1a/output/powerpc64-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64-linux-gnu-debug.tar.gz
14f6e0402ca1f77d25fb7aedbe224592cd92bc923a7795f79fa209475cfd251a73 guix-build-f0cebbdb2a1a/output/powerpc64-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64-linux-gnu.tar.gz
1561c9096ad863ef2dbdc7f8679f13ad1ae74a2fa0b26fb8fa4ecf1bdd63599744 guix-build-f0cebbdb2a1a/output/powerpc64le-linux-gnu/SHA256SUMS.part
167392e04650e09f009b79bca40d81423a9b02654d4851648d531f84ca8034ac24 guix-build-f0cebbdb2a1a/output/powerpc64le-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64le-linux-gnu-debug.tar.gz
17883e7c841ef7fdf96e9a078179acade46c610bd01c0e0fe6694ecdb44d8a3e40 guix-build-f0cebbdb2a1a/output/powerpc64le-linux-gnu/bitcoin-f0cebbdb2a1a-powerpc64le-linux-gnu.tar.gz
18744e4852a2ed0c1fdf5c304d1aef535c969b3d144298f9ec377da3a8f77e0780 guix-build-f0cebbdb2a1a/output/riscv64-linux-gnu/SHA256SUMS.part
19654782521b4355ff4b134b8838adc5d883d435c4677d5e49853f86a90f982cfa guix-build-f0cebbdb2a1a/output/riscv64-linux-gnu/bitcoin-f0cebbdb2a1a-riscv64-linux-gnu-debug.tar.gz
209792b7910451b908b9699791c54607527b925f353696d50adc499d7ae2433183 guix-build-f0cebbdb2a1a/output/riscv64-linux-gnu/bitcoin-f0cebbdb2a1a-riscv64-linux-gnu.tar.gz
21c937d24d5ba15c03d4f3ef6a79a83fb42132914ac89d5b87c7d7109ee3e017b7 guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/SHA256SUMS.part
22a57be735d7517e2e2f422903cf900090668931a617368ce6cb6cd15828240d7a guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/bitcoin-f0cebbdb2a1a-x86_64-apple-darwin-unsigned.tar.gz
2388daf2e69b4d0ae5805ea2912149a3bd56158fbcc9587ddce0197b907448f354 guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/bitcoin-f0cebbdb2a1a-x86_64-apple-darwin-unsigned.zip
244ee080d775b42e6eb62f480388c9dce7b51da614c6c2c089c1ae5ef61d1cb1b2 guix-build-f0cebbdb2a1a/output/x86_64-apple-darwin/bitcoin-f0cebbdb2a1a-x86_64-apple-darwin.tar.gz
2509d4e09a8e8fd2fa79c936168afc13858933a09cc57563c47ad22d4cbae83358 guix-build-f0cebbdb2a1a/output/x86_64-linux-gnu/SHA256SUMS.part
265c15c22a3618bfdd68c077728f0c29460ca030e3db3c5ae8f7de137b302108c9 guix-build-f0cebbdb2a1a/output/x86_64-linux-gnu/bitcoin-f0cebbdb2a1a-x86_64-linux-gnu-debug.tar.gz
278cb3859a60d4959f50bee7a38d7fc2f4f14e9a8f3b2bd61758db6caedfb60ea0 guix-build-f0cebbdb2a1a/output/x86_64-linux-gnu/bitcoin-f0cebbdb2a1a-x86_64-linux-gnu.tar.gz
28673745d4a58e3be09edfbc636b59e236dbd4b81435b316cae61f61371bd128c1 guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/SHA256SUMS.part
29532d405d395213187c94054da5b932380284cc51c558364a81529af107e92e82 guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64-debug.zip
303b98c83395cf15ff055f4d726fe81cec2f12df890664c625e036d3df6f8682af guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64-setup-unsigned.exe
311f01ca40ac10798b9fc9eb16298d63b09daf7d2872e138fb8ea29bc51d363122 guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64-unsigned.tar.gz
326fafab859b384a99c1919486d7110c68280820b10993807145f4f7d081d9b80e guix-build-f0cebbdb2a1a/output/x86_64-w64-mingw32/bitcoin-f0cebbdb2a1a-win64.zip
fanquake
DrahtBot
hebasto
TheCharlatan
Labels
GUI