Error building `PackageCompiler`:

I recently upgraded my setup and reinstalled Julia. Package compiler will not build because it’s looking for 7z.exe in the Julia bin folder instead of libexec (on Windows).

(v1.3) pkg> add PackageCompiler
 Resolving package versions...
 Installed WinRPM ────────── v0.4.2
 Installed HTTPClient ────── v0.2.1
 Installed Libz ──────────── v1.0.1
 Installed LibCURL ───────── v0.5.2
 Installed PackageCompiler ─ v0.6.4
 Installed LibExpat ──────── v0.6.1
 Installed BufferedStreams ─ v1.0.0
  Updating `C:\Julia-1.3.1\.julia\environments\v1.3\Project.toml`
  [9b87118b] + PackageCompiler v0.6.4
  Updating `C:\Julia-1.3.1\.julia\environments\v1.3\Manifest.toml`
  [e1450e63] + BufferedStreams v1.0.0
  [0862f596] + HTTPClient v0.2.1
  [b27032c2] + LibCURL v0.5.2
  [522f3ed2] + LibExpat v0.6.1
  [2ec943e9] + Libz v1.0.1
  [9b87118b] + PackageCompiler v0.6.4
  [c17dfb99] + WinRPM v0.4.2
  Building LibCURL ────────→ `C:\Julia-1.3.1\.julia\packages\LibCURL\lWJxD\deps\build.log`
  Building WinRPM ─────────→ `C:\Julia-1.3.1\.julia\packages\WinRPM\Y9QdZ\deps\build.log`
  Building PackageCompiler → `C:\Julia-1.3.1\.julia\packages\PackageCompiler\CJQcs\deps\build.log`
┌ Error: Error building `PackageCompiler`: 
│ [ Info: Installing GCC
│ [ Info: Multiple package candidates found for mingw64-unistd-pthread-devel, picking newest.
│ ┌ Info: Packages to install:
│ └   join(names(todo), ", ") = "libgcc_s_seh1, cpp, binutils, libgmp10, headers, zlib1, libwinpthread1, winpthreads-devel, runtime, libmpfr4, libmpc3, gcc"
│ ┌ Info: Downloading:
│ └   name = "libgcc_s_seh1"
│ ┌ Info: Extracting:
│ └   name = "libgcc_s_seh1"
│ ERROR: LoadError: IOError: could not spawn `'C:\Julia-1.3.1\bin\7z.exe' x -y 'C:\Julia-1.3.1\.julia\packages\WinRPM\Y9QdZ\cache\2\noarch%2Fmingw64-libgcc_s_seh1-8.2.0-2.8.noarch.rpm' '-oC:\Julia-1.3.1\.julia\packages\WinRPM\Y9QdZ\cache\2'`: no such file or directory (ENOENT)
│ Stacktrace:
│  [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
│  [2] setup_stdios(::Base.var"#554#555"{Cmd}, ::Array{Any,1}) at .\process.jl:112
│  [3] _spawn at .\process.jl:111 [inlined]
│  [4] #open#563(::Bool, ::Bool, ::typeof(open), ::Cmd, ::Base.DevNull) at .\process.jl:370
│  [5] open at .\process.jl:361 [inlined]
│  [6] open(::Cmd, ::String, ::Base.DevNull) at .\process.jl:341
│  [7] open at .\process.jl:338 [inlined]
│  [8] do_install(::WinRPM.Package) at C:\Julia-1.3.1\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:482
│  [9] do_install at C:\Julia-1.3.1\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│  [10] #install#19(::Bool, ::typeof(WinRPM.install), ::WinRPM.Package) at C:\Julia-1.3.1\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:403
│  [11] #install at .\tuple.jl:0 [inlined]
│  [12] #install#17 at C:\Julia-1.3.1\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│  [13] #install at .\none:0 [inlined] (repeats 2 times)
│  [14] build() at C:\Julia-1.3.1\.julia\packages\PackageCompiler\CJQcs\deps\build.jl:43
│  [15] top-level scope at C:\Julia-1.3.1\.julia\packages\PackageCompiler\CJQcs\deps\build.jl:63
│  [16] include at .\boot.jl:328 [inlined]
│  [17] include_relative(::Module, ::String) at .\loading.jl:1105
│  [18] include(::Module, ::String) at .\Base.jl:31
│  [19] include(::String) at .\client.jl:424
│  [20] top-level scope at none:5
│ in expression starting at C:\Julia-1.3.1\.julia\packages\PackageCompiler\CJQcs\deps\build.jl:63
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\backwards_compatible_isolation.jl:649

Did anyone else encounter this error?

That is a very old version of PackageCompiler, there is a new version on the way (https://github.com/JuliaLang/PackageCompiler.jl/issues/337). In the meantime, try the master branch:

$ pkg add PackageCompiler#master
3 Likes

Thank you!