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

Library/kernel finding #18

Open
simonbyrne opened this issue Sep 4, 2019 · 6 comments · May be fixed by #68
Open

Library/kernel finding #18

simonbyrne opened this issue Sep 4, 2019 · 6 comments · May be fixed by #68

Comments

@simonbyrne
Copy link
Member

Need to make sure library/kernel finding code works with both Mathematica and Wolfram Engine on Linux and Windows.

@simonbyrne
Copy link
Member Author

@BeastyBlacksmith This didn't seem to work for you on Linux: where/how did you install it? Is the math executable in your path?

@BeastyBlacksmith
Copy link
Contributor

Mathematica is installed by the IT department on a network drive. Both math and mathematica are on the path by default.

@simonbyrne
Copy link
Member Author

Nice, so we should be able to use that to find the correct path.

@simonbyrne
Copy link
Member Author

@BeastyBlacksmith Can you check if the following gives the correct paths?

archdir = Sys.ARCH == :arm ?    "Linux-ARM" :
          Sys.ARCH == :x86_64 ? "Linux-x86-64" :
                                "Linux"
basepath = String(read(pipeline(`math -noprompt`, stdin=IOBuffer("WriteString[\$Output,\$InstallationDirectory]"))))

lib = Libdl.find_library(
    ["libML$(Sys.WORD_SIZE)i4","libML$(Sys.WORD_SIZE)i3"],
    [joinpath(basepath,"SystemFiles/Links/MathLink/DeveloperKit",archdir,"CompilerAdditions")])
ker = joinpath(basepath,"Executables/MathKernel")

@BeastyBlacksmith
Copy link
Contributor

this works on my machine

@simonbyrne
Copy link
Member Author

simonbyrne commented Sep 11, 2019

I have improved the Linux handling in #27. I would still like to improve the handling on Windows: if anyone wants to help out, I would appreciate if you could install Mathematica or Wolfram Engine, then look in the Windows registry to find the entries which give the installation path.

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 a pull request may close this issue.

2 participants