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

Add additional possible path for Mathematica on MacOS #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dahong67
Copy link

Thanks for the very nice package!

Issue

Installation on my machine initially failed with the following message during the package build:

ERROR: Error building `MathLink`: 
ERROR: LoadError: Could not find Mathematica or Wolfram Engine installation.
Please set the `JULIA_MATHLINK` and `JULIA_MATHKERNEL` variables.

For some context, I'm on an M1 Max Macbook Pro and running macOS Sequoia 15.2. I get the following under "About Wolfram" when I look in Mathematica (though "Mathematica" seems to be called "Wolfram for Desktop" now?):

  • Version Number: 14.1.0.0
  • Platform: Mac OS X ARM (64-bit)

Investigating the paths, it seems that what my machine needed was:

  • ENV["JULIA_MATHLINK"] = joinpath(path, "Contents/Frameworks/mathlink.framework/mathlink")
  • ENV["JULIA_MATHKERNEL"] = joinpath(path, "Contents/MacOS/MathKernel")

where path was the output of mdfind "kMDItemCFBundleIdentifier == 'com.wolfram.*'" (/Applications/Wolfram.app on my machine). Guessing it has to do with Wolfram renaming some of these things in recent versions?

What this PR implements

This PR simply adds this case to the list of cases considered in deps/build.jl.

I figure that adding to the end of the list has the least chance of breaking cases that are already working, but perhaps the better fix would be to change

for path in readlines(`mdfind "kMDItemCFBundleIdentifier == 'com.wolfram.Mathematica'"`)

to instead be

for path in readlines(`mdfind "kMDItemCFBundleIdentifier == 'com.wolfram.*'"`)

Also, I saw that @simonbyrne is implementing what looks to be a better long-term solution in #68. However, that seems to currently be blocked by something on the Wolfram side (if I'm understanding correctly), so perhaps this can be useful to some folks in the meantime?

Seems to be what is needed for Wolfram Mathematica 14.1 on MacOS.
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