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

Linux: could not find installation #51

Open
simonbyrne opened this issue Mar 27, 2023 · 3 comments
Open

Linux: could not find installation #51

simonbyrne opened this issue Mar 27, 2023 · 3 comments

Comments

@simonbyrne
Copy link

I tried using this on our local cluster (Linux), which provides several different Mathematica versions via modules. I tried it with Mathematica 12.3 (which happened to be the most recent version available).

  1. It was initially unable to find the installation:

    $ wolfram-app-discovery default
    warning: error looking for Wolfram apps in '/usr/local/Wolfram': No such file or directory (os error 2)
    warning: error looking for Wolfram apps in '/opt/Wolfram': No such file or directory (os error 2)
    Error: Error(Undiscoverable { resource: "default Wolfram Language installation", environment_variable:    Some("WOLFRAM_APP_DIRECTORY") })
    

    this is despite the binary directory being in the PATH. For example:

    WolframKernel -noprompt -run "WriteString[\$Output,\$InstallationDirectory];Exit[]"
    

    gives me the correct directory.

  2. I then set the WOLFRAM_APP_DIRECTORY environment variable. This then gave the following error:

    $ wolfram-app-discovery default
    Error: Error(Other("Unable to determine Wolfram app type from LICENSE.txt: first line was: \"Wolfram Mathematica License Agreement\""))
    
@ConnorGray
Copy link
Collaborator

Hi Simon, thanks for filing this issue.

Re. (1) wolfram-app-discovery doesn't currently check for any Wolfram executables on PATH other than wolframscript. In your use-case, is WolframKernel specifically the only executable you'd expect wolfram-app-discovery to be able to use to find local Wolfram installations? I think that seems like a reasonable feature.

Re. (2) This is bug in wolfram-app-discovery. Currently on Linux there isn't any kind of common app metadata file that can be read to determine the precise app type, so as the quoted error message suggests, wolfram-app-discovery falls back to trying to parse LICENSE.txt, which is one of the few places where our build process embeds the precise name of the app.

I'll make a PR updating wolfram-app-discovery to recognize the quoted line as Mathematica and ping this issue when that's done.

ConnorGray added a commit that referenced this issue Mar 28, 2023
This should fix one problem mentioned in issue #51.
ConnorGray added a commit that referenced this issue Mar 28, 2023
@ConnorGray
Copy link
Collaborator

Hi Simon, I've implemented a fix for your (2) issue (PR #52), and published wolfram-app-discovery v0.4.4 with the fix.

Let me know if (2) still persists with this new version.

Fixing (1) will require a little bit more thought than I can implement in a quick fix like this, but seems fundamentally doable.

@simonbyrne
Copy link
Author

Thanks!

There are 3 installations of mathematica on our cluster (11.1, 12.0, 12.3). 12.0 and 12.3 have the following execuables in the bin directory (which is the one the module puts in the PATH):

math  mathematica  Mathematica  MathKernel  mcc  wolfram  WolframKernel

and 11.1 has the following

math         Mathematica        MathKernel  wolfram        wolframscript
mathematica  MathematicaScript  mcc         WolframKernel  WolframScript

Interestingly, on 12.0 and 12.3, the Executables directory has

math  mathematica  Mathematica  MathKernel  mcc  wolfram  WolframKernel  wolframscript

but not on 11.1, which only has:

math  mathematica  Mathematica  MathKernel  mcc  wolfram  WolframKernel

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

No branches or pull requests

2 participants