Open rfourquet opened 1 year ago
I was encountering the exact same problem this morning. In my case, I fixed it by clearing my JULIA_PROJECT
environment variable, which was pointing to an unrelated project. This seems like undesirable behavior on the part of PackageCompiler as it shouldn't get confused by that when you're asking to build an image for specific package(s) or your current active project?
This is on julia 1.8.4, PC.jl 2.1.2.
A MWE can be:
$ mkdir /tmp/jl_project; cd /tmp/jl_project
$ julia --project=.
]generate XYZ
;]dev ./XYZ
$ mkdir image; cd image; julia --startup-file=no
]activate --temp
]add InlineTest
ENV["JULIA_PROJECT"] = "@."
using PackageCompiler; create_sysimage(sysimage_path="./image.so")
This results in the following error:
It doesn't seem correct to consider the project at "/tmp/jl_project" inside
create_sysimage
, as the current active project is something else.