-
Notifications
You must be signed in to change notification settings - Fork 65
Search standard directory for Linux systems #197
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
Conversation
Hmmm, I did this and it errored on the build: julia> ENV["MATLAB_ROOT"] = ""
""
(@v1.7) pkg> activate --temp
Activating new project at `/tmp/jl_xeGpQQ`
(jl_xeGpQQ) pkg> add MATLAB#linxu
Updating git-repo `https://github.com/JuliaInterop/MATLAB.jl.git`
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `/tmp/jl_xeGpQQ/Project.toml`
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
Updating `/tmp/jl_xeGpQQ/Manifest.toml`
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
[56f22d72] + Artifacts
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[2f01184e] + SparseArrays
[4536629a] + OpenBLAS_jll
[8e850b90] + libblastrampoline_jll
Building MATLAB → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/a4d75c3a73b5ccb4e4c29130859ee32a8ec19636/build.log`
ERROR: Error building `MATLAB`:
ERROR: LoadError: could not load library "bin/glnxa64/libmx"
bin/glnxa64/libmx.so: cannot open shared object file: No such file or directory
Stacktrace:
[1] dlopen (repeats 2 times)
@ ./libdl.jl:117 [inlined]
[2] dlpath(libname::String)
@ Base.Libc.Libdl ./libdl.jl:240
[3] top-level scope
@ ~/.julia/packages/MATLAB/XzriZ/deps/build.jl:79
[4] include(fname::String)
@ Base.MainInclude ./client.jl:451
[5] top-level scope
@ none:5
in expression starting at /home/yakir/.julia/packages/MATLAB/XzriZ/deps/build.jl:76
|
Try again if possible. That's because
sets it to an empty string. I've updated the PR to ignore this. |
(@v1.7) pkg> activate --temp
Activating new project at `/tmp/jl_JqChH1`
julia> ENV["MATLAB_ROOT"] = ""
""
(jl_JqChH1) pkg> add MATLAB#linxu
Updating git-repo `https://github.com/JuliaInterop/MATLAB.jl.git`
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `/tmp/jl_JqChH1/Project.toml`
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
Updating `/tmp/jl_JqChH1/Manifest.toml`
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
[56f22d72] + Artifacts
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[2f01184e] + SparseArrays
[e66e0078] + CompilerSupportLibraries_jll
[4536629a] + OpenBLAS_jll
[8e850b90] + libblastrampoline_jll
Building MATLAB → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/7566e213f88e2a8c23a9fb70d384e62bdddfd412/build.log`
ERROR: Error building `MATLAB`:
[ Info: Detected MATLAB root folder at "/usr/local"
[ Info: Detected MATLAB executable at "/usr/local/bin/matlab"
ERROR: LoadError: could not load library "/usr/local/bin/glnxa64/libmx"
/usr/local/bin/glnxa64/libmx.so: cannot open shared object file: No such file or directory |
Hmm that's really strange, I've specified it to search in Ensure both MATLAB_HOME and MATLAB_ROOT are unset
|
any luck with that? |
As you can see, I'm on the latest linxu branch of MATLAB, and set both env variables to julia> ENV["MATLAB_HOME"] = nothing
julia> ENV["MATLAB_ROOT"] = nothing
(@v1.7) pkg> activate --temp
Activating new project at `/tmp/jl_Ayik6W`
(jl_Ayik6W) pkg> dev MATLAB
Resolving package versions...
Updating `/tmp/jl_Ayik6W/Project.toml`
[10e44e05] + MATLAB v0.8.2 `~/.julia/dev/MATLAB`
Updating `/tmp/jl_Ayik6W/Manifest.toml`
[10e44e05] + MATLAB v0.8.2 `~/.julia/dev/MATLAB`
[56f22d72] + Artifacts
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[2f01184e] + SparseArrays
[e66e0078] + CompilerSupportLibraries_jll
[4536629a] + OpenBLAS_jll
[8e850b90] + libblastrampoline_jll
(jl_Ayik6W) pkg> st
Status `/tmp/jl_Ayik6W/Project.toml`
[10e44e05] MATLAB v0.8.2 `~/.julia/dev/MATLAB`
(jl_Ayik6W) pkg> build MATLAB
Building MATLAB → `~/.julia/dev/MATLAB/deps/build.log`
ERROR: Error building `MATLAB`:
ERROR: LoadError: could not load library "nothing/bin/glnxa64/libmx"
nothing/bin/glnxa64/libmx.so: cannot open shared object file: No such file or directory
Stacktrace:
[1] dlopen (repeats 2 times)
@ ./libdl.jl:117 [inlined]
[2] dlpath(libname::String)
@ Base.Libc.Libdl ./libdl.jl:240
[3] top-level scope
@ ~/.julia/dev/MATLAB/deps/build.jl:79
[4] include(fname::String)
@ Base.MainInclude ./client.jl:451
[5] top-level scope
@ none:5
in expression starting at /home/yakir/.julia/dev/MATLAB/deps/build.jl:76
shell> cd .julia/dev/MATLAB/
/home/yakir/.julia/dev/MATLAB
shell> git status
On branch linxu
Your branch is up to date with 'origin/linxu'.
nothing to commit, working tree clean
|
Very, very strange. Thanks for checking. I do not see how that could happen, since we check if isnothing(matlab_root) || isempty(matlab_root)
matlab_exe = Sys.which("matlab")
if !isnothing(matlab_exe) |
I'm not sure what else I can try over here... Here is a careful attempt with 1.7.2. Let me know if you can think of anything else I should check or try,,, yakir@luna:~$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.2 (2022-02-06)
_/ |\__'_|_|_|\__'_| |
|__/ |
julia> ENV["MATLAB_HOME"] = nothing
julia> ENV["MATLAB_ROOT"] = nothing
(@v1.7) pkg> st
Status `~/.julia/environments/v1.7/Project.toml`
[6e4b80f9] BenchmarkTools v1.2.2
[5789e2e9] FileIO v1.13.0
[82e4d734] ImageIO v0.6.1
[14b8a8f1] PkgTemplates v0.7.26
[295af30f] Revise v3.3.1
(@v1.7) pkg> activate --temp
Activating new project at `/tmp/jl_cl6bMG`
(jl_cl6bMG) pkg> add MATLAB#linxu
Updating git-repo `https://github.com/JuliaInterop/MATLAB.jl.git`
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `/tmp/jl_cl6bMG/Project.toml`
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
Updating `/tmp/jl_cl6bMG/Manifest.toml`
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
[56f22d72] + Artifacts
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[2f01184e] + SparseArrays
[e66e0078] + CompilerSupportLibraries_jll
[4536629a] + OpenBLAS_jll
[8e850b90] + libblastrampoline_jll
Precompiling project...
✗ MATLAB
3 dependencies successfully precompiled in 1 seconds
1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
(jl_cl6bMG) pkg> precompile
Precompiling project...
✗ MATLAB
0 dependencies successfully precompiled in 1 seconds (3 already precompiled)
ERROR: The following 1 direct dependency failed to precompile:
MATLAB [10e44e05-a98a-55b3-a45b-ba969058deb6]
Failed to precompile MATLAB [10e44e05-a98a-55b3-a45b-ba969058deb6] to /home/yakir/.julia/compiled/v1.7/MATLAB/jl_kKaQWg.
ERROR: LoadError: MATLAB is not properly installed. Please run Pkg.build("MATLAB") and restart Julia.
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/MATLAB/TMHAJ/src/MATLAB.jl:40
[2] top-level scope (repeats 2 times)
@ none:1
in expression starting at /home/yakir/.julia/packages/MATLAB/TMHAJ/src/MATLAB.jl:1
(jl_cl6bMG) pkg> build MATLAB
Building MATLAB → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/7566e213f88e2a8c23a9fb70d384e62bdddfd412/build.log`
ERROR: Error building `MATLAB`:
ERROR: LoadError: could not load library "nothing/bin/glnxa64/libmx"
nothing/bin/glnxa64/libmx.so: cannot open shared object file: No such file or directory
Stacktrace:
[1] dlopen (repeats 2 times)
@ ./libdl.jl:117 [inlined]
[2] dlpath(libname::String)
@ Base.Libc.Libdl ./libdl.jl:240
[3] top-level scope
@ ~/.julia/packages/MATLAB/TMHAJ/deps/build.jl:79
[4] include(fname::String)
@ Base.MainInclude ./client.jl:451
[5] top-level scope
@ none:5
in expression starting at /home/yakir/.julia/packages/MATLAB/TMHAJ/deps/build.jl:76 |
Could you unset the variables |
|
would be the correct commands within Julia, if the variables are already set. |
I tried deleting (cool!) but it didn't work: (@v1.7) pkg> activate --temp
Activating new project at `/tmp/jl_zZpWtw`
julia> delete!(ENV, "MATLAB_HOME");
julia> delete!(ENV, "MATLAB_ROOT");
(jl_zZpWtw) pkg> add MATLAB#linxu
Updating git-repo `https://github.com/JuliaInterop/MATLAB.jl.git`
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
Updating `/tmp/jl_zZpWtw/Manifest.toml`
[10e44e05] + MATLAB v0.8.2 `https://github.com/JuliaInterop/MATLAB.jl.git#linxu`
[56f22d72] + Artifacts
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[2f01184e] + SparseArrays
[e66e0078] + CompilerSupportLibraries_jll
[4536629a] + OpenBLAS_jll
[8e850b90] + libblastrampoline_jll
Precompiling project...
✗ MATLAB
0 dependencies successfully precompiled in 1 seconds (3 already precompiled)
1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
(jl_zZpWtw) pkg> build MATLAB
Building MATLAB → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/7566e213f88e2a8c23a9fb70d384e62bdddfd412/build.log`
ERROR: Error building `MATLAB`:
[ Info: Detected MATLAB root folder at "/usr/local"
[ Info: Detected MATLAB executable at "/usr/local/bin/matlab"
ERROR: LoadError: could not load library "/usr/local/bin/glnxa64/libmx"
/usr/local/bin/glnxa64/libmx.so: cannot open shared object file: No such file or directory
Stacktrace:
[1] dlopen (repeats 2 times)
@ ./libdl.jl:117 [inlined]
[2] dlpath(libname::String)
@ Base.Libc.Libdl ./libdl.jl:240
[3] top-level scope
@ ~/.julia/packages/MATLAB/TMHAJ/deps/build.jl:79
[4] include(fname::String)
@ Base.MainInclude ./client.jl:451
[5] top-level scope
@ none:5
in expression starting at /home/yakir/.julia/packages/MATLAB/TMHAJ/deps/build.jl:76 |
That's progress, I think the last commit probably fixed it. It's using the location
that should be true |
any chance you could try again? I think I finally fixed it. |
Sorry for the slow response: Yes! It all works now!!! 🥳 |
Great thanks for your help in fixing this. It's certainly a lot harder without a matlab license to check these things... |
close #194
@yakir12 Any chance you want to test this out?