I kind of new in programming. I was following the DifferentialEquations.jl
tutorial with the next function:
lv! = @ode_def LotkaVolterra begin
dx = a*x - b*x*y
dy = -c*y + d*x*y
end a b c d
I noticed I had to install the ParameterizedFunctions.jl
package for using the @ode_def
macro. So I installed it and got the following:
Resolving package versions...
Updating `~/.julia/environments/v1.2/Project.toml`
[65888b18] + ParameterizedFunctions v4.2.1
Updating `~/.julia/environments/v1.2/Manifest.toml`
[65888b18] + ParameterizedFunctions v4.2.1
[123dc426] + SymEngine v0.7.0
So everything seems to be fine. When I try to execute the code for the LotkaVolterra
function I get the following:
LoadError: error compiling #ode_def_opts#1: error compiling symbols: error compiling _symbol: could not load library "libsymengine"
dlopen(libsymengine.dylib, 1): image not found
in expression starting at /Users/jaziel/Libros/ProgramaciΓ³n/Julia/JuliaWorkshop19-master/1_One/EcuacionesDiferencialesTuts.jl:198
ode_def_opts(::Symbol, ::Dict{Symbol,Bool}, ::Expr, ::Symbol, ::Vararg{Symbol,N} where N) at ode_def_opts.jl:5
@ode_def(::LineNumberNode, ::Module, ::Any, ::Any, ::Vararg{Any,N} where N) at macros.jl:11
Then I tried to run ] test ParameterizedFunctions
and get the following:
Testing ParameterizedFunctions
Resolving package versions...
Status `/var/folders/82/z2t8zfh950l8qvwd_7_3k6lc0000gn/T/jl_9V95ZX/Manifest.toml`
[4fba245c] ArrayInterface v1.2.1
[9e28174c] BinDeps v0.8.10
[b99e7846] BinaryProvider v0.5.8
[34da2185] Compat v2.2.0
[864edb3b] DataStructures v0.17.5
[2b5f629d] DiffEqBase v6.4.2
[01453d9d] DiffEqDiffTools v1.4.0
[ffbed154] DocStringExtensions v0.8.1
[069b7b12] FunctionWrappers v1.0.0
[42fd0dbc] IterativeSolvers v0.8.1
[82899510] IteratorInterfaceExtensions v1.0.0
[1914dd2f] MacroTools v0.5.2
[46d2c3a1] MuladdMacro v0.2.1
[bac558e1] OrderedCollections v1.1.0
[65888b18] ParameterizedFunctions v4.2.1
[d96e819e] Parameters v0.12.0
[3cdcf5f2] RecipesBase v0.7.0
[731186ca] RecursiveArrayTools v1.0.2
[f2c3362d] RecursiveFactorization v0.1.0
[ae029012] Requires v0.5.2
[f2b01f46] Roots v0.8.3
[276daf66] SpecialFunctions v0.8.0
[90137ffa] StaticArrays v0.11.1
[123dc426] SymEngine v0.7.0
[3783bdb8] TableTraits v1.0.0
[a2a6695c] TreeViews v0.3.0
[30578b45] URIParser v0.4.0
[2a0f44e3] Base64 [`@stdlib/Base64`]
[ade2ca70] Dates [`@stdlib/Dates`]
[8bb1440f] DelimitedFiles [`@stdlib/DelimitedFiles`]
[8ba89e20] Distributed [`@stdlib/Distributed`]
[b77e0a4c] InteractiveUtils [`@stdlib/InteractiveUtils`]
[76f85450] LibGit2 [`@stdlib/LibGit2`]
[8f399da3] Libdl [`@stdlib/Libdl`]
[37e2e46d] LinearAlgebra [`@stdlib/LinearAlgebra`]
[56ddb016] Logging [`@stdlib/Logging`]
[d6f4376e] Markdown [`@stdlib/Markdown`]
[a63ad114] Mmap [`@stdlib/Mmap`]
[44cfe95a] Pkg [`@stdlib/Pkg`]
[de0858da] Printf [`@stdlib/Printf`]
[3fa0cd96] REPL [`@stdlib/REPL`]
[9a3f8284] Random [`@stdlib/Random`]
[ea8e919c] SHA [`@stdlib/SHA`]
[9e88b42a] Serialization [`@stdlib/Serialization`]
[1a1011a3] SharedArrays [`@stdlib/SharedArrays`]
[6462fe0b] Sockets [`@stdlib/Sockets`]
[2f01184e] SparseArrays [`@stdlib/SparseArrays`]
[10745b16] Statistics [`@stdlib/Statistics`]
[4607b0f0] SuiteSparse [`@stdlib/SuiteSparse`]
[8dfed614] Test [`@stdlib/Test`]
[cf7118a7] UUIDs [`@stdlib/UUIDs`]
[4ec0a83e] Unicode [`@stdlib/Unicode`]
ERROR: LoadError: fatal: error thrown and no exception handler available.
ErrorException("error compiling #showerror: error compiling #showerror#625: error compiling show_backtrace: error compiling show_reduced_backtrace: could not load library "libsymengine"
dlopen(libsymengine.dylib, 1): image not found")
rec_backtrace at /Users/sabae/buildbot/worker/package_macos64/build/src/stackwalk.c:94
record_backtrace at /Users/sabae/buildbot/worker/package_macos64/build/src/task.c:219
jl_throw at /Users/sabae/buildbot/worker/package_macos64/build/src/task.c:429
jl_rethrow_with_add at /Users/sabae/buildbot/worker/package_macos64/build/src/codegen.cpp:793
jl_compile_linfo at /Users/sabae/buildbot/worker/package_macos64/build/src/codegen.cpp:1207
jl_compile_method_internal at /Users/sabae/buildbot/worker/package_macos64/build/src/gf.c:1775
jl_apply_generic at /Users/sabae/buildbot/worker/package_macos64/build/src/gf.c:2196
#showerror#628 at ./errorshow.jl:89
#showerror at ./none:0
unknown function (ip: 0x114da5f81)
show_exception_stack at ./errorshow.jl:652
display_error at ./client.jl:110
display_error at ./client.jl:112
jl_apply at /Users/sabae/buildbot/worker/package_macos64/build/src/./julia.h:1614 [inlined]
jl_f__apply at /Users/sabae/buildbot/worker/package_macos64/build/src/builtins.c:563
jl_f__apply_latest at /Users/sabae/buildbot/worker/package_macos64/build/src/builtins.c:601
#invokelatest#1 at ./essentials.jl:790 [inlined]
invokelatest at ./essentials.jl:789 [inlined]
_start at ./client.jl:466
true_main at /Applications/Julia-1.2.app/Contents/Resources/julia/bin/julia (unknown line)
main at /Applications/Julia-1.2.app/Contents/Resources/julia/bin/julia (unknown line)
ERROR: Package ParameterizedFunctions errored during testing
Looking for a solution to this problem, I tried building the SymEngine
package with ] build SymEngine
and get the following:
Building SpecialFunctions β `~/.julia/packages/SpecialFunctions/ne2iw/deps/build.log`
Building SymEngine ββββββββ `~/.julia/packages/SymEngine/zSUGO/deps/build.log`
β Error: Error building `SymEngine`:
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libgmp.10.dylib
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libmpfr.6.dylib
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libmpc.3.dylib
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libsymengine.0.4.0.dylib
β [ Info: Found a valid dl path libgmp.10.dylib while looking for libgmp
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libgmp.10.dylib matches our search criteria of libgmp
β [ Info: Found a valid dl path libgmp.10.dylib while looking for libmpfr
β [ Info: Found a valid dl path libgmp.dylib while looking for libmpfr
β [ Info: Found a valid dl path libgmpxx.4.dylib while looking for libmpfr
β [ Info: Found a valid dl path libgmpxx.dylib while looking for libmpfr
β [ Info: Found a valid dl path libmpc.3.dylib while looking for libmpfr
β [ Info: Found a valid dl path libmpc.dylib while looking for libmpfr
β [ Info: Found a valid dl path libmpfr.6.dylib while looking for libmpfr
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libmpfr.6.dylib matches our search criteria of libmpfr
β [ Info: Found a valid dl path libgmp.10.dylib while looking for libmpc
β [ Info: Found a valid dl path libgmp.dylib while looking for libmpc
β [ Info: Found a valid dl path libgmpxx.4.dylib while looking for libmpc
β [ Info: Found a valid dl path libgmpxx.dylib while looking for libmpc
β [ Info: Found a valid dl path libmpc.3.dylib while looking for libmpc
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libmpc.3.dylib matches our search criteria of libmpc
β [ Info: Found a valid dl path libgmp.10.dylib while looking for libsymengine
β [ Info: Found a valid dl path libgmp.dylib while looking for libsymengine
β [ Info: Found a valid dl path libgmpxx.4.dylib while looking for libsymengine
β [ Info: Found a valid dl path libgmpxx.dylib while looking for libsymengine
β [ Info: Found a valid dl path libmpc.3.dylib while looking for libsymengine
β [ Info: Found a valid dl path libmpc.dylib while looking for libsymengine
β [ Info: Found a valid dl path libmpfr.6.dylib while looking for libsymengine
β [ Info: Found a valid dl path libmpfr.dylib while looking for libsymengine
β [ Info: Found a valid dl path libsymengine.0.4.0.dylib while looking for libsymengine
β [ Info: /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/libsymengine-0.4/lib/libsymengine.0.4.0.dylib matches our search criteria of libsymengine
β ERROR: LoadError: SystemError: opening file "/Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/deps.jl": Permission denied
β Stacktrace:
β [1] #systemerror#44(::Nothing, ::typeof(systemerror), ::String, ::Bool) at ./error.jl:134
β [2] systemerror at ./error.jl:134 [inlined]
β [3] #open#311(::Nothing, ::Nothing, ::Nothing, ::Bool, ::Nothing, ::typeof(open), ::String) at ./iostream.jl:289
β [4] #open at ./none:0 [inlined]
β [5] open(::String, ::String) at ./iostream.jl:345
β [6] #open#312(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(open), ::getfield(BinaryProvider, Symbol("##154#158")){Bool,String,Array{LibraryProduct,1},getfield(BinaryProvider, Symbol("##153#157")),SubString{String}}, ::String, ::Vararg{String,N} where N) at ./iostream.jl:373
β [7] open at ./iostream.jl:373 [inlined]
β [8] #write_deps_file#152(::Bool, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at /Users/jaziel/.julia/packages/BinaryProvider/kcGxO/src/Products.jl:419
β [9] write_deps_file(::String, ::Array{LibraryProduct,1}) at /Users/jaziel/.julia/packages/BinaryProvider/kcGxO/src/Products.jl:395
β [10] top-level scope at /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/build.jl:60
β [11] include at ./boot.jl:328 [inlined]
β [12] include_relative(::Module, ::String) at ./loading.jl:1094
β [13] include(::Module, ::String) at ./Base.jl:31
β [14] include(::String) at ./client.jl:431
β [15] top-level scope at none:5
β in expression starting at /Users/jaziel/.julia/packages/SymEngine/zSUGO/deps/build.jl:60
β @ Pkg.Operations /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.2/Pkg/src/backwards_compatible_isolation.jl:647
Iβve tried other solutions I found, so I really donβt know what else can I do. Any suggestions?
If it is of any use, my configuration is:
Julia Version 1.2.0
Commit c6da87ff4b (2019-08-20 00:03 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.6.0)
CPU: Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = atom -a
JULIA_NUM_THREADS = 2