PackageCompiler crashes
oschulz opened this issue · 6 comments
PackageCompiler now crashes when trying to compile a Julia system image that contains SolidStateDetectors and a simple precompile execution file like
using SolidStateDetectors
detector_config_filename = SSD_examples[:InvertedCoax]
# PackageCompiler crashes here:
simulation = Simulation{Float32}(detector_config_filename)
This used to work fine - not sure if this is due to changes in SolidStateDetectors, a change in one of it's depencencies, or Julia v1.4 -> v1.5.
Here's a Gist to reproduce the problem: https://gist.github.com/oschulz/2f2daab0f9ce56d3086d55ad6fa18c19
Run with
JULIA_LOAD_PATH="@:@stdlib" julia --project=. build_sysimage.jl
Tested with Julia v1.5.3 on Linux-x86_84 (both on bare-metal Ubuntu 20.04 and in a CentOS-7 container).
It crashes here:
inputunits = dunits::Dict{String, Unitful.Units} = Dict{String, Unitful.Units}(
"length" => u"m", # change this to u"m" ? SI Units
"potential" => u"V",
"angle" => u"°",
"temperature" => u"K"
)
I don't know why the first line looks like that...
However, changing it to
inputunits = Dict{String, Unitful.Units}(
"length" => u"m", # change this to u"m" ? SI Units
"potential" => u"V",
"angle" => u"°",
"temperature" => u"K"
)
does not solve the problem...
New MWE:
Add Uniful.jl
to the project and change precompile_exec.jl
to
using Unitful
u"m"
PackageCompiler does not like unit strings... (anymore)
Thanks, that narrows it down nicely! Just reported it: JuliaLang/julia#38719
So, it seems we have to wait for Julia v1.5.4 or v1.6.
I will close this.