-
-
Notifications
You must be signed in to change notification settings - Fork 15
Use artifacts on windows to get the compiler #91
Conversation
|
I've been hit by that: julia> create_sysimage([:Makie, :MakieLayout], replace_default=true)
[ Info: PackageCompilerX: creating system image object file, this might take a while...
C:/Users/Matthis/.julia/artifacts/572b61b5075459e3ed62317e674398166ca98dd4/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:ccalllib_C:\Users\Matthis\.julia\packages\FreeType\2dE5w\deps\usr\bin\libfreetype-6.dll,data ' unrecognized
C:/Users/Matthis/.julia/artifacts/572b61b5075459e3ed62317e674398166ca98dd4/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Cannot export FreeType: symbol not found
C:/Users/Matthis/.julia/artifacts/572b61b5075459e3ed62317e674398166ca98dd4/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Cannot export Users: symbol not found
C:/Users/Matthis/.julia/artifacts/572b61b5075459e3ed62317e674398166ca98dd4/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Cannot export ccalllib_C:: symbol not found
C:/Users/Matthis/.julia/artifacts/572b61b5075459e3ed62317e674398166ca98dd4/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Cannot export packages: symbol not found
collect2.exe: error: ld returned 1 exit status
ERROR: failed process: Process(`'C:\Users\Matthis\.julia\artifacts\572b61b5075459e3ed62317e674398166ca98dd4\mingw64\bin\gcc.exe' -m64 -shared '-LC:\Users\Matthis\AppData\Local\Programs\Julia\Julia-1.4.0-rc1\bin' -o 'C:\Users\Matthis\AppData\Local\Temp\jl_dnMjRC\sys.dll' -Wl,--whole-archive 'C:\Users\Matthis\AppData\Local\Temp\jl_qhN0xvaymk.o' -Wl,--no-whole-archive -ljulia -Wl,--export-all-symbols`, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error at .\process.jl:525 [inlined]
[2] run(::Cmd; wait::Bool) at .\process.jl:440
[3] run at .\process.jl:438 [inlined]
[4] create_sysimg_from_object_file(::String, ::String) at C:\Users\Matthis\.julia\packages\PackageCompilerX\nfbuY\src\PackageCompilerX.jl:366
[5] create_sysimage(::Array{Symbol,1}; sysimage_path::Nothing, project::String, precompile_execution_file::Array{String,1}, precompile_statements_file::Array{String,1}, incremental::Bool, filter_stdlibs::Bool, replace_default::Bool, cpu_target::String, base_sysimage::Nothing, isapp::Bool) at C:\Users\Matthis\.julia\packages\PackageCompilerX\nfbuY\src\PackageCompilerX.jl:338
[6] top-level scope at REPL[207]:1
caused by [exception 1]
IOError: symlink: operation not permitted (EPERM)
Stacktrace:
[1] uv_error at .\libuv.jl:97 [inlined]
[2] symlink(::String, ::String) at .\file.jl:955
[3] probe_symlink_creation(::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:132
[4] unpack(::String, ::String; verbose::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:992
[5] download_verify_unpack(::String, ::String, ::String; tarball_path::Nothing, ignore_existence::Bool, force::Bool, verbose::Bool, quiet_download::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\PlatformEngines.jl:1168
[6] download_artifact(::Base.SHA1, ::String, ::String; verbose::Bool, quiet_download::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Artifacts.jl:750
[7] (::Pkg.Artifacts.var"#44#46"{Bool,Bool,Base.SHA1,String})() at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Artifacts.jl:890
[8] with_show_download_info(::Pkg.Artifacts.var"#44#46"{Bool,Bool,Base.SHA1,String}, ::String, ::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Artifacts.jl:907
[9] ensure_artifact_installed(::String, ::Dict{String,Any}, ::String; platform::Pkg.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Artifacts.jl:889
[10] do_artifact_str(::String, ::Dict{String,Any}, ::String, ::Module) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Artifacts.jl:1023
[11] #invokelatest#1 at .\essentials.jl:712 [inlined]
[12] invokelatest at .\essentials.jl:711 [inlined]
[13] get_compiler() at C:\Users\Matthis\.julia\packages\PackageCompilerX\nfbuY\src\PackageCompilerX.jl:32
[14] create_sysimg_from_object_file(::String, ::String) at C:\Users\Matthis\.julia\packages\PackageCompilerX\nfbuY\src\PackageCompilerX.jl:364
[15] create_sysimage(::Array{Symbol,1}; sysimage_path::Nothing, project::String, precompile_execution_file::Array{String,1}, precompile_statements_file::Array{String,1}, incremental::Bool, filter_stdlibs::Bool, replace_default::Bool, cpu_target::String, base_sysimage::Nothing, isapp::Bool) at C:\Users\Matthis\.julia\packages\PackageCompilerX\nfbuY\src\PackageCompilerX.jl:338
[16] top-level scope at REPL[207]:1 |
|
Looks like symlinks in the artifact on Windows. |
|
That is just Pkg checking if the machine supports symlinks: |
|
Well, I guess, if it's probing it should be caught. Crashing the whole program doesn't seem like its intended behaviour 😁 |
|
It isn't crashing from that, it is crashing from It seems that the exception stack is messed up... |
|
Is it possible that the IOError somehow hasn't been cleared up and thus was taken as cause for the next native error (the pipeline one)? |
|
Yeah, I think it is a red herring here. |
|
Just seeing it now, it looks like the |
|
This repros with:
then run: I don't really understand how the FreeType symbols get inside the object file... |
|
Commenting out the |
|
I'm getting the same error: The env I'm trying to build has only one package in it (DataTables.jl), which has no dep on FreeTypeAbstraction.jl. |
|
@davidanthoff, You're issue is different but I think I know what it is and how to fix it. Will mention when you can try again. Regarding the original issue, the problem is a weird symbol in the object file: Comes from https://github.com/JuliaLang/julia/blob/f2d68ad6eb6b735f5beed779b9570f0d9fbbab28/src/ccall.cpp#L71. That absolute path is weird... |
|
@rapus95 Can you try with JuliaGraphics/FreeType.jl#34. With that I can make a sysimage with Makie and MakieLayout. |
4d493e1 to
6d30a50
Compare
|
@davidanthoff, could you test again with this branch please. |
I'd like to but I'm a bit upset: FreeType doesn't have a Project.toml thus I can't dev it. Thus I need to do a manual clone, switch branches to PR and then somehow explain Julia to use that one instead of the one currently in use. Remember, there's no Project.toml, thus no UUID... |
|
In 1.3 it should be enough to do |
|
I'm on 1.4-rc1: (stuff) pkg> add https://github.com/KristofferC/FreeType.jl#kc/use_soname
Cloning git-repo `https://github.com/KristofferC/FreeType.jl`
Updating git-repo `https://github.com/KristofferC/FreeType.jl`
ERROR: could not find project file in package at https://github.com/KristofferC/FreeType.jl |
|
Yes, so try with 1.3? :P |
Damn, got to install that first 😞 Why was it made an error on 1.4? |
|
Because packages need to have a Project file now. There was a lot of awkwardness in Pkg of trying to handle REQUIRE and Project files at the same time so it was ripped out. |
|
It's definitively missing from NEWS: https://github.com/JuliaLang/julia/blob/release-1.4/NEWS.md |
|
This isn't really the right place to talk about this. If you don't feel like trying it out, it is ok. I tried it out locally myself and it seems to work. |
|
Now on 1.3.1: julia> create_sysimage([:Makie, :MakieLayout], replace_default=true)
[ Info: PackageCompilerX: creating system image object file, this might take a while...
[ Info: PackageCompilerX: default sysimg replaced, restart Julia for the new sysimg to be in effect
ERROR: IOError: unlink: permission denied (EACCES)
Stacktrace:
[1] uv_error at .\libuv.jl:97 [inlined]
[2] unlink(::String) at .\file.jl:781
[3] #rm#9(::Bool, ::Bool, ::typeof(rm), ::String) at .\file.jl:261
[4] #rm at .\none:0 [inlined]
[5] #checkfor_mv_cp_cptree#10(::Bool, ::typeof(Base.Filesystem.checkfor_mv_cp_cptree), ::String, ::String, ::String) at .\file.jl:299
[6] #checkfor_mv_cp_cptree at .\none:0 [inlined]
[7] #mv#13 at .\file.jl:385 [inlined]
[8] #mv at .\none:0 [inlined]
[9] #create_sysimage#7(::Nothing, ::String, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Bool, ::Bool, ::String, ::Nothing, ::Bool, ::typeof(create_sysimage), ::Array{Symbol,1}) at C:\Users\Matthis\.julia\packages\PackageCompilerX\3cLet\src\PackageCompilerX.jl:356
[10] (::PackageCompilerX.var"#kw##create_sysimage")(::NamedTuple{(:replace_default,),Tuple{Bool}}, ::typeof(create_sysimage), ::Array{Symbol,1}) at .\none:0
[11] top-level scope at REPL[7]:1Restarting Julia won't have the new image. So I guess the Info about "default replaced" is placed too early 🙈 |
|
Great that means that it worked. The error you get there is because Windows is sometimes very grumpy about replacing files that are already opened (here the sysimage.dll which is open in the running Julia session). I don't really have a good solution to that other than to just manually replace the default sysimage when Julia is exited. |
|
I'll tweak the docs to mention that. |
|
Yay 🚀 |
https://serverfault.com/questions/503721/replacing-dll-files-while-the-application-is-running |
|
This works if I try it with a simple env, yay! With more complicated ones I get errors, but presumably that is just a package specific thing. This is excellent, because I can ship this support out of the box with the VS Code extension now. |
|
Could you post an example of the error? I want to se what it looks like. |
No description provided.