ExampleSysimage The specified module could not be found

I compiled a sys image from guide given here: Sysimages · PackageCompiler

julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab7 (2022-08-17 13:38 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × AMD Ryzen 7 5800H with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
  Threads: 1 on 16 virtual cores

Generated the system image

julia> readdir()
3-element Vector{String}:
 "ExampleSysimage.so"
 "Manifest.toml"
 "Project.toml"

but can’t really run it using the command provided

[19:59:36] ~\..\NewSysImageEnv on❯ julia -q -JExampleSysimage.so
ERROR: could not load library "C:\Users\aryan\Documents\NewSysImageEnv\ExampleSysimage"
The specified module could not be found.
2 Likes

Has anyone been able to solve this? I am trying to get PackageCompiler to work on my machine and run into the same issue. I thought it had to do with package dependencies not being properly installed, but even following the example in the documentation in a fresh environment fails in the same way as it is for @AbhimanyuAryan. I can’t get it to work on either a Windows 11 machine or my Mac.

I have found that this has been an issue in the past (issue#207), but it seems like it has been fixed at some point. Maybe something isn’t configured right in my environment or the documentation doesn’t reflect the current syntax?

This is not a great answer to your question, mainly because I have not followed the tutorial you used and can not help debug it, but: have you tried other more “automated” tools for making sysimages?

I prefer VScode’s plugin for it: Compiling Sysimages · Julia in VS Code

Here I show how it turns TTFX from more than a minute to 3 seconds: Very slow time to first plot, 2022 - #46 by Krastanov

2 Likes

Thanks for the suggestion. It took a little while for me to get it up and running correctly (needed to make sure useCustomSysimage was check in VSCode), but it works very well. I’m getting something like a 2.5x speed-up when including files in a script that uses CairoMakie and GLMakie. A huge improvement. TTFP is also better. I will absolutely be using this.

2 Likes

Hello!

Have been developing some packages in house with a student team and am currently having the same issue. I would love to get the PackageCompiler.jl workflow working rather than resorting to other methods if possible. Any new ideas please?

Version info

julia version 1.8.5

(@v1.8) pkg> st PackageCompiler
Status C:\Users\cgilb\.julia\environments\v1.8\Project.toml
[9b87118b] PackageCompiler v2.1.9

Packages in project
All our own code and nothing yet published to a public registry/GitHub

Thank you very much!