-
Notifications
You must be signed in to change notification settings - Fork 37.8k
doc: Install Rosetta on M1-macOS for qt in depends #22402
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
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 cdb41d5.
branch can be deleted after close or merge |
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 cdb41d5 - I have not tested after installing Rosetta 2, but I saw the same issue during my first cross-compile on an M1 box.
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 cdb41d5
I had the same issue on an initial compile on the M1, glad to see this make it to the docs.
The branch https://github.com/bitcoin/bitcoin/tree/210705-rosetta can now be deleted |
cdb41d5 doc: Install Rosetta on M1-macOS for qt in depends (Hennadii Stepanov) Pull request description: On master (c609e10) `make -C depends qt` on Apple Silicon based macOS 11.4 ends with an error: ``` /bin/sh: /Users/hebasto/bitcoin/depends/work/build/aarch64-apple-darwin20.5.0/qt/5.12.11-6c4d47a8f8f/qtbase/bin/moc: Bad CPU type in executable ``` Installing Rosetta 2 fixes it. Explanation. On Apple Silicon macOS the `qt` package in depends actually is cross compiled. All native tools (including `moc`) are x86_64 binaries, that require Rosetta 2 to run. ACKs for top commit: promag: ACK cdb41d5. fanquake: ACK cdb41d5 - I have not tested after installing Rosetta 2, but I saw the same issue during my first cross-compile on an M1 box. Zero-1729: ACK cdb41d5 Tree-SHA512: fb06a32d6fb40f405ce856b44f5d3af0c51089886f3be79e509e5c325614d7af58ce4480c064c17e0efb695a1f69f68d533c417f9631d46d8a630aba60ce4433
…en 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](#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
…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 (c609e10)
make -C depends qt
on Apple Silicon based macOS 11.4 ends with an error:Installing Rosetta 2 fixes it.
Explanation. On Apple Silicon macOS the
qt
package in depends actually is cross compiled. All native tools (includingmoc
) are x86_64 binaries, that require Rosetta 2 to run.