Load sysimage so fail

I generate a sysimage by PackgeCompiler.
this is my command:

using PackageCompiler; create_sysimage(["CoreToolbox"]; sysimage_path="CTBSysimage.so", include_transitive_dependencies=false)

When I use this package, it raise a warning:

Warning: Error requiring `StaticArraysCore` from `LazySets.BallInfModule`
│   exception =
│    ArgumentError: Package LazySets does not have StaticArraysCore in its dependencies:
│    - You may have a partially installed environment. Try `Pkg.instantiate()`
│      to ensure all packages in the environment are installed.
│    - Or, if you have LazySets checked out for development and have
│      added StaticArraysCore as a dependency but haven't updated your primary
│      environment's manifest file, try `Pkg.resolve()`.
│    - Otherwise you may need to report an issue with LazySets

I also fail to import my package:

julia> using CoreToolbox
ERROR: ArgumentError: Package CoreToolbox not found in current path, maybe you meant `import/using .CoreToolbox`.
- Otherwise, run `import Pkg; Pkg.add("CoreToolbox")` to install the CoreToolbox package.
Stacktrace:

What happens if you add these lines before executing package compiler:

using Pkg
Pkg.update()

?
You could also try:

include_transitive_dependencies=true
1 Like

I try to use include_transitive_dependencies=true first, but it raise error during package.
PackageCompiler: compiling incremental system image┌ Error: Error during loading of extension UnitfulExt of Plots, use Base.retry_load_extensions() to retry.

I mean, the question is what does your environment look like. Can you do:

using Pkg
Pkg.status()

and share the result?

It’s a new environment with my project and pakcagecompiler:
Status ~/CTB/Project.toml
[486ab493] CoreToolbox v1.0.0-DEV CoreToolBox#master
[9b87118b] PackageCompiler v2.1.21

1 Like

I cannot find this package on the internet. Is it closed source?

yes, it’s my local project.

Well, if you need support for closed source development I would suggest to contact: JuliaSure: Support and Maintenance Services | JuliaHub

Alternatively you could try to create a minimal working example (MWE) that you can share that allows to reproduce the problem.

I get it, thanks for your suggestions I will try to make a MWE!