Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depends: always use correct ar for win qt build #2588

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

div72
Copy link
Member

@div72 div72 commented Oct 15, 2022

If we don't set this explicitly, then qt will still use it's default
windows ar, when building with LTO (when we want it to use gcc-ar).

So set QMAKE_LIB which is used for win32, and defaults to ar rc, to our_ar rc.
This way we always get the correct ar.

Issue can be seen building in Guix with LTO. i.e:

x86_64-w64-mingw32-ar: .obj/release/hb-blob.o: plugin needed to handle lto object

Guix Build (x86_64):

6c24d8a86c2410d5dbf29e8087c1bcd230aeb3f5c8ba3bf63e4edf07503cd689  guix-build-300918075144/output/aarch64-linux-gnu/SHA256SUMS.part
deb6c99f2efa3b60569fb31fbe543a97071af707f3b6e68825de93e7f1adaab0  guix-build-300918075144/output/aarch64-linux-gnu/bitcoin-300918075144-aarch64-linux-gnu-debug.tar.gz
d3f14344f472d2c0540ac9254935f3008fb6b8286aa6c52045243a42dd05f2e4  guix-build-300918075144/output/aarch64-linux-gnu/bitcoin-300918075144-aarch64-linux-gnu.tar.gz
fe97d5c4eb398c18689e7e68b1d97ab9ccbd12d1f0085eff8bd49de242675963  guix-build-300918075144/output/arm-linux-gnueabihf/SHA256SUMS.part
239dfcaaaee91164c0e6d8835b613af51e43ece4bf7e17236f55c1a4facf8cd7  guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf-debug.tar.gz
29fe2ffb5c85f654cf23efd43035f1db6cff4e532839b50e7610dd588ad6680b  guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf.tar.gz
a100ce07e5566284a1b213174295c49573e8d93bfea86ad35b3b2dcb85d6c263  guix-build-300918075144/output/arm64-apple-darwin/SHA256SUMS.part
593f57ff35de42f262bdae8085afcd49f33e7db350fd0cb0850bc560414a302a  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.dmg
6d5ae0ff77dfb0a7f74621a859c00060cda86c426c604b19269987163b67e413  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.tar.gz
14bc35725df2dbbd1e3447f57d128125cf65a182d4bb081c840947a0af69bce4  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin.tar.gz
29da16189e087c7fc90909d4dfc8002e37ce4ab035d6a94f0d73724d81ce565b  guix-build-300918075144/output/dist-archive/bitcoin-300918075144.tar.gz
fe4a4a3b84f7782c7d65fdc7d4cbdf6fa57a7898d347ad932cbd4b5d3d7712b4  guix-build-300918075144/output/powerpc64-linux-gnu/SHA256SUMS.part
e612386c452d04c7a9c9a624efa00f905928af39694067d903635fc7476d0e2c  guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu-debug.tar.gz
148ff9a17842287e1d541d032bab3c96df98d0c8a2175a132d896e4617799b5b  guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu.tar.gz
d67e6ad7a8ae2c3a0305602aabbed22ccdf07e354fbc1991b99d9ba58f451d1b  guix-build-300918075144/output/powerpc64le-linux-gnu/SHA256SUMS.part
a776fb31b742d391cee1b2401204f41b3e93793cc2b54cdfcfca1f1b24a49051  guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu-debug.tar.gz
9bfc9255af051fe3801a556bdeaa940a74399ab7b3b677e5313e5e720a87e9cf  guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu.tar.gz
bc74550b70614e7c07500507943f7b7cda7ec0097908e459b84edfcf9c5f2de7  guix-build-300918075144/output/riscv64-linux-gnu/SHA256SUMS.part
00906c4d9ba5aa6f567c8c3cfa0d44749f944a182f531ff6724284dc70157f88  guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu-debug.tar.gz
9cd40cbaeb3a68faf500410559443376957aafda081e0cdef2a0d17c9b49d933  guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu.tar.gz
f9bc2d2cf92493af543a9199763ab913d86bf602f3f5123913ad313391527d75  guix-build-300918075144/output/x86_64-apple-darwin/SHA256SUMS.part
ba60756267e7fa7add1bb4375c98a65bd730a72a86646e3ddfb8496c1e1b695a  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.dmg
fa44e1d7b861e1f02232ef35e81b28dc78dcf52631944ec38768bc2e08943fa5  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.tar.gz
57ddb381261a1c242e683c12db6c2cfc0bb690bef73ad596f6503e07522f90ff  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin.tar.gz
95e409a241da708c8eefe87c1ba419258f3e4918a36cddd3bc50dbc754a9958e  guix-build-300918075144/output/x86_64-linux-gnu/SHA256SUMS.part
6b0548280d8558aa68d3a9006beb95a5402e98e64a92a7b211a4341e67b00e85  guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu-debug.tar.gz
612a684ed3dc374a81806a50946c85c6d043704945596bed7c5f0f7e998ebf10  guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu.tar.gz
a5adc490213892f93e2ea62af2aac6db26127afc721a44cb787b0207b8c16d07  guix-build-300918075144/output/x86_64-w64-mingw32/SHA256SUMS.part
1c7bf2d489e8d950b22be16506465da70b9402a4e23c770e04a74fb69d05c18c  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-debug.zip
2a04f07ca0e46a18b68088093eee0bbfbdeb51ec72bb18c2282168d54f748fc4  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-setup-unsigned.exe
e519347ff375e79d12acd8db87a9b216c5363d4b3cce09d7a8f79b85ba0deb85  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-unsigned.tar.gz
e49571279f9e5897d5217e5d5fb319467ca213ba7b4e99904e262a1cd1e65df6  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64.zip

Guix Build (arm64):
...

https://github.com/bitcoin/bitcoin/pull/25708

If we don't set this explicitly, then qt will still use it's default
windows ar, when building with LTO (when we want it to use gcc-ar).

So set `QMAKE_LIB` which is used for win32, and defaults to `ar -rc`.
This way we always get the correct ar.

Issue can be seen building in Guix with LTO. i.e:
```bash
x86_64-w64-mingw32-ar: .obj/release/hb-blob.o: plugin needed to handle lto object
```
Copy link
Member

@jamescowens jamescowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@jamescowens jamescowens merged commit ecbd246 into gridcoin-community:development Oct 20, 2022
jamescowens added a commit to jamescowens/Gridcoin-Research that referenced this pull request Nov 27, 2022
Added
 - net: Add and document network messages in protocol.h (backport) gridcoin-community#2533 (@Pythonix)
 - Define MAX_DIGITS_BTC for magic number in BitcoinUnits::format gridcoin-community#2555 (@barton2526)
 - rpc: Implementation of getmrcinfo gridcoin-community#2570 (@jamescowens)
 - init: Add init error message if -printtoconsole and -daemon specified simultaneously gridcoin-community#2571 (@jamescowens)
 - rpc: getmrcinfo part 2 - add calculated minimum fees and fee boosting and by CPID reporting gridcoin-community#2575 (@jamescowens)
 - fs: fully initialize `_OVERLAPPED` for win32 gridcoin-community#2587 (@div72)
 - util: Diagnose Lib Version #1 gridcoin-community#2573 (@MinaFarhan)
 - util: Implement core diagnostics #2 (@jamescowens)
 - util: modify Win32LockedPageAllocator to query windows for limit. gridcoin-community#2536 (@div72)
 - gui, voting: Implement information for wallet holder's votes on poll info cards gridcoin-community#2605 (@jamescowens)

Changed
 - scripted-diff: Drop Darwin version for better maintainability gridcoin-community#2557 (@barton2526)
 - build: Require gcc8 on Ubuntu Bionic to enable C++17 features gridcoin-community#2579 (@barton2526)
 - util: Replace use of locale dependent atoi(…) with locale-independent std::from_chars(…) (C++17) gridcoin-community#2564 (@barton2526)
 - translation: Translation updates gridcoin-community#2581 (@jamescowens)
 - depends: update urls for dmg tools gridcoin-community#2583 (@div72)
 - Use ReadLE64 in uint256::GetUint64 instead of duplicating logic gridcoin-community#2586 (@div72)
 - util: Make Parse{Int,UInt}{32,64} use locale independent std::from_chars(…) (C++17) instead of locale dependent strto{l,ll,ul,ull} gridcoin-community#2592 (@barton2526)
 - build: don't set PORT=no in config.site gridcoin-community#2593 (@barton2526)
 - build: Replace `which` command with `command -v` gridcoin-community#2595 (@barton2526)
 - build: update ax_cxx_compile_stdcxx to serial 14 gridcoin-community#2596 (@barton2526)
 - gui: Changed the unlocked for staking only icons to green gridcoin-community#2598 (@delta1513)
 - gui: Translation updates gridcoin-community#2599 (@jamescowens)
 - build: update CI for linter and actions version gridcoin-community#2606 (@jamescowens)
 - gui: Update translations gridcoin-community#2608 (@jamescowens)

Removed
 - refactor: remove unused c-string variant of atoi64() gridcoin-community#2562 (@barton2526)
 - refactor: Remove unused CDataStream::rdbuf method gridcoin-community#2585 (@div72)

Fixed
 - net: Fix some benign races (backport) gridcoin-community#2532 (@Pythonix)
 - rpc: fix invalid parameter error codes for {sign,verify}message RPCs gridcoin-community#2556 (@barton2526)
 - build: Fix x86_64 <-> arm64 cross-compiling for macOS gridcoin-community#2560 (@barton2526)
 - rpc, mrc: Fix field name and initialization of mrc_fees_to_staker gridcoin-community#2567 (@jamescowens)
 - gui: Add missing resizeTableColumns to fix send address book column widths gridcoin-community#2569 (@jamescowens)
 - accrual: rebuild snapshot registry on corruption instead of crashing gridcoin-community#2577 (@div72)
 - doc: Fix link to MurmurHash3.cpp (moved from Google Code to Github) gridcoin-community#2584 (@div72)
 - fix help text for `revokebeacon` command gridcoin-community#2591 (@Pythonix)
 - util: Fix spelling error in gridcoinresearchd.cpp gridcoin-community#2590 (@jamescowens)
 - depends: always use correct ar for win qt build gridcoin-community#2588 (@div72)
 - util: Fix some bugs due to new implementation and change in BOINC dir handling (@jamescowens)
 - util: Diagnose lib - Implement changes to solve crash on some Boost 1.66 machines gridcoin-community#2597 (@jamescowens)
 - contrib: Check for `patch` command, Check for `wget` command gridcoin-community#2594 (@barton2526)
 - build: Check std::system for -[alert|block|wallet]notify gridcoin-community#2582 (@barton2526)
 - gui: Changed the wording on the tooltip for the address book gridcoin-community#2602 (@delta1513)
 - build: pass win32-dll to LT_INIT() gridcoin-community#2601 (@barton2526)
 - build: minor cleanups to native_clang package gridcoin-community#2600 (@barton2526)
 - util: restore translations to diagnostics gridcoin-community#2603 (@jamescowens)
 - refactor: Fix problems found by valgrind gridcoin-community#2607 (@jamescowens)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants