Cairo build fails on 0.6.0 (Windows)

I am running Julia 0.6.0 under Windows 10. After Pkg.update() I am getting an error when I try to use Gadfly. I traced the problem to Cairo:


julia> Pkg.build("Cairo")
INFO: Building WinRPM
WARNING: Compat.KERNEL is deprecated.
  likely near C:\Users\me\.julia\v0.6\WinRPM\src\WinRPM.jl:4
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Building Cairo
WARNING: Compat.KERNEL is deprecated.
  likely near C:\Users\me\.julia\v0.6\WinRPM\src\WinRPM.jl:4
INFO: Updating WinRPM package list
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Packages to update:  zlib1
INFO: Packages to install: libxml2-2, libpng16-16, fontconfig, libpixman-1-0, libfreetype6, libharfbuzz0, libcairo2
INFO: Downloading: zlib1
INFO: Extracting: zlib1
====================================================[ ERROR: Cairo ]====================================================

LoadError: failed process: Process(`'C:\Users\me\AppData\Local\Julia-0.6.0\bin\7z.exe' x -y 'C:\Users\me\.julia\v0.6\WinRPM\cache\2\noarch%2Fmingw64-zlib1-1.2.8-8.11.noarch.cpio' '-oC:\Users\me\.julia\v0.6\WinRPM\deps'`, ProcessExited(2)) [2]
while loading C:\Users\me\.julia\v0.6\Cairo\deps\build.jl, in expression starting on line 162

Any ideas?

Thanks!

The LoadError seems to be a problem unpacking the downloaded zlib. You could try to remove the

C:\Users\me.julia\v0.6\WinRPM\cache\2\noarch%2Fmingw64-zlib1-1.2.8-8.11.noarch.cpio

and Pkg.build again for a new download.
There’s also a small propability that this https://github.com/JuliaGraphics/Cairo.jl/pull/196#issuecomment-320920826 shows up here.

The build folder does not contain a file with name “noarch%2Fmingw64-zlib1-1.2.8-8.11.noarch.cpio” but only a file with .rpm extension (“noarch%2Fmingw64-zlib1-1.2.8-8.11.noarch.rpm”). Maybe this is a clue to the problem? I am not familiar with the package build process…

I’m somehow familiar with the package build process and this is surely an indication that WinRPM got something wrong. I’ll try to reproduce this on some remote computer (i don’t have win10 available) and file an issue to WinRPM.

i cannot reproduce. Please open an issue on Cairo, please post there:
Pkg,status
versioninfo

and please try to rebuild WinRPM

I tried to rebuild WinRPM and got no errors, but building Cairo gives the same error:

julia> Pkg.build(“Cairo”)
INFO: Building WinRPM
WARNING: Compat.KERNEL is deprecated.
likely near C:\Users\me.julia\v0.6\WinRPM\src\WinRPM.jl:4
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Building Cairo
WARNING: Compat.KERNEL is deprecated.
likely near C:\Users\me.julia\v0.6\WinRPM\src\WinRPM.jl:4
INFO: Updating WinRPM package list
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
INFO: Packages to update: zlib1
INFO: Packages to install: libxml2-2, libfreetype6, libpng16-16, libpixman-1-0, fontconfig, libharfbuzz0, libcairo2
INFO: Downloading: zlib1
INFO: Extracting: zlib1
====================================================[ ERROR: Cairo ]====================================================

LoadError: failed process: Process('C:\Users\me\AppData\Local\Julia-0.6.0\bin\7z.exe' x -y 'C:\Users\me\.julia\v0.6\WinRPM\cache\2\noarch%2Fmingw64-zlib1-1.2.8-8.11.noarch.cpio' '-oC:\Users\me\.julia\v0.6\WinRPM\deps', ProcessExited(2)) [2]
while loading C:\Users\me.julia\v0.6\Cairo\deps\build.jl, in expression starting on line 162

========================================================================================================================

====================================================[ BUILD ERRORS ]====================================================

WARNING: Cairo had build errors.

  • packages with build errors remain installed in C:\Users\me.julia\v0.6
  • build the package(s) and all dependencies with Pkg.build("Cairo")
  • build a single package by running its deps/build.jl script

========================================================================================================================

Here is the Pkg status and versioninfo output:

julia> Pkg.status(“Cairo”)

  • Cairo 0.3.1

julia> Pkg.status(“Gadfly”)

  • Gadfly 0.6.3

julia> versioninfo
versioninfo (generic function with 4 methods)

julia> versioninfo()
Julia Version 0.6.0
Commit 903644385b* (2017-06-19 13:05 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core™ i7-6600U CPU @ 2.60GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, skylake)

By the way, just to make sure this is clear: initially I was able to run Gadfly with Cairo with no errors. I think that this bug was triggered by a Pkg.update() although I can’t say that for sure. For now I switched to Julia Pro on the same machine and I don’t have any problems (not tried Pkg.update() yet !)

Thanks,

-Arrigo

I have exactly the same problem. I have just installed JuliaPro 0.6.0.1 on Win10, and when trying to use Gadfly, it gives me an error with Cairo. When building Cairo with Pkg.build(“Cairo”), I get a build error (as above). Obviously the problem is with extracting the zlib1 package. It tries to extract a file with extension “cpio”, but the file in the folder has extension “rpm” (as many other files there). I managed to extract it using PowerShell, running

C:\JuliaPro-0.6.0.1\Julia-0.6.0\bin\7z.exe x -y C:\JuliaPro-0.6.0.1\pkgs-0.6.0.1\v0.6\WinRPM\cache\2\noarch%2Fmingw64-zlib1-1.2.8-8.12.noarch.rpm -oC:\JuliaPro-0.6.0.1\pkgs-0.6.0.1\v0.6\WinRPM\deps

which gave me an OK. This has created a file with extension “cpio” in folder WinRPM/deps . However, when I build Cairo again, I get the same error (even if I copy this “cpio” file to the “cache/2” folder - from where it is deleted during the build).

Can anybody help to solve this?

MY SOLUTION:

After a lot of trial and error I managed to solve the problem. I believe that this is what needs to be done:

  1. Instead of running Pkg.build(“Cairo”), I opened Cairo\deps\build.jl, which gave me a more detailed ERROR: Can not delete output file C:\JuliaPro-0.6.0.1\pkgs-0.6.0.1\v0.6\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\zlib1.dll (so the problem was not in extracting itself)
  2. after deleting it manually and re-running Cairo\deps\build.jl , it completes OK
  3. then I run my script requiring Gadfly, I get another ERROR: Fontconfig.jl not properly installed. Please run Pkg.build("Fontconfig") and restart Julia.
  4. running Pkg.build(“Fontconfig”) - OK
  5. restarting Julia
  6. running my script requiring Gadfly - OK

FWIW, I had a similar (maybe identical? didn’t save the log) error which was fixed by simpling restarting the computer. Sorry I can’t be of more help.