Skip to content

Fix/macos build m1#63

Merged
nikosai merged 8 commits into
developfrom
fix/macos-build-M1
Mar 3, 2026
Merged

Fix/macos build m1#63
nikosai merged 8 commits into
developfrom
fix/macos-build-M1

Conversation

@nikosai

@nikosai nikosai commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

k-ueda and others added 8 commits March 1, 2026 21:40
Build fixes (src/Makefile.common, src/core/Makefile):
- Detect Boost prefix via `brew --prefix boost` on Darwin instead of
  hardcoding /usr/local, which is not used on Apple Silicon
- Update default MATHPATH to Wolfram Engine app bundle
- Drop -mt suffix from boost_program_options on Darwin (removed in Boost 1.69+)

Runtime fix (src/core/symbolic_simulate.cpp, src/core/ProgramOptions.cpp):
- Double-quote the kernel path in the WSTP linkname string so paths
  containing spaces (e.g. "Wolfram Engine.app") are parsed correctly
- Add detect_math_kernel() on macOS to auto-detect the Wolfram kernel
  at runtime: tries `math` in PATH (licensed Mathematica) first, then
  Mathematica.app, then Wolfram Engine.app bundle, then falls back to `math`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix CXX defaulting to broken GCC 14 (built for darwin23, running on
  darwin24): replace `CXX ?= clang++` with $(origin) check so Make's
  built-in default 'c++' is overridden while user-set CXX is respected
- Fix detect_math_kernel() to prefer native WolframKernel binaries in
  app bundles over the 'math' shell script wrapper in PATH, which WSTP
  cannot use as a kernel process

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use ?= instead of origin checks to set default compilers, matching
the develop branch approach. This allows better user override flexibility
while providing clang/clang++ defaults.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
CC is not used since the codebase contains no .c files (only .cc/.cpp).
Keep the line commented for future reference.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Extend Wolfram auto-detection from macOS to Ubuntu
- Auto-detect MATHPATH in Makefile for latest installation
- Auto-detect math kernel at runtime for Ubuntu
- Simplify Ubuntu build from 6 steps to 5 steps
- Use system compiler defaults (g++ Ubuntu, clang++ macOS)
- Add fallback manual configuration for edge cases

This provides a consistent cross-platform build experience while
maintaining full user override capabilities.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nikosai nikosai merged commit 124b439 into develop Mar 3, 2026
4 checks passed
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.

2 participants