Build MKL出错

已挂梯子,可正常科学上网
julia版本信息如下:

julia> using InteractiveUtils; versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 4

julia> using Pkg; Pkg.status()
Status `C:\Users\Whale fall\.julia\environments\v1.4\Project.toml`
  [ba4760a4] BayesNets v3.2.2
  [6e4b80f9] BenchmarkTools v0.5.0
  [ad839575] Blink v0.12.3
  [336ed68f] CSV v0.6.2
  [a93c6f00] DataFrames v0.21.3
  [7806a523] DecisionTree v0.10.5
  [b4f34e82] Distances v0.8.2
  [31c24e10] Distributions v0.23.4
  [e30172f5] Documenter v0.24.11
  [f9630f5b] ECharts v0.1.1
  [7a1cc6ca] FFTW v1.2.2
  [587475ba] Flux v0.10.4
  [7073ff75] IJulia v1.21.2
  [6218d12a] ImageMagick v1.1.5
  [86fae568] ImageView v0.10.8
  [916415d5] Images v0.22.3
  [682c06a0] JSON v0.21.0
  [33e6dc65] MKL v0.2.0 #master (https://github.com/JuliaComputing/MKL.jl)
  [9b87118b] PackageCompiler v1.1.1
  [91a5bcdd] Plots v1.4.3
  [438e738f] PyCall v1.91.4
  [d330b81b] PyPlot v2.9.0
  [3646fa90] ScikitLearn v0.6.2
  [24249f21] SymPy v1.0.26
  [0f1e0344] WebIO v0.8.14
  [37e2e46d] LinearAlgebra

完整报错信息如下:
(@v1.4) pkg> build MKL
   Building MKL → `C:\Users\Whale fall\.julia\packages\MKL\1edTo\deps\build.log`
┌ Error: Error building `MKL`:
│ [ Info: Splicing in code to load MKL in C:\Users\Whale fall\AppData\Local\Programs\Julia\Julia-1.4.2\bin\..\share\julia\base\sysimg.jl
│ [ Info: getting precompile script from: https://raw.githubusercontent.com/JuliaLang/julia/release-1.4/contrib/generate_precompile.jl
│ ┌ Error: Download failed: curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed
│ └ @ Base download.jl:43
│ ERROR: LoadError: failed process: Process(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -f -o 'C:\Users\WHALEF~1\AppData\Local\Temp\jl_R3jXHEtU9o' https://raw.githubusercontent.com/JuliaLang/julia/release-1.4/contrib/generate_precompile.jl`, ProcessExited(35)) [35]
│
│ Stacktrace:
│  [1] pipeline_error at .\process.jl:525 [inlined]
│  [2] download_curl(::String, ::String, ::String) at .\download.jl:44
│  [3] download at .\download.jl:62 [inlined]
│  [4] get_precompile_statments_file() at C:\Users\Whale fall\.julia\packages\MKL\1edTo\src\install.jl:75
│  [5] top-level scope at C:\Users\Whale fall\.julia\packages\MKL\1edTo\src\install.jl:107
│  [6] eval at .\boot.jl:331 [inlined]
│  [7] change_blas_library(::String) at C:\Users\Whale fall\.julia\packages\MKL\1edTo\src\install.jl:105
│  [8] enable_mkl_startup() at C:\Users\Whale fall\.julia\packages\MKL\1edTo\src\install.jl:82
│  [9] top-level scope at C:\Users\Whale fall\.julia\packages\MKL\1edTo\deps\build.jl:5
│  [10] include(::String) at .\client.jl:439
│  [11] top-level scope at none:5
│ in expression starting at C:\Users\Whale fall\.julia\packages\MKL\1edTo\deps\build.jl:5
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Operations.jl:899

不知道是哪一步出了问题,请各位大神不吝赐教解决思路

issues里有一些关于1.4无法build的报告,你可以尝试用用1.3.1

另外我这边 Julia 1.4.2(macOS)通过手动 git clone, ] dev path/to/MKL 的方式可以成功 build

 ~/D/J/MKL.jl$ julia --startup=no                                                                                                                                                         

(@v1.4) pkg> dev .
[ Info: Resolving package identifier `.` as a directory at `~/Documents/Julia/MKL.jl`.
Path `.` exists and looks like the correct package. Using existing path.
  Resolving package versions...
   Updating `~/.julia/environments/v1.4/Project.toml`
  [33e6dc65] + MKL v0.2.0 [`../../../Documents/Julia/MKL.jl`]
   Updating `~/.julia/environments/v1.4/Manifest.toml`
  [33e6dc65] + MKL v0.2.0 [`../../../Documents/Julia/MKL.jl`]
  [9b87118b] + PackageCompiler v1.1.1

(@v1.4) pkg> build MKL
   Building MKL → `~/Documents/Julia/MKL.jl/deps/build.log`


 ~/D/J/MKL.jl$ julia --startup=no 

julia> using LinearAlgebra

julia> BLAS.vendor()
:mkl

build log:

 ~/D/J/MKL.jl $ tail -f ~/Documents/Julia/MKL.jl/deps/build.log                                                                                                                                   Wed Jun 24 23:55:26 2020
Generating precompile statements... 4922 generated in  89.592325 seconds (overhead  64.617657 seconds)
[ Info: Splicing in code to load MKL in /Applications/Julia-1.4.app/Contents/Resources/julia/bin/../share/julia/base/sysimg.jl
[ Info: getting precompile script from: https://raw.githubusercontent.com/JuliaLang/julia/release-1.4/contrib/generate_precompile.jl
[ Info: PackageCompiler: creating base system image (incremental=false)...
[ Info: PackageCompiler: creating system image object file, this might take a while...
[ Info: PackageCompiler: default sysimg replaced, restart Julia for the new sysimg to be in effect
1赞
Error: Download failed: curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

我感觉是代理设置的问题, 不知道你咋设置的. 也许是没有加/, 也许是其他, 我不懂.
我在下载其他东西时也有这样的错误, 你可以把build.jl中的https全部换成http试一下

我尝试安装了一下, 我对git有设置代理, 但是在bash中没有设置代理, 还设置了北外镜像, 因此clone很快, 在build的时候,我发现我是没有走代理的, 因为若是走代理, 速度则是 在ss-local 中出现的, 而看到的是curl

过了一会, 速度没了, julia进程跑慢了一个线程, 然后我去看了MKL的介绍, 打扰了, 我是amd cpu

image

我build完了, 很顺利, 就是不知道能不能用. build过程中完全没用到代理

(@v1.4) pkg> add MKL
   Updating registry at `~/.julia/registries/General`
######################################################################## 100.0%
ERROR: The following package names could not be resolved:
 * MKL (not found in project, manifest or registry)


(@v1.4) pkg> add https://github.com/JuliaComputing/MKL.jl
    Cloning git-repo `https://github.com/JuliaComputing/MKL.jl`
   Updating git-repo `https://github.com/JuliaComputing/MKL.jl`
  Resolving package versions...
  Installed MKL_jll ───────── v2020.1.216+0
  Installed IntelOpenMP_jll ─ v2018.0.3+0
  Installed PackageCompiler ─ v1.1.1
Downloading artifact: IntelOpenMP
   Updating `~/.julia/environments/v1.4/Project.toml`
  [33e6dc65] + MKL v0.2.0 #master (https://github.com/JuliaComputing/MKL.jl)
   Updating `~/.julia/environments/v1.4/Manifest.toml`
  [1d5cc7b8] + IntelOpenMP_jll v2018.0.3+0
  [33e6dc65] + MKL v0.2.0 #master (https://github.com/JuliaComputing/MKL.jl)
  [856f044c] + MKL_jll v2020.1.216+0
  [9b87118b] + PackageCompiler v1.1.1
   Building MKL → `~/.julia/packages/MKL/1edTo/deps/build.log`

(@v1.4) pkg> 
jerrywang@jerrywang-PC:~$ cat ~/.julia/packages/MKL/1edTo/deps/build.log
######################################################################## 100.0%
Generating precompile statements... 4911 generated in 105.244308 seconds (overhead  76.535276 seconds)
[ Info: Splicing in code to load MKL in /opt/julia-1.4.2/bin/../share/julia/base/sysimg.jl
[ Info: getting precompile script from: https://raw.githubusercontent.com/JuliaLang/julia/release-1.4/contrib/generate_precompile.jl
[ Info: PackageCompiler: creating base system image (incremental=false)...
[ Info: PackageCompiler: creating system image object file, this might take a while...
[ Info: PackageCompiler: default sysimg replaced, restart Julia for the new sysimg to be in effect

对了, 我有设置dns为8.8.8.8, 因此https://raw.githubusercontent.com/打开是不需要梯子的

julia> versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 5 4600U with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, znver1)
Environment:
  JULIA_PKG_SERVER = https://mirrors.bfsu.edu.cn/julia/static
2赞

谢谢各位的帮助,我查看了一下,最后发现还是代理没有正确设置的问题。更新到1.4.2后我忘记对startup.jl进行设置,在我开放全局代理或者设置相应的环境变量后能正常build。这个过程应该是需要通过代理下载某些东西的。果然大部分库安装的问题都是网络代理的问题。

京ICP备17009874号-2