Skip to content

Building MKL.jl fails in v1.6.0 #60

@mihalybaci

Description

@mihalybaci

I am running into errors building MKL.jl in Julia v1.6.0-beta1, and I have confirmed that it builds fine with Julia v1.5.3 ( no errors and BLAS.vendor() returns :mkl. The full message error I get is:

(@v1.6) pkg> build MKL
    Building MKL → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/e01175ff53c062c52b6cbe441a4382e132f7c82e/build.log`
ERROR: Error building `MKL`, showing the last 100 of log: 
best_platform = select_platform(Dict(p => triplet(p) for p in platforms))
dlopen("libjulia", RTLD_LAZY | RTLD_DEEPBIND)

'`, ProcessExited(1)) [1]

Stacktrace:
  [1] pipeline_error
    @ ./process.jl:525 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:440
  [3] run
    @ ./process.jl:438 [inlined]
  [4] (::Main.anonymous.var"#1#5"{Set{String}, String})(prec_path::String)
    @ Main.anonymous /tmp/jl_Z4lpKw:212
  [5] mktempdir(fn::Main.anonymous.var"#1#5"{Set{String}, String}, parent::String; prefix::String)
    @ Base.Filesystem ./file.jl:729
  [6] mktempdir
    @ ./file.jl:727 [inlined]
  [7] generate_precompile_statements()
    @ Main.anonymous /tmp/jl_Z4lpKw:195
  [8] top-level scope
    @ /tmp/jl_Z4lpKw:339
  [9] eval(m::Module, e::Any)
    @ Core ./boot.jl:360
 [10] top-level scope
    @ /tmp/jl_Z4lpKw:6
 [11] include(fname::String)
    @ Base.MainInclude ./client.jl:444
 [12] top-level scope
    @ none:33
in expression starting at /tmp/jl_Z4lpKw:3
[ Info: Splicing in code to load MKL in /home/michael/.local/julia-1.6.0-beta1/bin/../share/julia/base/sysimg.jl
[ Info: getting precompile script from: https://raw.githubusercontent.com/JuliaLang/julia/release-1.6/contrib/generate_precompile.jl
Precompiling project...
  ✓ MKL
1 dependency successfully precompiled in 1 seconds (7 already precompiled)
[ Info: PackageCompiler: creating base system image (incremental=false)...
[ Info: PackageCompiler: creating system image object file, this might take a while...
ERROR: LoadError: failed process: Process(`/home/michael/.local/julia-1.6.0-beta1/bin/julia --color=yes --startup-file=no --cpu-target=native --sysimage=/tmp/jl_jPBxgE/sys.ji --project=/tmp/jl_BwAXby --output-o=/tmp/jl_tTeUfB.o -e 'Base.reinit_stdio()
@eval Sys BINDIR = ccall(:jl_get_julia_bindir, Any, ())::String
@eval Sys STDLIB = "/home/michael/.local/julia-1.6.0-beta1/share/julia/stdlib/v1.6"
Base.init_load_path()
if isdefined(Base, :init_active_project)
    Base.init_active_project()
end
Base.init_depot_path()
# This @eval prevents symbols from being put into Main
@eval Module() begin
    PrecompileStagingArea = Module()
    for (_pkgid, _mod) in Base.loaded_modules
        if !(_pkgid.name in ("Main", "Core", "Base"))
            eval(PrecompileStagingArea, :(const $(Symbol(_mod)) = $_mod))
        end
    end
    precompile_files = String[
        "/tmp/jl_b29gfy"
    ]
    for file in precompile_files, statement in eachline(file)
        # println(statement)
        # The compiler has problem caching signatures with \`Vararg{?, N}\`. Replacing
        # N with a large number seems to work around it.
        statement = replace(statement, r"Vararg{(.*?), N} where N" => s"Vararg{\1, 100}")
        try
            Base.include_string(PrecompileStagingArea, statement)
        catch
            # See julia issue #28808
            @debug "failed to execute $statement"
        end
    end
end # module
include("/tmp/jl_Z4lpKw")
empty!(LOAD_PATH)
empty!(DEPOT_PATH)
'`, ProcessExited(1)) [1]

Stacktrace:
  [1] pipeline_error
    @ ./process.jl:525 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:440
  [3] run
    @ ./process.jl:438 [inlined]
  [4] create_sysimg_object_file(object_file::String, packages::Vector{String}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::String, isapp::Bool)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/3BsME/src/PackageCompiler.jl:306
  [5] create_sysimage(packages::Vector{Symbol}; sysimage_path::Nothing, project::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, replace_default::Bool, cpu_target::String, script::String, base_sysimage::Nothing, isapp::Bool)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/3BsME/src/PackageCompiler.jl:442
  [6] top-level scope
    @ ~/.julia/packages/MKL/1aXoN/src/install.jl:128
  [7] eval
    @ ./boot.jl:360 [inlined]
  [8] change_blas_library(libblas::String)
    @ Main ~/.julia/packages/MKL/1aXoN/src/install.jl:126
  [9] enable_mkl_startup()
    @ Main ~/.julia/packages/MKL/1aXoN/src/install.jl:103
 [10] top-level scope
    @ ~/.julia/packages/MKL/1aXoN/deps/build.jl:9
 [11] include(fname::String)
    @ Base.MainInclude ./client.jl:444
 [12] top-level scope
in expression starting at /home/michael/.julia/packages/MKL/1aXoN/deps/build.jl:9

My versioninfo() is:

Julia Version 1.6.0-beta1
Commit b84990e1ac (2021-01-08 12:42 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.0 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = 8

Let me know if there is any other information you need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions