ModiaSim / Modia.jl

Modeling and simulation of multidomain engineering systems
MIT License
319 stars 37 forks source link

Modia crashing "using Modia" #145

Closed Noxdor closed 2 years ago

Noxdor commented 2 years ago

I am new to Julia and Modia and wanted to try out this library. Unfortunately, running using Modia and already during the package installation (I guess Julia pre-compiles packages after download) I am getting an error message:

ERROR: LoadError: InitError: could not load library "/home/myname/.julia/artifacts/cb7fc2801ca0133a5bdea4bc4585d07c08284cfa/lib/libsundials_sunlinsollapackband.so"
libopenblas64_.so: cannot open shared object file: No such file or directory
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
 [2] __init__()
   @ Sundials_jll ~/.julia/packages/Sundials_jll/rXn1i/src/wrappers/x86_64-linux-gnu-libgfortran5.jl:99
 [3] top-level scope (repeats 2 times)
   @ none:1
during initialization of module Sundials_jll
in expression starting at /home/myname/.julia/packages/Sundials/k9hc3/src/Sundials.jl:3
ERROR: LoadError: Failed to precompile Sundials [c3572dad-4567-51f8-b174-8c6c989267f4] to /home/myname/.julia/compiled/v1.7/Sundials/jl_moo3sg.
Stacktrace:
 [1] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/myname/.julia/packages/DifferentialEquations/4jfQK/src/DifferentialEquations.jl:1
ERROR: LoadError: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to /home/myname/.julia/compiled/v1.7/DifferentialEquations/jl_s6Folu.
Stacktrace:
 [1] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/myname/.julia/packages/Modia/2gNMw/src/Modia.jl:1
ERROR: Failed to precompile Modia [cb905087-75eb-5f27-8515-1ce0ec8e839e] to /home/myname/.julia/compiled/v1.7/Modia/jl_Q5KSor.

What is the cause of this error and how can I fix it to use this library?

ChrisRackauckas commented 2 years ago

Install Julia using a standard binary https://julialang.org/downloads/

Noxdor commented 2 years ago

Thanks! That worked. Could you elaborate why this works or point me to the part in the documentation where this is explained? It is quite comfortable and useful to let the package manager handle the download and up-to-date-keeping, so I am wondering why this is not the recommended path for Julia. Are there optional dependencies that are coming bundles with a manual install?

ChrisRackauckas commented 2 years ago

Let me guess, you use Arch Linux? That package manager purposely builds and ships a broken version of Julia for god knows what reason, and for some reason sane minds aren't allowed to fix it. See https://github.com/SciML/Sundials.jl/issues/334 .

We were able to put a notice in the package manager that the build is broken.

https://wiki.archlinux.org/title/Julia#Installation

Sadly, the way Arch Linux likes to operate is that they would prefer to have a broken build with a warning not to use it, rather than merge the fix. Insane operating system if you ask me haha 🤷‍♂️

Noxdor commented 2 years ago

Yes you guessed correctly! 😂 I fully agree with you that this is insane! Hope minds will change regarding this kind of thinking. Besides that I can't agree with you that it is an insane operating system (distribution), I overall have a great experience with Arch Linux 😬 Anyway, thank you a lot for your detailed explanation, unfortunately stuff like this is always an unnecessary hindering for beginners with a new language.