Skip to content

Fix build on macOS: Apple clang C++ standard and PyQt6 tools detection - #169

Open
florian-simvia wants to merge 2 commits into
code-saturne:masterfrom
florian-simvia:fix/macos-build
Open

Fix build on macOS: Apple clang C++ standard and PyQt6 tools detection#169
florian-simvia wants to merge 2 commits into
code-saturne:masterfrom
florian-simvia:fix/macos-build

Conversation

@florian-simvia

Copy link
Copy Markdown
Contributor

Building from source on macOS currently fails for two unrelated reasons.

Apple clang version numbers don't follow LLVM's, and its default standard is still C++14, so the 14* | 15* test in cs_auto_flags.sh doesn't catch it and compilation stops on std::is_same_v in cs_defs.h. I added a case for version strings containing Apple to force -std=c++17.

In configure.ac, a typo (xPyQt5 instead of xPyQt6) disables the detection of the PyQt6 dev tools, so GUI builds with PyQt6 fail with --pyrcc must be set. This affects Linux too, not just macOS. configure must be regenerated with ./sbin/bootstrap.

With these two changes, I get a complete build (solver + GUI) on macOS 15.7/Apple Silicon with the Homebrew toolchain, PyQt6 and --diable-shared, and cases run fine.

Apple clang version numbers don't follow the LLVM's and its default standard is still C++14, so the version test in cs_auto_flag.sh missed it and compilation stopped on std::is_same_v in cs_defs.h. Force -std=c++17 when the compiler identifies as Apple.

In configure.ac, a typo ("xPyQt5" instead of "xPyQt6") disabled the detection of the PyQt6 dev tools, so GUI builds with PyQt6 failed with "--pyrcc must be set". Affects Linux too, not just macOS. configure must be regenerated with ./sbin/bootstrap.
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.

1 participant