fix(setup): resolve openssl@3 prefix via brew so setup.sh works on Intel Macs - #379
Merged
tilakpatel22 merged 1 commit intoAug 31, 2026
Conversation
…pple Silicon path The macOS configure step only set OPENSSL_ROOT_DIR when /opt/homebrew/opt/openssl@3 existed. That path is Apple Silicon only — Intel Macs install Homebrew under /usr/local, so on those machines EXTRA_ARGS stayed empty and the build was configured without an OpenSSL root. Two consequences on Intel: 1. find_package(OpenSSL REQUIRED) in fincept-qt/CMakeLists.txt has no root to search. macOS ships no OpenSSL development headers, so configure fails. 2. More subtly, the `if(APPLE AND OPENSSL_ROOT_DIR)` block that symlinks libssl/libcrypto into Qt's lib dir is skipped. Per the comment there, that makes Qt's openssl TLS plugin fail to register and fall back to the deprecated SecureTransport backend, which double-frees in SSLWrite during QWebSocket close and crashes the crypto tab. Ask brew for the prefix instead, which is correct on both architectures and also honours a non-standard HOMEBREW_PREFIX. Falls back to leaving EXTRA_ARGS empty when openssl@3 is not installed, so behaviour is unchanged where the formula is absent. Verified on macOS 15.7.9 / Intel x86_64, Apple Clang 17, Qt 6.8.3: build completes (758/758 targets) and the app logs "TLS backend: openssl" at startup. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Hi @mstru54 — thanks for the PR! Our automated scope gate flagged the following: ❌ No scope-approved linked issue. This PR must close an issue that carries one of: Please read CONTRIBUTING.md. Once an issue with the appropriate label exists and is linked here, re-run this check by pushing an empty commit or editing the PR description. A maintainer can also bypass this gate by adding the PRs that remain unresolved for 7 days will be closed automatically. |
This was referenced Aug 30, 2026
Closed
Collaborator
|
@mstru54 Thanks for the PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
setup.shonly setsOPENSSL_ROOT_DIRwhen/opt/homebrew/opt/openssl@3exists:/opt/homebrewis the Apple Silicon prefix. On Intel Macs Homebrew installs under/usr/local, so the test fails,EXTRA_ARGSstays empty, and CMake is configured with no OpenSSL root.Impact on Intel Macs
1. Configure fails.
fincept-qt/CMakeLists.txtcallsfind_package(OpenSSL REQUIRED). macOS ships no OpenSSL development headers, so with no root to search this is a hard stop —./setup.shcannot complete on an Intel Mac as written.2. A quieter TLS problem. Even given a working OpenSSL, the guard below is skipped because it is conditioned on the same variable:
The comment on that block explains the stakes: without the symlinks Qt's openssl TLS plugin fails to register and Qt falls back to the deprecated SecureTransport backend, "which double-frees in SSLWrite during QWebSocket close and crashes the crypto tab." So the hardcoded path also silently disarms the workaround for that crash.
Fix
Ask Homebrew for the prefix rather than hardcoding one:
OPENSSL_PREFIX="$(brew --prefix openssl@3 2>/dev/null || true)"This is correct on both architectures and additionally honours a non-standard
HOMEBREW_PREFIX. Whenopenssl@3is not installed,brew --prefixfails,EXTRA_ARGSstays empty, and behaviour is exactly as before — so this is a no-op wherever the current code already worked.Verification
Built from a clean clone on:
clang_64), CMake 3.27.7, Ninja 1.11.1openssl@33.6.3 at/usr/local/opt/openssl@3Results:
Found OpenSSL: /usr/local/opt/openssl@3/lib/libcrypto.dylib (found version "3.6.3")libssl.dylib,libssl.3.dylib,libcrypto.dylib,libcrypto.3.dylib)TLS backend: openssl (available: securetransport, openssl, cert-only)at startup, confirming the openssl plugin registered rather than falling back to SecureTransportWithout this change the same clone fails at the configure step.