Skip to content

Fix build on macOS when qt@6 is installed #32804

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

Closed
wants to merge 2 commits into from

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jun 24, 2025

Fix #31009 on both arm64 and x64 macOS.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 24, 2025

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32804.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

@hebasto
Copy link
Member Author

hebasto commented Jun 24, 2025

Please review #32805 first.

@hebasto
Copy link
Member Author

hebasto commented Jun 25, 2025

Please review #32805 first.

Also #32814.

@hebasto hebasto force-pushed the 250624-29.x-multi-qt branch from 3726e55 to 32826b0 Compare June 25, 2025 17:58
hebasto added 2 commits June 25, 2025 18:59
According to the CMake documentation, `HINTS` "should be paths computed
by system introspection, such as a hint provided by the location of
another item already found", which is precisely the case in the
`FindQRencode` module.

Entries in `HINTS` are searched before those in `PATHS`. On macOS,
Homebrew’s `libqrencode` will therefore be located at its real path
rather than via the symlink in the default prefix.
On macOS, this change ensures that the Boost package is located at its
real path rather than via the symlink in the default prefix.
@hebasto hebasto force-pushed the 250624-29.x-multi-qt branch from 32826b0 to 812bd51 Compare June 25, 2025 17:59
fanquake added a commit that referenced this pull request Jun 26, 2025
ead4468 cmake: Use `HINTS` instead of `PATHS` in `find_*` commands (Hennadii Stepanov)

Pull request description:

  According to the CMake documentation, `HINTS` "should be paths computed by system introspection, such as a hint provided by the location of another item already found", which is precisely the case in the `FindQRencode` module.

  Entries in `HINTS` are searched before those in `PATHS`. On macOS, Homebrew’s `libqrencode` will therefore be located at its real path rather than via the symlink in the default prefix.

  A backport to 29.x is required for #32804, as this change prevents contamination of include directories by broad locations such as `/usr/local/include` or `/opt/homebrew/include`, which take precedence over Qt’s `-iframework` flags.

  Below is the relevant change in the configuration logs on my macOS 15.5 `x64`:
  - master branch @ ead4468:
  ```
  % cmake -B build -DBUILD_GUI=ON
  <snip>
  -- Found QRencode: /usr/local/lib/libqrencode.dylib (found version "4.1.1")
  <snip>
  ```
  - this PR:
  ```
  % cmake -B build -DBUILD_GUI=ON
  <snip>
  -- Found QRencode: /usr/local/Cellar/qrencode/4.1.1/lib/libqrencode.dylib (found version "4.1.1")
  <snip>
  ```

ACKs for top commit:
  fanquake:
    ACK ead4468

Tree-SHA512: 1f0b04e3efeb7fe3efbb969be911abbcf56030d715acd87c0fbaf24422cdf1122f169e32242571256916c96a159212842e1e73092145c63ecc495ce429c6e587
@fanquake
Copy link
Member

Do we need this open? Rebased it's the same as #32814.

@hebasto
Copy link
Member Author

hebasto commented Jun 26, 2025

Do we need this open? Rebased it's the same as #32814.

To make testing this branch easier?

fanquake added a commit that referenced this pull request Jun 26, 2025
…ackage

8800b5a cmake: Explicitly specify `Boost_ROOT` for Homebrew's package (Hennadii Stepanov)

Pull request description:

  On macOS, this PR ensures that the Boost package is located at its real path rather than via the symlink in the default prefix.

  A backport to 29.x is required for #32804, as this change prevents contamination of include directories by broad locations such as `/usr/local/include` or `/opt/homebrew/include`, which take precedence over Qt’s `-iframework` flags.

  Below is the relevant change in the configuration logs on my macOS 15.5 `x64`:
  - master branch @ ead4468:
  ```
  % cmake -B build
  <snip>
  -- Found Boost: /usr/local/include (found suitable version "1.88.0", minimum required is "1.73.0")
  <snip>
  ```
  - this PR:
  ```
  % cmake -B build
  <snip>
  -- Found Boost: /usr/local/opt/boost/include (found suitable version "1.88.0", minimum required is "1.73.0")
  <snip>
  ```

  This PR is forward-compatible with the changes proposed in #32667.

ACKs for top commit:
  fanquake:
    ACK 8800b5a Checked that this plus #32805 fixes #31009

Tree-SHA512: 114bd945ec0c06a8d15b565e5b9aafc3bcfdf2a4ba4400e072b8e31053dff0f9ef423b941ee1dff2113f83e08f7fada728383ae88b3ec380b5c3e40553205f7d
@fanquake
Copy link
Member

Both of these changes are now in #32810, so if someone would like to test them, they can use that branch.

@fanquake fanquake closed this Jun 26, 2025
@hebasto hebasto deleted the 250624-29.x-multi-qt branch June 27, 2025 19:12
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.

4 participants