中野智文のブログ

データ・マエショリスト(※データ・マエストロではない)のメモ

自宅macのJuliaLang環境を治す(3)

nakano-tomofumi.hatenablog.com

の続き

ちょっと変化があった。

$ brew test -v julia
Testing staticfloat/julia/julia
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20170526-45995-169fe4y.sb /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/staticfloat/homebrew-julia/julia.rb -v
==> /usr/local/Cellar/julia/0.5.1/bin/julia -e Base.runtests("core")
WARNING: Error during initialization of module CHOLMOD:
ErrorException("could not load library "libcholmod"
dlopen(libcholmod.dylib, 1): Library not loaded: /usr/local/opt/openblas-julia/lib/libopenblasp-r0.2.19.dylib
  Referenced from: /usr/local/Cellar/julia/0.5.1/lib/julia/libcholmod.dylib
  Reason: image not found")
WARNING: Error during initialization of module CHOLMOD:
ErrorException("could not load library "libcholmod"
dlopen(libcholmod.dylib, 1): Library not loaded: /usr/local/opt/openblas-julia/lib/libopenblasp-r0.2.19.dylib
  Referenced from: /usr/local/Cellar/julia/0.5.1/lib/julia/libcholmod.dylib
  Reason: image not found")
     * core                 WARNING: Method definition f(Tuple{Vararg{Int64, #N<:Any}}, AbstractArray{#T<:Any, #N<:Any}) in module Main at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:723 overwritten at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:729.
WARNING: Method definition f() in module JLCall14301 at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:3546 overwritten at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:3556.
WARNING: static parameter T does not occur in signature for bad_tvars at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:4621.
The method will not be callable.
 in  28.85 seconds, maxrss 1427.54 MB
    SUCCESS

--build-from-source が大事

そもそも、せっかく source からコンパイルしたopenblastのライブラリを使ってないのじゃないの? という疑惑がわく。julia 本体も、--build-from-source をつけてインストール。

$ brew reinstall --build-from-source julia
...
🍺  /usr/local/Cellar/julia/0.5.1: 753 files, 140.5MB, built in 8 minutes 8 seconds
$ brew test -v julia
Testing staticfloat/julia/julia
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20170526-98332-164n2k7.sb /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/staticfloat/homebrew-julia/julia.rb -v
==> /usr/local/Cellar/julia/0.5.1/bin/julia -e Base.runtests("core")
     * core                 WARNING: Method definition f(Tuple{Vararg{Int64, #N<:Any}}, AbstractArray{#T<:Any, #N<:Any}) in module Main at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:723 overwritten at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:729.
WARNING: Method definition f() in module JLCall14301 at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:3546 overwritten at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:3556.
WARNING: static parameter T does not occur in signature for bad_tvars at /usr/local/Cellar/julia/0.5.1/share/julia/test/core.jl:4621.
The method will not be callable.
 in  28.77 seconds, maxrss 1426.77 MB
    SUCCESS

ちょっと時間がかかったけど、インストールは多少の警告は出るもののうまくいったぽい。

めでたしめでたし。

補足

これまでの苦労が全くのムダのようなことが…

nakano-tomofumi.hatenablog.com