Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PackageCompiler crashes #119

Closed
oschulz opened this issue Dec 4, 2020 · 6 comments
Closed

PackageCompiler crashes #119

oschulz opened this issue Dec 4, 2020 · 6 comments

Comments

@oschulz
Copy link
Member

oschulz commented Dec 4, 2020

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.

@oschulz
Copy link
Member Author

oschulz commented Dec 4, 2020

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).

@lmh91
Copy link
Collaborator

lmh91 commented Dec 5, 2020

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...

@lmh91
Copy link
Collaborator

lmh91 commented Dec 5, 2020

New MWE:

Add Uniful.jl to the project and change precompile_exec.jl to

using Unitful 
u"m"

@lmh91
Copy link
Collaborator

lmh91 commented Dec 5, 2020

PackageCompiler does not like unit strings... (anymore)

@oschulz
Copy link
Member Author

oschulz commented Dec 5, 2020

Thanks, that narrows it down nicely! Just reported it: JuliaLang/julia#38719

@lmh91
Copy link
Collaborator

lmh91 commented Dec 5, 2020

So, it seems we have to wait for Julia v1.5.4 or v1.6.
I will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants