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

Build on macOS Big Sur fails unless QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 #41

Closed
mschollmeier opened this issue Dec 9, 2020 · 6 comments
Labels
build error Compilation and linking errors

Comments

@mschollmeier
Copy link

Without setting the MacOS version equal to or higher than 10.14, the build fails because certain std::variant functionalities were not available before 10.14.
Specifically, in occ_static_variables_rollback.cpp, the std::get<T>(record.value) in lines 97, 99, 101 throws an error message " occ_static_variables_rollback.cpp:97:71: error: 'get<int, int, double, std::__1::basic_string >' is unavailable: introduced in macOS 10.14
variant:1394:22: note: 'get<int, int, double, std::__1::basic_string >' has been explicitly marked unavailable here"

This can be fixed by updating mayo.pro with

macx {
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
}
@HuguesDelorme
Copy link
Member

HuguesDelorme commented Dec 9, 2020

Hello Marius,

Thanks for reporting this, I never tried to build on MacOS so your feedback is very valuable.
I have a question : does Mayo build and run fine on MacOS with your fix ?
If so then I would love to see a pull request from you I can merge into Mayo.

Greetings!

@mschollmeier
Copy link
Author

Yes, it works just fine under MacOS, using Qt Creator and the latest Qt 5.x to build.
I'll fork it and prepare a pull request.

@mschollmeier
Copy link
Author

mschollmeier commented Dec 10, 2020

Took longer than expected because my local copy was a few months behind. I've created a pull request here: #42.

Apparently, you removed -lTKXSDRAW from mayo.pro in commit 9bcf9d2, which breaks Mayo for MacOS. Without this lib the app still compiles successfully but goes into an infinite loop that starts consuming all system RAM when executed.
With -lTKXSDRAW it works fine, using the latest dev version of Mayo, MacOS 11.0.1 (Big Sur), Xcode 11.7, Qt 5.14.2.

In anybody else reads this, Xcode 12 is not officially supported by Qt at the moment of this writing.

@mschollmeier
Copy link
Author

AdjustableWrenchMAyoMacOS

@HuguesDelorme
Copy link
Member

That's great!
I'm surprised the QWidget/OpenCascade bridge works "as-is" for macOS
Many thanks for the PR and that screenshot!

@mschollmeier
Copy link
Author

You're welcome. Thank you for creating Mayo!

@HuguesDelorme HuguesDelorme added the build error Compilation and linking errors label Dec 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build error Compilation and linking errors
Projects
None yet
Development

No branches or pull requests

2 participants