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

Update BUILD-INSTRUCTIONS-MACOS.md #158

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

knewg
Copy link

@knewg knewg commented Dec 27, 2021

Build instructions are not working for (at least) the new Silicon mac's. I don't have access to an older intel mac to see if the instructions are still working there, but since I couldn't find any open issues regarding this I assume it's only affecting silicon macs.

Build instructions are not working for (at least) the new Silicon mac's. I don't have access to an older intel mac to see if the instructions are still working there, but since I couldn't find any open issues regarding this I assume it's only affecting silicon macs.
@fpytloun
Copy link

Intel Mac (Monterey) also needs Homebrew's gcc-11 to build successfuly:

brew install gcc
brew install cmake
brew install qt5
cmake -D CMAKE_PREFIX_PATH="/usr/local/opt/qt5" -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/11.2.0_3/bin/gcc-11 -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/11.2.0_3/bin/g++-11  ..

docs/BUILD-INSTRUCTIONS-MACOS.md Outdated Show resolved Hide resolved
Co-authored-by: Tommy Poll <Tommy@poolle.co.uk>
Copy link

@pedro-carrasco pedro-carrasco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to use gcc-12 in the cmake command for Apple Silicon:
cmake -D CMAKE_PREFIX_PATH="/opt/homebrew/opt/qt5" -DCMAKE_C_COMPILER=/opt/homebrew/bin/gcc-12 -DCMAKE_CXX_COMPILER=/opt/homebrew/bin/g++-12 ..

And it works fine.

@justinwzig
Copy link

justinwzig commented May 17, 2024

Confirming that this works with QT 5 and GCC 14 on macos Sonoma 14.4.1

brew install cmake
brew install qt@5
brew install gcc@14

cd glabels_source_directory
mkdir build
cd build
cmake -D CMAKE_PREFIX_PATH="/usr/local/opt/qt5" -DCMAKE_C_COMPILER=/opt/homebrew/Cellar/gcc/14.1.0/bin/gcc-14 -DCMAKE_CXX_COMPILER=/opt/homebrew/Cellar/gcc/14.1.0/bin/g++-14  ..
make
sudo make install

Going to PR.

@tpoomlmly
Copy link

@justinwzig interesting how your solution has /usr/local and /opt/homebrew. Have you got 2 copies of homebrew/terminal with different architectures?

To make it work for me I had to replace "/usr/local/opt/qt5" with "/opt/homebrew/opt/qt5"

Copy link

@tpoomlmly tpoomlmly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was a way to avoid specifying the GCC version on Apple Silicon, but leaving it out makes it fall back on Xcode's tools which fail to compile the project.

docs/BUILD-INSTRUCTIONS-MACOS.md Outdated Show resolved Hide resolved
docs/BUILD-INSTRUCTIONS-MACOS.md Outdated Show resolved Hide resolved
docs/BUILD-INSTRUCTIONS-MACOS.md Outdated Show resolved Hide resolved
docs/BUILD-INSTRUCTIONS-MACOS.md Outdated Show resolved Hide resolved
docs/BUILD-INSTRUCTIONS-MACOS.md Outdated Show resolved Hide resolved
Commiting updates 2.5 years later.

Co-authored-by: Tommy Poll <Tommy@poolle.co.uk>
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.

6 participants