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

filepaths for Window #216

Open
jacob-roth opened this issue Oct 19, 2023 · 3 comments
Open

filepaths for Window #216

jacob-roth opened this issue Oct 19, 2023 · 3 comments

Comments

@jacob-roth
Copy link

Based on my comment here, I would like to point out that the filepath conventions as used by MATLAB.jl don't really seem to work with Windows. I had to manually hardcode a few places:
build.jl:

libmx_size = filesize(Libdl.dlpath(joinpath(matlab_libpath, "libmx")))
function check_deps()
  if libmx_size != filesize(Libdl.dlpath("C:\\\\Program Files\\\\MATLAB\\\\R2020b\\\\bin\\\\win64\\\\libmx.dll")) #! JR
    error("MATLAB library has changed, re-run Pkg.build(\\\"MATLAB\\\")")
  end
end

MATLAB.jl

libmx_loc = "C:\\Program Files\\MATLAB\\R2020b\\bin\\win64\\libmx.dll"
libmat_loc = "C:\\Program Files\\MATLAB\\R2020b\\bin\\win64\\libmat.dll"
libeng_loc = "C:\\Program Files\\MATLAB\\R2020b\\bin\\win64\\libeng.dll"

I just needed a quick fix, and this seemed to work for me.

@musm
Copy link
Collaborator

musm commented Oct 20, 2023

Hmm interesting, so MATLAB builds and the test suite runs fine?

The error that I am having is related to the library crashing. In other words, it's actually finding all the library paths correctly (I double checked) but when it tries to load them we have a crash

@jacob-roth
Copy link
Author

Now it seems to be having issues... Is there any support for what to do when I receive the following error?

┌ Warning: Confirm MATLAB is installed and discoverable.
└ @ MATLAB C:\Users\roth0674\.julia\packages\MATLAB\5RUjq\src\engine.jl:28
┌ Warning: Ensure `matlab -regserver` has been run in a Command Prompt as Administrator.
└ @ MATLAB C:\Users\roth0674\.julia\packages\MATLAB\5RUjq\src\engine.jl:30
ERROR: LoadError: MATLAB.MEngineError("failed to open MATLAB engine session")

@jacob-roth
Copy link
Author

Hmm interesting, so MATLAB builds and the test suite runs fine?

The error that I am having is related to the library crashing. In other words, it's actually finding all the library paths correctly (I double checked) but when it tries to load them we have a crash

Yes, everything seemed to be fine with this approach at one point. Now having more issues...

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