Using Distributions

Dear Julia Users,

I got a problem with “using Distributions” for Julia 1.0.5. Please see below for details. Any idea would be appreciated.

julia> using Distributions
[ Info: Precompiling Distributions [31c24e10-a181-5473-b8eb-7969acd0382f]
ERROR: LoadError: InitError: /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib/libopenspecfun.1.3.dylib cannot be opened, Please re-run Pkg.build(“SpecialFunctions”), and restart Julia.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] check_deps() at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/deps.jl:20
[3] init() at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/src/SpecialFunctions.jl:12
[4] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:633
[5] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:713
[6] _require(::Base.PkgId) at ./loading.jl:937
[7] require(::Base.PkgId) at ./loading.jl:858
[8] require(::Module, ::Symbol) at ./loading.jl:853
[9] include at ./boot.jl:317 [inlined]
[10] include_relative(::Module, ::String) at ./loading.jl:1044
[11] include(::Module, ::String) at ./sysimg.jl:29
[12] top-level scope at none:2
[13] eval at ./boot.jl:319 [inlined]
[14] eval(::Expr) at ./client.jl:393
[15] top-level scope at ./none:3
during initialization of module SpecialFunctions
in expression starting at /Users/jinzhang/.julia/packages/StatsFuns/dT2Je/src/StatsFuns.jl:6
ERROR: LoadError: Failed to precompile StatsFuns [4c63d2b9-4356-54db-8cca-17b64c39e42c] to /Users/jinzhang/.julia/compiled/v1.0/StatsFuns/530lR.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
[3] _require(::Base.PkgId) at ./loading.jl:960
[4] require(::Base.PkgId) at ./loading.jl:858
[5] require(::Module, ::Symbol) at ./loading.jl:853
[6] include at ./boot.jl:317 [inlined]
[7] include_relative(::Module, ::String) at ./loading.jl:1044
[8] include(::Module, ::String) at ./sysimg.jl:29
[9] top-level scope at none:2
[10] eval at ./boot.jl:319 [inlined]
[11] eval(::Expr) at ./client.jl:393
[12] top-level scope at ./none:3
in expression starting at /Users/jinzhang/.julia/packages/Distributions/dTXqn/src/Distributions.jl:3
ERROR: Failed to precompile Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] to /Users/jinzhang/.julia/compiled/v1.0/Distributions/xILW0.ji.
Stacktrace:
[1] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
[2] _require(::Base.PkgId) at ./loading.jl:960
[3] require(::Base.PkgId) at ./loading.jl:858
[4] require(::Module, ::Symbol) at ./loading.jl:853

julia> Pkg.build(“SpecialFunctions”)
Building SpecialFunctions → ~/.julia/packages/SpecialFunctions/ne2iw/deps/build.log
┌ Error: Error building SpecialFunctions:
│ gfortran -m64 -O2 -fPIC -fPIC -c amos/d1mach.f -o amos/d1mach.f.o
│ make: gfortran: No such file or directory
│ make: *** [amos/d1mach.f.o] Error 1
│ [ Info: Downloading https://github.com/JuliaLang/openlibm/archive/v0.5.4.tar.gz to /var/folders/bz/8pmsngg95qv0t_69m1k242xr0000gn/T/juliadU3i8d-download.gz…
│ [ Info: No hash cache found
│ [ Info: Calculated hash 9a8ae1d17825a4a6a4c013d36a7f4348b27c47eedb6549c521ecc9c79d021c13 for file /var/folders/bz/8pmsngg95qv0t_69m1k242xr0000gn/T/juliadU3i8d-download.gz
│ [ Info: Destination directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src already exists, returning
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/downloads
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/downloads already exists
│ [ Info: Downloading file https://github.com/JuliaLang/openspecfun/archive/v0.5.3.tar.gz
│ [ Info: Done downloading file https://github.com/JuliaLang/openspecfun/archive/v0.5.3.tar.gz
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src already exists
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps already exists
│ [ Info: Path /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src/openspecfun-0.5.3 already exists
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/builds
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/builds already exists
│ [ Info: Changing directory to /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src/openspecfun-0.5.3
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib already exists
│ ERROR: LoadError: LoadError: failed process: Process(make install ARCH=x86_64 'CC=clang -m64' 'FC=gfortran -m64' USECLANG=1 USEGCC=0 USE_OPENLIBM=1 'CFLAGS=-O3 -std=c99' 'FFLAGS=-O2 -fPIC' 'LDFLAGS=-L/Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib ' DESTDIR= prefix= libdir=/Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib includedir=/Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/include O=, ProcessExited(2)) [2]
│ Stacktrace:
│ [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│ [2] pipeline_error at ./process.jl:705 [inlined]
│ [3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:663
│ [4] run(::Cmd) at ./process.jl:661
│ [5] run(::BinDeps.SynchronousStepCollection) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/BinDeps.jl:524
│ [6] run(::FileRule) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/BinDeps.jl:486
│ [7] run(::BinDeps.SynchronousStepCollection) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/BinDeps.jl:524 (repeats 2 times)
│ [8] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/dependencies.jl:951
│ [9] satisfy!(::BinDeps.LibraryDependency) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/dependencies.jl:929
│ [10] top-level scope at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/dependencies.jl:984
│ [11] include at ./boot.jl:317 [inlined]
│ [12] include_relative(::Module, ::String) at ./loading.jl:1044
│ [13] include(::Module, ::String) at ./sysimg.jl:29
│ [14] include(::String) at ./client.jl:392
│ [15] top-level scope at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/build.jl:150
│ [16] include at ./boot.jl:317 [inlined]
│ [17] include_relative(::Module, ::String) at ./loading.jl:1044
│ [18] include(::Module, ::String) at ./sysimg.jl:29
│ [19] include(::String) at ./client.jl:392
│ [20] top-level scope at none:0
│ in expression starting at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/scratch.jl:113
│ in expression starting at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/build.jl:149
[14:22:41] ######################################################################## 100.0%-=O#- # # # [14:22:41] ######################################################################## 100.0% -=O#- # # # [14:22:43] -=O=- # # # #
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096

Did you Pkg.build("SpecialFunctions"), and restart Julia. as the error message asked? Did the building process fail too? With which error message?

Yes, the building process failed. I have the error message included in the previous post. But here you go agin. I uninstalled Julia 1.0.5 and then download and install again. Now the building process works successfully. - quite strange! Anyway here is the error message for the building process

julia> Pkg.build(“SpecialFunctions”)
Building SpecialFunctions → ~/.julia/packages/SpecialFunctions/ne2iw/deps/build.log
┌ Error: Error building SpecialFunctions :
│ gfortran -m64 -O2 -fPIC -fPIC -c amos/d1mach.f -o amos/d1mach.f.o
│ make: gfortran: No such file or directory
│ make: *** [amos/d1mach.f.o] Error 1
│ [ Info: Downloading https://github.com/JuliaLang/openlibm/archive/v0.5.4.tar.gz to /var/folders/bz/8pmsngg95qv0t_69m1k242xr0000gn/T/juliadU3i8d-download.gz…
│ [ Info: No hash cache found
│ [ Info: Calculated hash 9a8ae1d17825a4a6a4c013d36a7f4348b27c47eedb6549c521ecc9c79d021c13 for file /var/folders/bz/8pmsngg95qv0t_69m1k242xr0000gn/T/juliadU3i8d-download.gz
│ [ Info: Destination directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src already exists, returning
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/downloads
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/downloads already exists
│ [ Info: Downloading file https://github.com/JuliaLang/openspecfun/archive/v0.5.3.tar.gz
│ [ Info: Done downloading file https://github.com/JuliaLang/openspecfun/archive/v0.5.3.tar.gz
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src already exists
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps already exists
│ [ Info: Path /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src/openspecfun-0.5.3 already exists
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/builds
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/builds already exists
│ [ Info: Changing directory to /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/src/openspecfun-0.5.3
│ [ Info: Attempting to create directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib
│ [ Info: Directory /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib already exists
│ ERROR: LoadError: LoadError: failed process: Process( make install ARCH=x86_64 'CC=clang -m64' 'FC=gfortran -m64' USECLANG=1 USEGCC=0 USE_OPENLIBM=1 'CFLAGS=-O3 -std=c99' 'FFLAGS=-O2 -fPIC' 'LDFLAGS=-L/Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib ' DESTDIR= prefix= libdir=/Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/lib includedir=/Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/usr/include O= , ProcessExited(2)) [2]
│ Stacktrace:
│ [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│ [2] pipeline_error at ./process.jl:705 [inlined]
│ [3] run#505(::Bool, ::Function, ::Cmd) at ./process.jl:663
│ [4] run(::Cmd) at ./process.jl:661
│ [5] run(::BinDeps.SynchronousStepCollection) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/BinDeps.jl:524
│ [6] run(::FileRule) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/BinDeps.jl:486
│ [7] run(::BinDeps.SynchronousStepCollection) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/BinDeps.jl:524 (repeats 2 times)
│ [8] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/dependencies.jl:951
│ [9] satisfy!(::BinDeps.LibraryDependency) at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/dependencies.jl:929
│ [10] top-level scope at /Users/jinzhang/.julia/packages/BinDeps/QvmEl/src/dependencies.jl:984
│ [11] include at ./boot.jl:317 [inlined]
│ [12] include_relative(::Module, ::String) at ./loading.jl:1044
│ [13] include(::Module, ::String) at ./sysimg.jl:29
│ [14] include(::String) at ./client.jl:392
│ [15] top-level scope at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/build.jl:150
│ [16] include at ./boot.jl:317 [inlined]
│ [17] include_relative(::Module, ::String) at ./loading.jl:1044
│ [18] include(::Module, ::String) at ./sysimg.jl:29
│ [19] include(::String) at ./client.jl:392
│ [20] top-level scope at none:0
│ in expression starting at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/scratch.jl:113
│ in expression starting at /Users/jinzhang/.julia/packages/SpecialFunctions/ne2iw/deps/build.jl:149
[14:22:41] ######################################################################## 100.0%-=O#- # # # [14:22:41] ######################################################################## 100.0% -=O#- # # # [14:22:43] -=O=- # # # #
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096

You do not have the Fortran language compiler gfortran installed, and it is necessary to compile Fortran code embedded inside the Julia package. You seem to use Mac OS, I did never use Mac OS, but it seems there is a way to install gfortran in it.

1 Like