Skip to content

Regression from v1.5.0 to v1.7.6: duplicate copying attempt #625

Description

@mchitre

I have an app which compiles fine with PackageCompiler v1.5.0, but fails on v1.7.6. The make.jl script to compile:

using PackageCompiler
create_app(@__DIR__, joinpath(@__DIR__, "build");
  precompile_statements_file=joinpath(@__DIR__, "compile/precompile.jl"),
  force=true)

errors out on v1.7.6 (but works correctly on v1.5.0):

┌ Warning: Package TimeZones has a build script, this might indicate that it is not relocatable
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/wpeto/src/PackageCompiler.jl:751
┌ Warning: Package GaloisFields has a build script, this might indicate that it is not relocatable
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/wpeto/src/PackageCompiler.jl:751
ERROR: LoadError: ArgumentError: 'build/share/julia/artifacts/20780fe7a8774baffbeecc2f9a7367d4e8162500' exists. `force=true` is required to remove 'build/share/julia/artifacts/20780fe7a8774baffbeecc2f9a7367d4e8162500' before copying.
Stacktrace:
 [1] checkfor_mv_cp_cptree(src::String, dst::String, txt::String; force::Bool)
   @ Base.Filesystem ./file.jl:312
 [2] cp(src::String, dst::String; force::Bool, follow_symlinks::Bool)
   @ Base.Filesystem ./file.jl:349
 [3] cp
   @ ./file.jl:349 [inlined]
 [4] bundle_artifacts(ctx::Pkg.Types.Context, dest_dir::String; include_lazy_artifacts::Bool)
   @ PackageCompiler ~/.julia/packages/PackageCompiler/wpeto/src/PackageCompiler.jl:1191
 [5] _create_app(package_dir::String, dest_dir::String, name::Nothing, precompile_execution_file::Vector{String}, precompile_statements_file::String, incremental::Bool, filter_stdlibs::Bool, audit::Bool, force::Bool, cpu_target::String; library_only::Bool, c_driver_program::String, julia_init_c_file::Nothing, header_files::Vector{String}, version::Nothing, compat_level::String, include_lazy_artifacts::Bool, sysimage_build_args::Cmd, include_transitive_dependencies::Bool)
   @ PackageCompiler ~/.julia/packages/PackageCompiler/wpeto/src/PackageCompiler.jl:1032
 [6] #create_app#14
   @ ~/.julia/packages/PackageCompiler/wpeto/src/PackageCompiler.jl:836 [inlined]
 [7] top-level scope
   @ make.jl:6
in expression starting at make.jl:6

The build folder is empty before the make.jl is run, and so the duplicate copying attempt seems to be within the PackageCompiler. Indeed, if I check after the error, the folder has the 20780fe7a8774baffbeecc2f9a7367d4e8162500 artifact.

The two warnings don't seem to be relevant, as the warnings exist in v1.5.0 as well, and the packages work fine.

Project dependencies:

  [717857b8] DSP v0.6.10
  [7a1cc6ca] FFTW v1.4.5
  [e0fd600c] Fjage v0.2.0-SNAPSHOT `https://github.com/org-arl/Fjage.jl.git#master`
  [8d0d7f98] GaloisFields v1.1.1
  [682c06a0] JSON v0.21.2
  [bac558e1] OrderedCollections v1.4.1
  [df1fea92] SignalAnalysis v0.4.1

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