【问题标题】:How to increase the limit on the size of the Julia sysimage?如何增加 Julia sysimage 的大小限制?
【发布时间】:2023-02-15 14:21:25
【问题描述】:

我正在使用 PackageCompiler.jl 包编译 Julia 系统映像。它总是对我有用。但是由于图像中有大量库,我得到一个错误:

ERROR: system image too large: sysimg.size is 546855112 but the limit is 20000000

如何增加图像大小限制?我在任何地方都找不到这样的设置。

完整回溯:

[ Info: Building Julia system image.
[ Info: PackageCompiler: Executing /tmp/precomp_execution_file.jl => /tmp/jl_packagecompiler_4K55be/jl_MTxHHo
[ Info: PackageCompiler: Done
- PackageCompiler: compiling incremental system image
ERROR: system image too large: sysimg.size is 546855112 but the limit is 20000000
ERROR: LoadError: 
failed process: Process(
`/usr/local/julia/bin/julia --color=auto --startup-file=no '--cpu-target=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' --strip-metadata --sysimage=/usr/local/julia/lib/julia/sys.so --project=/root/.julia/environments/v1.8 --output-o=/tmp/jl_redo10RS1Y.o /tmp/jl_D2nGTKJwrG`, ProcessExited(1)) [1]

Stacktrace:
  [1] pipeline_error
    @ 
./process.jl:565 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:480
  [3] run(::Cmd)
    @ Base ./process.jl:477
  [4] (::PackageCompiler.var"#20#22")()
    @ PackageCompiler ~/.julia/packages/PackageCompiler/i90pX/ext/TerminalSpinners.jl:157
  [5] spin(f::PackageCompiler.var"#20#22", s::PackageCompiler.TerminalSpinners.Spinner{Base.PipeEndpoint})
    @ PackageCompiler.TerminalSpinners ~/.julia/packages/PackageCompiler/i90pX/ext/TerminalSpinners.jl:164
  [6] macro expansion
    @ ~/.julia/packages/PackageCompiler/i90pX/ext/TerminalSpinners.jl:157 [inlined]
  [7] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String, incremental::Bool)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/i90pX/src/PackageCompiler.jl:128

【问题讨论】:

    标签: julia packagecompiler.jl


    【解决方案1】:

    最新版本的 Julia 不再有此限制。只需升级您的 Julia 版本即可。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-27
      • 1970-01-01
      • 1970-01-01
      • 2012-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多