-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
System image transfer #19
Comments
I should print that on successful completion... It's just |
I see... I should have read more carefully the blue thing.... Thank you |
I precompiled # or the safer option:
ENV["MAKIE_COMPILE"] = "build" # just builds a system image the needs to be added manually
Pkg.build("Makie") # can take around ~20 minutes and everything seems to be ok. |
Hm there are at least 2 things tha can go wrong...
|
You can find below the output of the build call. The file using Main
using Base
precompile(Tuple{typeof(Base.haskey), Base.ObjectIdDict, Symbol})
precompile(Tuple{typeof(Base.parse), String}) julia> Pkg.build("Makie")
INFO: Building Interact
WARNING: Module Compat with uuid 2119799754262 is missing from the cache.
This may mean module Compat does not support precompilation but is imported by a module that does.
ERROR: LoadError: Declaring __precompile__(false) is not allowed in files that are being precompiled.
Stacktrace:
[1] _require(::Symbol) at ./loading.jl:455
[2] require(::Symbol) at ./loading.jl:405
[3] include_from_node1(::String) at ./loading.jl:576
[4] include(::String) at ./sysimg.jl:14
[5] anonymous at ./<missing>:2
while loading $HOME/.julia/v0.6/FreeType/src/FreeType.jl, in expression starting on line 4
ERROR: LoadError: Failed to precompile FreeType to $HOME/.julia/lib/v0.6/FreeType.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:710
[2] _require(::Symbol) at ./loading.jl:463
[3] require(::Symbol) at ./loading.jl:405
[4] include_from_node1(::String) at ./loading.jl:576
[5] include(::String) at ./sysimg.jl:14
[6] anonymous at ./<missing>:2
while loading $HOME/.julia/v0.6/GLVisualize/src/GLVisualize.jl, in expression starting on line 17
INFO: Enabling widgetsnbextension
Enabling notebook extension jupyter-js-widgets/extension...
- Validating: OK
INFO: ipywidgets version found: 7.0.3
INFO: A compatible version of ipywidgets was found. All good.
INFO: Building GLFW
INFO: Building FFTW
INFO: Building SpecialFunctions
INFO: Building ImageMagick
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near $HOME/.julia/v0.6/ImageMagick/deps/build.jl:118
INFO: Building FreeType
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near $HOME/.julia/v0.6/FreeType/deps/build.jl:24
INFO: Building Makie
Launching new julia process to run commands...
done.
INFO: using Main
INFO: using Base
WARNING: both Main and Core export "Main"; uses of it in module ##661 must be qualified
WARNING: Not emitted: precompile(Tuple{typeof(Main.is_ci)})
INFO: Building inference.o
INFO: $HOME/Julia/julia-release-0.6/usr/bin/julia -C native --output-ji $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/inference.ji --output-o $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/inference.o coreimg.jl
essentials.jl
ctypes.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
pair.jl
traits.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
indices.jl
array.jl
abstractarray.jl
hashing.jl
nofloat_hashing.jl
reduce.jl
bitarray.jl
intset.jl
associative.jl
docs/core.jl
inference.jl
INFO: Building sys.o
INFO: $HOME/Julia/julia-release-0.6/usr/bin/julia -C native --output-ji $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.ji --output-o $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.o -J $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/inference.ji --startup-file=no sysimg.jl
coreio.jl
exports.jl
essentials.jl
ctypes.jl
base.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
pair.jl
traits.jl
range.jl
twiceprecision.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
refpointer.jl
checked.jl
WARNING: Method definition (::Type{T})(Any) in module Inference at coreimg.jl:14 overwritten in module Base at sysimg.jl:77.
indices.jl
array.jl
abstractarray.jl
subarray.jl
hashing.jl
rounding.jl
float.jl
complex.jl
rational.jl
multinverses.jl
abstractarraymath.jl
arraymath.jl
char.jl
strings/string.jl
simdloop.jl
reduce.jl
reshapedarray.jl
bitarray.jl
intset.jl
associative.jl
dict.jl
set.jl
iterators.jl
build_h.jl
version_git.jl
osutils.jl
c.jl
sysinfo.jl
io.jl
iostream.jl
iobuffer.jl
intfuncs.jl
strings/strings.jl
strings/errors.jl
strings/types.jl
strings/basic.jl
strings/search.jl
strings/util.jl
strings/io.jl
strings/utf8proc.jl
parse.jl
shell.jl
regex.jl
pcre.jl
show.jl
cartesian.jl
multidimensional.jl
permuteddimsarray.jl
nullable.jl
broadcast.jl
base64.jl
version.jl
libc.jl
libdl.jl
env.jl
libuv.jl
uv_constants.jl
event.jl
task.jl
lock.jl
threads.jl
weakkeydict.jl
stream.jl
socket.jl
filesystem.jl
process.jl
multimedia.jl
grisu/grisu.jl
methodshow.jl
floatfuncs.jl
math.jl
reducedim.jl
ordering.jl
sort.jl
WARNING: Method definition searchsortedfirst(AbstractArray{T, 1} where T, Any) in module Sort at sort.jl:216 overwritten at sort.jl:218.
WARNING: Method definition searchsortedlast(AbstractArray{T, 1} where T, Any) in module Sort at sort.jl:216 overwritten at sort.jl:218.
WARNING: Method definition searchsorted(AbstractArray{T, 1} where T, Any) in module Sort at sort.jl:216 overwritten at sort.jl:218.
gmp.jl
mpfr.jl
combinatorics.jl
hashing2.jl
dSFMT.jl
random.jl
printf.jl
meta.jl
Enums.jl
serialize.jl
channels.jl
mmap.jl
datafmt.jl
deepcopy.jl
interactiveutil.jl
summarysize.jl
replutil.jl
test.jl
i18n.jl
initdefs.jl
Terminals.jl
LineEdit.jl
REPLCompletions.jl
REPL.jl
client.jl
stacktraces.jl
util.jl
linalg/linalg.jl
statistics.jl
irrationals.jl
dft.jl
dsp.jl
fastmath.jl
libgit2/libgit2.jl
pkg/pkg.jl
profile.jl
dates/Dates.jl
sparse/sparse.jl
asyncmap.jl
distributed/Distributed.jl
sharedarray.jl
loading.jl
threadcall.jl
deprecated.jl
docs/helpdb.jl
docs/helpdb/Base.jl
docs/basedocs.jl
markdown/Markdown.jl
docs/Docs.jl
$HOME/Julia/julia-release-0.6/base/precompile.jl
INFO: Linking sys.so
INFO: cc -L$HOME/Julia/julia/usr/lib -shared -ljulia -o $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.so $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.o
INFO: Not replacing system image.
You can start julia with julia -J $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys to load the compiled files. |
Well, that's it ;) It errors before it can snoop any functions for precompilation. Make sure, that Pkg.test("Makie") works first! seems like you have some problems with the compilation cache. |
OK, I tried to run first julia> Pkg.test("Makie")
INFO: Computing test dependencies for Makie...
WARNING: julia is fixed at 0.6.2-pre.0 conflicting with requirement for PyAMG: [0.7.0-,∞)
INFO: Installing VisualRegressionTests v0.1.0
INFO: Building FFTW
INFO: Building SpecialFunctions
INFO: Building ImageMagick
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near $HOME/.julia/v0.6/ImageMagick/deps/build.jl:118
INFO: Testing Makie
WARNING: --output requested, but no modules defined during run
WARNING: The call to compilecache failed to create a usable precompiled cache file for module FFTW. Got:
WARNING: Cache file "$HOME/.julia/lib/v0.6/FFTW.ji" not found.
WARNING: eval from module Main to ImageCore:
Expr(:call, Expr(:., :Base, :include_from_node1)::Any, "$HOME/.julia/v0.6/FFTW/src/FFTW.jl")::Any
** incremental compilation may be broken for this module **
Scene scene:
Dict{Symbol,Any} with 24 entries:
:screen => name: Makie
children: 0
Inputs:
mouse_button_released => Reactive.Signal{Int64}
mouse_buttons_pressed => Reactive.Signal{Set{Int64}}
scroll => Reactive.Signal{GeometryTypes.Vec{2,Float64}}
buttons_pressed => Reactive.Signal{Set{Int64}}
window_size => Reactive.Signal{GeometryTypes.Vec{2,Int64}}
window_area => Reactive.Signal{GeometryTypes.SimpleRectangle{Int64}}
cursor_position => Reactive.Signal{GeometryTypes.Vec{2,Float64}}
mouseinside => Reactive.Signal{Bool}
mouse_button_down => Reactive.Signal{Int64}
mouseposition => Reactive.Signal{GeometryTypes.Vec{2,Float64}}
arrow_navigation => Reactive.Signal{Symbol}
key_pressed => Reactive.Signal{Bool}
mouse2id => Reactive.Signal{GLWindow.SelectionID{Int64}}
framebuffer_size => Reactive.Signal{GeometryTypes.Vec{2,Int64}}
button_down => Reactive.Signal{Int64}
unicode_input => Reactive.Signal{Array{Char,1}}
window_position => Reactive.Signal{GeometryTypes.Vec{2,Int64}}
mouse_buttons => Reactive.Signal{Tuple{Int64,Int64,Int64}}
entered_window => Reactive.Signal{Bool}
button_released => Reactive.Signal{Int64}
window_open => Reactive.Signal{Bool}
dropped_files => Reactive.Signal{Array{String,1}}
hasfocus => Reactive.Signal{Bool}
keyboard_buttons => Reactive.Signal{NTuple{4,Int64}}
:mouse_button_released => <Node: 0>
:mouse_buttons_pressed => <Node: Set{Int64}()>
:time => <Node: 1.5118e9>
:scroll => <Node: [0.0, 0.0]>
:buttons_pressed => <Node: Set{Int64}()>
:window_area => <Node: GeometryTypes.SimpleRectangle{Int64}(0, 0, 500, 500)>
:theme => Scene: scene
:mouseinside => <Node: true>
:mouse_button_down => <Node: 0>
:mouseposition => <Node: [0.0, 500.0]>
:arrow_navigation => <Node: :nothing>
:key_pressed => <Node: false>
:mouse2id => <Node: [-1, -1]>
:button_down => <Node: 0>
:unicode_input => <Node: Char[]>
:window_position => <Node: [1652, 840]>
:mouse_buttons => <Node: (0, 0, 0)>
:entered_window => <Node: false>
:button_released => <Node: 0>
:window_open => <Node: true>
:dropped_files => <Node: String[]>
:hasfocus => <Node: true>
:keyboard_buttons => <Node: (0, 0, 0, 0)>Scene: sceneScene: scene
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_1.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_2.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_3.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_4.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_5.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_6.png matches. Difference: 1.5686274509828847e-8
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_7.png matches. Difference: 3.137254901965911e-8
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_8.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_9.png matches. Difference: 1.0457516339880642e-8
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_10.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_11.png matches. Difference: 1.0457516339902698e-8
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_12.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_13.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_14.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_15.png matches. Difference: 1.170718954248363e-5
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_16.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_17.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_18.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_19.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_20.png matches. Difference: 1.568627450983014e-8
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_21.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_22.png matches. Difference: 3.438395292321484e-8
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_23.png matches. Difference: 0.0
Array{Symbol,1}
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_24.png matches. Difference: 0.0
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_25.png matches. Difference: 2.6143790849751084e-8
WARNING: Named attribute (:normals) is not an active attribute in the specified program object or
the name starts with the reserved prefix gl_
INFO: Reference image $HOME/.julia/v0.6/ReferenceImages/reference_images/img_26.png matches. Difference: 0.0
Test Summary: | Pass Total
Makie visual regression | 26 26
INFO: Makie tests passed
WARNING: julia is fixed at 0.6.2-pre.0 conflicting with requirement for PyAMG: [0.7.0-,∞)
INFO: Removing VisualRegressionTests v0.1.0 |
This looks good :) I think next time you do the same, the warning should be gone, and snooping should work! |
New output. Tthe file julia> Pkg.build("Makie")
INFO: Building Interact
INFO: Enabling widgetsnbextension
Enabling notebook extension jupyter-js-widgets/extension...
- Validating: OK
INFO: ipywidgets version found: 7.0.3
INFO: A compatible version of ipywidgets was found. All good.
INFO: Building GLFW
INFO: Building FFTW
INFO: Building SpecialFunctions
INFO: Building ImageMagick
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near $HOME/.julia/v0.6/ImageMagick/deps/build.jl:118
INFO: Building FreeType
WARNING: Compat.ASCIIString is deprecated, use String instead.
likely near $HOME/.julia/v0.6/FreeType/deps/build.jl:24
INFO: Building Makie
Launching new julia process to run commands...
done.
INFO: using Main
INFO: using Base
WARNING: both Main and Core export "Main"; uses of it in module ##661 must be qualified
WARNING: Not emitted: precompile(Tuple{typeof(Main.is_ci)})
INFO: Building inference.o
INFO: $HOME/Julia/julia-release-0.6/usr/bin/julia -C native --output-ji $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/inference.ji --output-o $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/inference.o coreimg.jl
essentials.jl
ctypes.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
pair.jl
traits.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
indices.jl
array.jl
abstractarray.jl
hashing.jl
nofloat_hashing.jl
reduce.jl
bitarray.jl
intset.jl
associative.jl
docs/core.jl
inference.jl
INFO: Building sys.o
INFO:$HOME/Julia/julia-release-0.6/usr/bin/julia -C native --output-ji $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.ji --output-$HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.o -J $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/inference.ji --startup-file=no sysimg.jl
coreio.jl
exports.jl
essentials.jl
ctypes.jl
base.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
pair.jl
traits.jl
range.jl
twiceprecision.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
refpointer.jl
checked.jl
WARNING: Method definition (::Type{T})(Any) in module Inference at coreimg.jl:14 overwritten in module Base at sysimg.jl:77.
indices.jl
array.jl
abstractarray.jl
subarray.jl
hashing.jl
rounding.jl
float.jl
complex.jl
rational.jl
multinverses.jl
abstractarraymath.jl
arraymath.jl
char.jl
strings/string.jl
simdloop.jl
reduce.jl
reshapedarray.jl
bitarray.jl
intset.jl
associative.jl
dict.jl
set.jl
iterators.jl
build_h.jl
version_git.jl
osutils.jl
c.jl
sysinfo.jl
io.jl
iostream.jl
iobuffer.jl
intfuncs.jl
strings/strings.jl
strings/errors.jl
strings/types.jl
strings/basic.jl
strings/search.jl
strings/util.jl
strings/io.jl
strings/utf8proc.jl
parse.jl
shell.jl
regex.jl
pcre.jl
show.jl
cartesian.jl
multidimensional.jl
permuteddimsarray.jl
nullable.jl
broadcast.jl
base64.jl
version.jl
libc.jl
libdl.jl
env.jl
libuv.jl
uv_constants.jl
event.jl
task.jl
lock.jl
threads.jl
weakkeydict.jl
stream.jl
socket.jl
filesystem.jl
process.jl
multimedia.jl
grisu/grisu.jl
methodshow.jl
floatfuncs.jl
math.jl
reducedim.jl
ordering.jl
sort.jl
WARNING: Method definition searchsortedfirst(AbstractArray{T, 1} where T, Any) in module Sort at sort.jl:216 overwritten at sort.jl:218.
WARNING: Method definition searchsortedlast(AbstractArray{T, 1} where T, Any) in module Sort at sort.jl:216 overwritten at sort.jl:218.
WARNING: Method definition searchsorted(AbstractArray{T, 1} where T, Any) in module Sort at sort.jl:216 overwritten at sort.jl:218.
gmp.jl
mpfr.jl
combinatorics.jl
hashing2.jl
dSFMT.jl
random.jl
printf.jl
meta.jl
Enums.jl
serialize.jl
channels.jl
mmap.jl
datafmt.jl
deepcopy.jl
interactiveutil.jl
summarysize.jl
replutil.jl
test.jl
i18n.jl
initdefs.jl
Terminals.jl
LineEdit.jl
REPLCompletions.jl
REPL.jl
client.jl
stacktraces.jl
util.jl
linalg/linalg.jl
statistics.jl
irrationals.jl
dft.jl
dsp.jl
fastmath.jl
libgit2/libgit2.jl
pkg/pkg.jl
profile.jl
dates/Dates.jl
sparse/sparse.jl
asyncmap.jl
distributed/Distributed.jl
sharedarray.jl
loading.jl
threadcall.jl
deprecated.jl
docs/helpdb.jl
docs/helpdb/Base.jl
docs/basedocs.jl
markdown/Markdown.jl
docs/Docs.jl
$HOME/Julia/julia-release-0.6/base/precompile.jl
INFO: Linking sys.so
INFO: cc -L$HOME/Julia/julia/usr/lib -shared -ljulia -o $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.so $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys.o
INFO: Not replacing system image.
You can start julia with julia -J $HOME/.julia/v0.6/PackageCompiler/sysimg_tmp/Makie/sys to load the compiled files.
... |
Lol, instead of include, I, for some reason, wrote |
Great, it works now, thanks a lot !!!! ...
INFO: using GLFW
INFO: using Quaternions
WARNING: both Main and Core export "Main"; uses of it in module ##661 must be qualified
WARNING: Not emitted: precompile(Tuple{typeof(Makie.to_node), Int64, getfield(Main, Symbol("##1#9"))})
WARNING: Not emitted: precompile(Tuple{typeof(Makie.to_node), Symbol, getfield(Main, Symbol("##24#27"))})
WARNING: Not emitted: precompile(Tuple{typeof(Makie.to_node), Float64, getfield(Main, Symbol("##4#12"))})
WARNING: Not emitted: precompile(Tuple{typeof(Makie.to_node), Float64, getfield(Main, Symbol("##23#26"))})
WARNING: Not emitted: precompile(Tuple{typeof(Makie.to_node), ColorTypes.RGBA{Float64}, getfield(Main, Symbol("##29#30"))})
WARNING: Not emitted: precompile(Tuple{typeof(Makie.to_node), Symbol, getfield(Main, Symbol("##5#13"))})
WARNING: Not emitted: precompile(Tuple{typeof(Makie.to_node), Float64, getfield(Main, Symbol("##25#28"))})
...
̀``` |
Kind of - but for now I don't want to remove the warnings, since I haven't really figured out which amount of them is normal myself ;) They are a bit annoying to filter...
Yes! You basically freeze Makie and it's dependencies with this method. For the full list of packages you need to watch out for, look at the using statements at the beginning of precompile.jl! |
Sorry for the naive question but it is still not completely clear to me. |
It will work, but won't use the new version ;) Which is why the static compilation isn't recommended for a package you develop! |
OK, cool, that's clear now. Thanks again. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Hi,
Thank you for the fix in Precompile... Following up with
where are we supposed to put the system image? What is the 'exact' procedure?
Thank you again for your help,
Best regards
The text was updated successfully, but these errors were encountered: