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

Apple Silicon homebrew update, fix #998 #999

Closed
wants to merge 4 commits into from
Closed

Apple Silicon homebrew update, fix #998 #999

wants to merge 4 commits into from

Conversation

jlaurens
Copy link
Collaborator

@jlaurens jlaurens commented Mar 14, 2023

On an Apple Silicon Mac, one can build from actual source, provided an x86 terminal is used (/usr/bin/arch -arch x86_64). Whereas homebrew stores intel binaries in /usr subfolders, it also stores arm binaries in /opt/homebrew. This path is added in the PATHS section to find hunspell and poppler.
Here are the raw build instructions to install brew and the required dependencies

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install hunspell poppler-qt5 lua qt@5
brew link --force poppler-qt5

Here are the instruction to build from the root source directory

mkdir build
cd build
cmake -DQT_DEFAULT_MAJOR_VERSION=5 -DQt5_DIR=/opt/homebrew/Cellar/qt@5/5.15.8_2/lib/cmake/Qt5  ..
make -j

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #999 (3de74f9) into main (d2229f2) will not change coverage.
The diff coverage is n/a.

❗ Current head 3de74f9 differs from pull request most recent head 199f909. Consider uploading reports for the commit 199f909 to get more accurate results

@@           Coverage Diff           @@
##             main     #999   +/-   ##
=======================================
  Coverage   34.78%   34.78%           
=======================================
  Files         146      146           
  Lines       17369    17369           
=======================================
  Hits         6042     6042           
  Misses      11327    11327           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jlaurens jlaurens linked an issue Mar 14, 2023 that may be closed by this pull request
@stloeffler
Copy link
Member

Thanks for the pull request. Before hard-coding some mac-specific paths into the sources, could you try one more thing?
With stashing the changes (so the paths are not hard-coded anymore), could you run CMake with
cmake -DCMAKE_PREFIX_PATH=/opt/homebrew -DQT_DEFAULT_MAJOR_VERSION=5 -DQt5_DIR=/opt/homebrew/Cellar/qt@5/5.15.8_2/lib/cmake/Qt5 .. (or similar, depending on the directory structure)? AFAIK, CMAKE_PREFIX_PATH is (one of) the preferred way to tell CMake about dependencies in "non-standard" directories (such as arm binaries on an x86 machine, or also self-compiled/non-system-wide-installed dependencies).

@jlaurens
Copy link
Collaborator Author

I have managed to remove the hard coded reference but there are still some problems. I'll go back to the issue.

@jlaurens jlaurens closed this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building texworks on OSX Ventura / Apple Silicon
2 participants