I am trying to precompile LanguageServer using PackageCompiler by typing this into REPL
using PackageCompiler; create_sysimage([:LanguageServer,:SymbolServer], sysimage_path="./julials.dll", precompile_statements_file="./tracecompilelsp.jl")
It seems to compile until i got this error
ERROR: IOError: could not spawn setenv(`'C:\Users\mhaikala\.julia\artifacts\fdff308295487f361ef6e8dc2d27f5abe8a6eee9\mingw64\bin\g++.exe' -m64 -march=x86-64 -shared '-LC:\Users\mhaikala\AppData\Local\Programs\Julia-1.8.5\bin' '-LC:\Users\mhaikala\AppData\Local\Programs\Julia-1.8.5\bin' -o ./julials.dll -Wl,--whole-archive 'C:\Users\mhaikala\AppData\Local\Temp\jl_F0VQnYBO3g.o' -Wl,--no-whole-archive -ljulia -ljulia-internal -lopenlibm -Wl,--export-all-symbols`,["PATH=...long-list-of-my-path-variable"]: no such file or directory (ENOENT)
So i look into ~/.julia/artifacts/fdff308295487f361ef6e8dc2d27f5abe8a6eee9/mingw64 and found out there is only ‘opt’ folder but no ‘bin’ folder. I have reinstalled PackageCompiler and tried again but no success.
My julia config is this
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores
I get a similar error running your code, but not when I remove the option precompile_statements_file="./tracecompilelsp.jl". Are you sure that PackageCompiler can find that file on your system? And if so, what are its contents?
Running create_sysimage([:LanguageServer,:SymbolServer], sysimage_path="./julials.dll") eventually results in the error:
ld: warning: could not create compact unwind for _julia_YY.244_63412: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _julia_YY.load_coreYY.23_76333: stack subq instruction is too different from dwarf stack size
to generate it I followed direction from this post
I’m sure PackageCompiler can found it. I have tried making a symbolic link for ~/.julia/artifacts/fdff308295487f361ef6e8dc2d27f5abe8a6eee9/mingw64/bin to point at my msys2 installation that has g++ and it manages to build the image. But when i use it Julia can’t load it.
I had the same issue. I just removed the incomplete artifact directory, removed and added PackageCompiler in Pkg. Then it downloaded the complete artifact when I was compling the next time.