-
Notifications
You must be signed in to change notification settings - Fork 37.8k
build, qt, macOS: Don't hard-code x86_64 as the arch when using qmake #23583
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
Conversation
Concept ACK |
fe6de8d
to
243c4f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 243c4f0
Tested on an M1 machine running macOS 12.0.1
Can verify that the x86_64
arch is no longer hard-coded when using gmake, and instead relies on the host arch.
On master:
$ make -C depends qt_configured
Extracting qt...
...
Configure summary:
Building on: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
Building for: macx-clang (arm64, CPU features: neon crc32)
Target compiler: clang (Apple) 13.0.0
Configuration: cross_compile largefile neon precompile_header silent release c++11 c++14 c++1z reduce_exports static stl
...
After patch:
$ make -C depends qt_configured
Extracting qt...
...
Configure summary:
Build type: macx-clang (arm64, CPU features: neon crc32)
Compiler: clang (Apple) 13.0.0
Configuration: largefile neon precompile_header silent release c++11 c++14 c++1z reduce_exports static stl
...
Guix build:
|
This change fixes qt build on M1 Apple Silicon
This reverts commit cdb41d5. It is no longer required because of the previous commit.
243c4f0
to
d020419
Compare
Rebased 243c4f0 -> d020419 (pr23583.01 -> pr23583.02) due to the conflict with #23580. |
Guix builds:
|
Tested ACK d020419
(had to clean depends) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK d020419
Guix Build
bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
3d197f78189e87973388bcd6c63b84bca1d35147793e5cc17be3d695e0b18fd1 guix-build-d0204199d6aa/output/aarch64-linux-gnu/SHA256SUMS.part
53170f8ac9ac71bca2186ac98f863be00f88f046db66e748f89da8aab258e201 guix-build-d0204199d6aa/output/aarch64-linux-gnu/bitcoin-d0204199d6aa-aarch64-linux-gnu-debug.tar.gz
6c1444c3184dc3a9a1d75a2f5869e96498dd54ff50356f07acef1a2efc5fb387 guix-build-d0204199d6aa/output/aarch64-linux-gnu/bitcoin-d0204199d6aa-aarch64-linux-gnu.tar.gz
527cb1e092e42b51b3ac905296ad55f466a258a57813d6ff0549cd4131af027f guix-build-d0204199d6aa/output/arm-linux-gnueabihf/SHA256SUMS.part
fceea6869c9f127e568d5e3ef598031dcf27b44126631d2b90df12c8aaafca00 guix-build-d0204199d6aa/output/arm-linux-gnueabihf/bitcoin-d0204199d6aa-arm-linux-gnueabihf-debug.tar.gz
e34a242f9e34920b499b91f673f54ed10ef4cdcbfcffc8b79135f0ff324ad57f guix-build-d0204199d6aa/output/arm-linux-gnueabihf/bitcoin-d0204199d6aa-arm-linux-gnueabihf.tar.gz
7aab2016b77910c494d0d70538023c3f4bc6061c495bc516b4922c468c64ed2c guix-build-d0204199d6aa/output/dist-archive/bitcoin-d0204199d6aa.tar.gz
3476330ae5cdda40a675e83fdfd091f33ec29c365d8b4e135bcbfcdcf834dfa9 guix-build-d0204199d6aa/output/powerpc64-linux-gnu/SHA256SUMS.part
c19738b5a339358761befd49a32803cb1d252a47c5e77ccaee24622059d8cc7c guix-build-d0204199d6aa/output/powerpc64-linux-gnu/bitcoin-d0204199d6aa-powerpc64-linux-gnu-debug.tar.gz
e79b03974b52979b24356e133b25e86837678c035e8f63a692d4fddf5aa23b1e guix-build-d0204199d6aa/output/powerpc64-linux-gnu/bitcoin-d0204199d6aa-powerpc64-linux-gnu.tar.gz
1e2bdb44e871ddb44bb30b9d7c572f713e12f9825439825a03d6e51f97ecda83 guix-build-d0204199d6aa/output/powerpc64le-linux-gnu/SHA256SUMS.part
af3217bff3141226b418e2e337b4fee257271b22f6d93c02400f01fdd6f9ff7c guix-build-d0204199d6aa/output/powerpc64le-linux-gnu/bitcoin-d0204199d6aa-powerpc64le-linux-gnu-debug.tar.gz
62d2a3b29aef3904e01751b1563ce023cb9c16cc531c8c12e7edaa7f0829ffd9 guix-build-d0204199d6aa/output/powerpc64le-linux-gnu/bitcoin-d0204199d6aa-powerpc64le-linux-gnu.tar.gz
1235956559a13ab53e205080db378218eeb9cb2f71587f2460d12afe8b696e95 guix-build-d0204199d6aa/output/riscv64-linux-gnu/SHA256SUMS.part
dc59c036f53803328a23d4c5dd02f539f57c64166e52ec576f711d1f06499968 guix-build-d0204199d6aa/output/riscv64-linux-gnu/bitcoin-d0204199d6aa-riscv64-linux-gnu-debug.tar.gz
a3a561d32b3f1caeb1514490f24c3107664eb133394e90a86c8a9b4b41dd2cf7 guix-build-d0204199d6aa/output/riscv64-linux-gnu/bitcoin-d0204199d6aa-riscv64-linux-gnu.tar.gz
22dd94076f7a267502b33288ba593ce3209270b8bdd6faf8b2fae7da232de155 guix-build-d0204199d6aa/output/x86_64-apple-darwin19/SHA256SUMS.part
a2efd8c226f1d5d6bd79b3682487083c61d82dcbda1f2d7d367643add2cb8f9a guix-build-d0204199d6aa/output/x86_64-apple-darwin19/bitcoin-d0204199d6aa-osx-unsigned.dmg
089007bce80f1036c7ccdcf5a6b2af7f8236984050ea81eca759e7e8f4c5416c guix-build-d0204199d6aa/output/x86_64-apple-darwin19/bitcoin-d0204199d6aa-osx-unsigned.tar.gz
2f6ee863a3ba7bf2af1c4c4ff904016118760084244d1ec73f5161aa341939a0 guix-build-d0204199d6aa/output/x86_64-apple-darwin19/bitcoin-d0204199d6aa-osx64.tar.gz
2a64800bb454f5eab711bf1c3c1034b3b94f31a5afc9f11ba695e1235ad87c27 guix-build-d0204199d6aa/output/x86_64-linux-gnu/SHA256SUMS.part
7efc0d04f3651bc19a3a3ac0f585657deee586546d3d76f6b5b70c680b0749ff guix-build-d0204199d6aa/output/x86_64-linux-gnu/bitcoin-d0204199d6aa-x86_64-linux-gnu-debug.tar.gz
a777ed6777c4866810dbf69e57316372fc225e367de5ccbd2c2b01574e47b09b guix-build-d0204199d6aa/output/x86_64-linux-gnu/bitcoin-d0204199d6aa-x86_64-linux-gnu.tar.gz
e58f3409e892bb9c375af3364ac6e671db813cf11edf8c7b64bb90c80533db74 guix-build-d0204199d6aa/output/x86_64-w64-mingw32/SHA256SUMS.part
eb67626ec74e61a7ee451402380d1746b53621e62ddf49afcf2f8816b9715692 guix-build-d0204199d6aa/output/x86_64-w64-mingw32/bitcoin-d0204199d6aa-win-unsigned.tar.gz
178abba73f43f54ff86662210ed8936c9f9636c7259de215cc9dfddac8205a1d guix-build-d0204199d6aa/output/x86_64-w64-mingw32/bitcoin-d0204199d6aa-win64-debug.zip
708093ee558c676752bb69b0abae2373072d7679e919ca0783ed0b77a547f57a guix-build-d0204199d6aa/output/x86_64-w64-mingw32/bitcoin-d0204199d6aa-win64-setup-unsigned.exe
bb9bdbdf4a757f55a8f248f416736d674f271273d476f0bcb5b7519ab5caec02 guix-build-d0204199d6aa/output/x86_64-w64-mingw32/bitcoin-d0204199d6aa-win64.zip
…arch when using qmake d020419 Revert "doc: Install Rosetta on M1-macOS for qt in depends" (Hennadii Stepanov) f6e2781 build, qt, macOS: Don't pass -device-option when building natively (Hennadii Stepanov) 667f068 build, qt, macOS: Don't hard-code x86_64 as the arch when using qmake (Hennadii Stepanov) Pull request description: On master (4018e23) the Qt build system hard-coded the x86_64 as the architecture when using qmake. This means that compiling the `qt` package on M1 Apple Silicon for the same system, i.e., without providing the `HOST` variable,—that is supposed to be compiled natively—is a cross-compiling actually: ``` % make -C depends qt_configured ... Configure summary: Building on: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1) Building for: macx-clang (arm64, CPU features: neon crc32) Target compiler: clang (Apple) 13.0.0 Configuration: cross_compile largefile neon precompile_header silent release c++11 c++14 c++1z reduce_exports static stl ... ``` Also this bug caused another [issue](bitcoin#22402) which currently is worked around by installing Rosetta. With this PR it is no longer needed to have Rosetta installed on M1-based macOS, and: ``` % make -C depends qt_configured ... Configure summary: Build type: macx-clang (arm64, CPU features: neon crc32) Compiler: clang (Apple) 13.0.0 Configuration: largefile neon precompile_header silent release c++11 c++14 c++1z reduce_exports static stl ... ``` ACKs for top commit: promag: Tested ACK d020419 fanquake: ACK d020419 Tree-SHA512: 2fcd88d172286b7d22ec7ea7ce0939b012211c0160df56de2f4cb69e99743c71df6b6ff4777c1722ec22b974f48a77cc22e7c14d7d64d02c4f82ac22bafe4087
On master (4018e23) the Qt build system hard-coded the x86_64 as the architecture when using qmake.
This means that compiling the
qt
package on M1 Apple Silicon for the same system, i.e., without providing theHOST
variable,—that is supposed to be compiled natively—is a cross-compiling actually:Also this bug caused another issue which currently is worked around by installing Rosetta.
With this PR it is no longer needed to have Rosetta installed on M1-based macOS, and: