# Winston and the dependency of Cairo

**URL:** <https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092>\
**Category:** General Usage\
**Created:** [November 28, 2018, 10:26am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092 "2018-11-28T10:26:12Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [November 28, 2018, 10:26am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/1 "2018-11-28T10:26:12Z")

</div>

```julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.2 (2018-11-08)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.0) pkg> rm Cairo
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Project.toml`
  [159f3aea] - Cairo v0.5.6+ #master (https://github.com/JuliaGraphics/Cairo.jl.
git)
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Manifest.toml`
 [no changes]

(v1.0) pkg> rm Winston
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Project.toml`
  [bd07be1c] - Winston v0.14.1+ #master (https://github.com/JuliaGraphics/Winsto
n.jl.git)
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Manifest.toml`
  [e1450e63] - BufferedStreams v1.0.0
  [159f3aea] - Cairo v0.5.6+ #master (https://github.com/JuliaGraphics/Cairo.jl.
git)
  [a2bd30eb] - Graphics v0.4.0
  [4c0ca9eb] - Gtk v0.16.4
  [0862f596] - HTTPClient v0.2.1
  [d9be37ee] - Homebrew v0.7.0
  [b27032c2] - LibCURL v0.4.1
  [522f3ed2] - LibExpat v0.5.0
  [2ec943e9] - Libz v1.0.0
  [c17dfb99] - WinRPM v0.4.2
  [bd07be1c] - Winston v0.14.1+ #master (https://github.com/JuliaGraphics/Winsto
n.jl.git)

(v1.0) pkg> up Pkg
  Updating registry at `C:\Users\hermesr\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: The following package names could not be resolved:
 * Pkg (44cfe95a-1eb2-52ea-b672-e2afdf69b78f in manifest but not in project)
Please specify by known `name=uuid`.

(v1.0) pkg> up
  Updating registry at `C:\Users\hermesr\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/JuliaDiffEq/DiffEqTutorials.jl.git`
  Updating git-repo `https://github.com/JuliaApproximation/ApproxFunExamples.git
`
  Updating git-repo `https://github.com/JuliaMatrices/BlockBandedMatrices.jl.git
`
  Updating git-repo `https://github.com/VMLS-book/VMLS.jl`
 Resolving package versions...
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Project.toml`
 [no changes]
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Manifest.toml`
 [no changes]

(v1.0) pkg> add https://github.com/JuliaGraphics/Winston.jl.git
  Updating git-repo `https://github.com/JuliaGraphics/Winston.jl.git`
 Resolving package versions...
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Project.toml`
  [bd07be1c] + Winston v0.14.1+ #master (https://github.com/JuliaGraphics/Winsto
n.jl.git)
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Manifest.toml`
  [e1450e63] + BufferedStreams v1.0.0
  [159f3aea] + Cairo v0.5.6
  [a2bd30eb] + Graphics v0.4.0
  [4c0ca9eb] + Gtk v0.16.4
  [0862f596] + HTTPClient v0.2.1
  [d9be37ee] + Homebrew v0.7.0
  [b27032c2] + LibCURL v0.4.1
  [522f3ed2] + LibExpat v0.5.0
  [2ec943e9] + Libz v1.0.0
  [c17dfb99] + WinRPM v0.4.2
  [bd07be1c] + Winston v0.14.1+ #master (https://github.com/JuliaGraphics/Winsto
n.jl.git)

(v1.0) pkg> update
  Updating registry at `C:\Users\hermesr\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/JuliaDiffEq/DiffEqTutorials.jl.git`
  Updating git-repo `https://github.com/JuliaApproximation/ApproxFunExamples.git
`
  Updating git-repo `https://github.com/JuliaMatrices/BlockBandedMatrices.jl.git
`
  Updating git-repo `https://github.com/VMLS-book/VMLS.jl`
  Updating git-repo `https://github.com/JuliaGraphics/Winston.jl.git`
 Resolving package versions...
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Project.toml`
 [no changes]
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Manifest.toml`
 [no changes]

(v1.0) pkg> using Winston
ERROR: expected command. instead got [using]

julia> using Winston
[Info: Precompiling Winston [bd07be1c-e76f-5ff0-9c0b-f51ef45303c6]
ERROR: LoadError: Cairo not properly installed. Please run
Pkg.build("Cairo")
Stacktrace:
 [1] error(::String, ::String) at .\error.jl:42
 [2] top-level scope at none:0
 [3] include at .\boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at .\loading.jl:1044
 [5] include(::Module, ::String) at .\sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at .\boot.jl:319 [inlined]
 [8] eval(::Expr) at .\client.jl:393
 [9] top-level scope at .\none:3
in expression starting at C:\Users\hermesr\.julia\packages\Cairo\CXPG1\src\Cairo
.jl:9
ERROR: LoadError: Failed to precompile Cairo [159f3aea-2a34-519c-b102-8c37f98781
75] to C:\Users\hermesr\.julia\compiled\v1.0\Cairo\l6vnT.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:311 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
 [4] macro expansion at .\logging.jl:309 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:947
 [6] require(::Base.PkgId) at .\loading.jl:858
 [7] macro expansion at .\logging.jl:309 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:840
 [9] include at .\boot.jl:317 [inlined]
 [10] include_relative(::Module, ::String) at .\loading.jl:1044
 [11] include(::Module, ::String) at .\sysimg.jl:29
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:319 [inlined]
 [14] eval(::Expr) at .\client.jl:393
 [15] top-level scope at .\none:3
in expression starting at C:\Users\hermesr\.julia\packages\Winston\MTYrd\src\Win
ston.jl:3
ERROR: Failed to precompile Winston [bd07be1c-e76f-5ff0-9c0b-f51ef45303c6] to C:
\Users\hermesr\.julia\compiled\v1.0\Winston\TPedU.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:311 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
 [4] macro expansion at .\logging.jl:309 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:947
 [6] require(::Base.PkgId) at .\loading.jl:858
 [7] macro expansion at .\logging.jl:309 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:840

julia>

```

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [November 28, 2018, 10:28am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/2 "2018-11-28T10:28:18Z")

</div>

Did you try the suggested `Pkg.build("Cairo")`?

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [November 28, 2018, 10:40am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/3 "2018-11-28T10:40:02Z")

</div>

Yes I did it!

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [November 28, 2018, 10:44am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/4 "2018-11-28T10:44:14Z")

</div>

And was there an error?

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [November 28, 2018, 10:47am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/5 "2018-11-28T10:47:32Z")

</div>

repeat the same error, I must build a package Cairo!!!

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [November 28, 2018, 10:55am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/6 "2018-11-28T10:55:34Z")

</div>

Maybe manually delete the folder `C:\Users\hermesr\.julia\packages\Cairo\CXPG1`, then:

```julia

(v1.0) pkg> instantiate
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Installed Cairo ─ v0.5.6
  Building Cairo → `~/.julia/packages/Cairo/CXPG1/deps/build.log`

(v1.0) pkg> ^C

julia> using Winston
[Info: Precompiling Winston [bd07be1c-e76f-5ff0-9c0b-f51ef45303c6]

```

?

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [November 28, 2018, 11:01am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/7 "2018-11-28T11:01:46Z")

</div>

> [@mauro3](#):
>
> instantiate

```julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.2 (2018-11-08)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.0) pkg> instantiate
  Updating registry at `C:\Users\hermesr\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Installed Cairo ─ v0.5.6
  Building Cairo → `C:\Users\hermesr\.julia\packages\Cairo\CXPG1\deps\build.log`

┌ Error: Error building `Cairo`:
│ [ Info: Updating WinRPM package list
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/r
epositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/r
epositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
│ [ Info: Nothing to do
│ ERROR: LoadError: Provider WinRPM.RPM failed to satisfy dependency cairo
│ Stacktrace:
│ [1] error(::String) at .\error.jl:33
│ [2] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\he
rmesr\.julia\packages\BinDeps\ZEval\src\dependencies.jl:945
│ [3] satisfy!(::BinDeps.LibraryGroup, ::Array{DataType,1}) at C:\Users\hermesr
\.julia\packages\BinDeps\ZEval\src\dependencies.jl:910
│ [4] satisfy!(::BinDeps.LibraryGroup) at C:\Users\hermesr\.julia\packages\BinD
eps\ZEval\src\dependencies.jl:874
│ [5] top-level scope at C:\Users\hermesr\.julia\packages\BinDeps\ZEval\src\dep
endencies.jl:977
│ [6] include at .\boot.jl:317 [inlined]
│ [7] include_relative(::Module, ::String) at .\loading.jl:1044
│ [8] include(::Module, ::String) at .\sysimg.jl:29
│ [9] include(::String) at .\client.jl:392
│ [10] top-level scope at none:0
│ in expression starting at C:\Users\hermesr\.julia\packages\Cairo\CXPG1\deps\bu
ild.jl:165
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win32\bu
ild\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1097

(v1.0) pkg>

```

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [November 28, 2018, 11:25am UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/8 "2018-11-28T11:25:16Z")

</div>

Once you get Cairo working (looks like WinRPM is your problem here), Winston looks like it works OK:

 ![27](https://global.discourse-cdn.com/julialang/original/3X/b/3/b33b85977be8d4a4760a5c1ffacf29857469d825.png)

It’s always worth restarting your Julia session, in my experience.

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [November 28, 2018, 12:03pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/9 "2018-11-28T12:03:35Z")

</div>

Yep looks like WinRPM. Sorry, I can’t help with that.

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [November 28, 2018, 1:12pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/10 "2018-11-28T13:12:33Z")

</div>

```julia
julia> using WinRPM
ERROR: ArgumentError: Package WinRPM not found in current path:
- Run `import Pkg; Pkg.add("WinRPM")` to install the WinRPM package.

Stacktrace:
 [1] require(::Module, ::Symbol) at .\loading.jl:823

julia>

```

however in the packages directory there is a subdirector with that name

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [November 28, 2018, 1:22pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/11 "2018-11-28T13:22:01Z")

</div>

> [@HerAdri](#):
>
> `Package WinRPM not found in current path:`

You have to do `add WinRPM` at the package prompt to make it accessible for `using`, even if WinRPM was installed automatically as a dependency of something else. The package system distinguishes between “internal” packages installed as a dependency, which are invisible to the user, and packages you manually installed.

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [November 28, 2018, 2:40pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/12 "2018-11-28T14:40:51Z")

</div>

Manually installed WinRPM:  
`(v1.0) pkg> add https://github.com/JuliaPackaging/WinRPM.jl.git`

And I get the following error:

```julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.2 (2018-11-08)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.0) pkg> add Winston
  Updating registry at `C:\Users\hermesr\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
 Installed DiffEqBase ─ v4.31.1
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Project.toml`
  [bd07be1c] + Winston v0.14.1
  Updating `C:\Users\hermesr\.julia\environments\v1.0\Manifest.toml`
  [159f3aea] + Cairo v0.5.6
  [2b5f629d] ↑ DiffEqBase v4.31.0 ? v4.31.1
  [a2bd30eb] + Graphics v0.4.0
  [4c0ca9eb] + Gtk v0.16.4
  [d9be37ee] + Homebrew v0.7.0
  [bd07be1c] + Winston v0.14.1
  Building DiffEqBase → `C:\Users\hermesr\.julia\packages\DiffEqBase\HD6bO\deps\
build.log`

(v1.0) pkg> st
    Status `C:\Users\hermesr\.julia\environments\v1.0\Project.toml`
  [28f2ccd6] ApproxFun v0.10.2+ [`C:\Users\hermesr\.julia\dev\ApproxFun`]
  [d9fa014c] ApproxFunExamples v0.1.0 #master (https://github.com/JuliaApproxima
tion/ApproxFunExamples.git)
  [c52e3926] Atom v0.7.10
  [ffab5731] BlockBandedMatrices v0.3.0+ #master (https://github.com/JuliaMatric
es/BlockBandedMatrices.jl.git)
  [717857b8] DSP v0.5.1
  [a93c6f00] DataFrames v0.14.1
  [225cb15b] DiffEqTutorials v0.0.0 #master (https://github.com/JuliaDiffEq/Diff
EqTutorials.jl.git)
  [0c46a032] DifferentialEquations v5.3.1
  [7073ff75] IJulia v1.14.1
  [e5e0dc1b] Juno v0.5.3
  [1902f260] Knet v1.1.1
  [b964fa9f] LaTeXStrings v1.0.3
  [ff71e718] MixedModels v1.1.1
  [5fb14364] OhMyREPL v0.4.0
  [1dea7af3] OrdinaryDiffEq v4.17.2
  [91a5bcdd] Plots v0.21.0
  [438e738f] PyCall v1.18.5
  [d330b81b] PyPlot v2.6.3
  [6f49c342] RCall v0.13.0
  [df47a6cb] RData v0.5.0
  [ce6b1742] RDatasets v0.6.1
  [276daf66] SpecialFunctions v0.7.2
  [44dac47c] VMLS v0.2.0 #master (https://github.com/VMLS-book/VMLS.jl)
  [c17dfb99] WinRPM v0.4.2+ #master (https://github.com/JuliaPackaging/WinRPM.jl
.git)
  [bd07be1c] Winston v0.14.1
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random
  [2f01184e] SparseArrays

julia> using Winston
[Info: Precompiling Winston [bd07be1c-e76f-5ff0-9c0b-f51ef45303c6]
ERROR: LoadError: Cairo not properly installed. Please run
Pkg.build("Cairo")
Stacktrace:
 [1] error(::String, ::String) at .\error.jl:42
 [2] top-level scope at none:0
 [3] include at .\boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at .\loading.jl:1044
 [5] include(::Module, ::String) at .\sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at .\boot.jl:319 [inlined]
 [8] eval(::Expr) at .\client.jl:393
 [9] top-level scope at .\none:3
in expression starting at C:\Users\hermesr\.julia\packages\Cairo\CXPG1\src\Cairo
.jl:9
ERROR: LoadError: Failed to precompile Cairo [159f3aea-2a34-519c-b102-8c37f98781
75] to C:\Users\hermesr\.julia\compiled\v1.0\Cairo\l6vnT.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:311 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
 [4] macro expansion at .\logging.jl:309 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:947
 [6] require(::Base.PkgId) at .\loading.jl:858
 [7] macro expansion at .\logging.jl:309 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:840
 [9] include at .\boot.jl:317 [inlined]
 [10] include_relative(::Module, ::String) at .\loading.jl:1044
 [11] include(::Module, ::String) at .\sysimg.jl:29
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:319 [inlined]
 [14] eval(::Expr) at .\client.jl:393
 [15] top-level scope at .\none:3
in expression starting at C:\Users\hermesr\.julia\packages\Winston\Nh0fV\src\Win
ston.jl:3
ERROR: Failed to precompile Winston [bd07be1c-e76f-5ff0-9c0b-f51ef45303c6] to C:
\Users\hermesr\.julia\compiled\v1.0\Winston\TPedU.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:311 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
 [4] macro expansion at .\logging.jl:309 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:947
 [6] require(::Base.PkgId) at .\loading.jl:858
 [7] macro expansion at .\logging.jl:309 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:840

julia>

```

---

<div class="post-metadata">

**Author:** ![ezaron](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ezaron/32/18778_2.png) [@ezaron](https://discourse.julialang.org/u/ezaron)\
**Post date:** [April 3, 2019, 6:33pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/13 "2019-04-03T18:33:32Z")

</div>

Hello HerAdri,  
Did you ever reach resolution with this problem? I too am stuck building Cairo to get Winston working.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 3, 2019, 6:56pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/14 "2019-04-03T18:56:00Z")

</div>

Cairo has been broken for a long while.

> <https://github.com/JuliaGraphics/Cairo.jl/issues/239>
>
> Messages from Pkg.build() for Cairo:
> \`\`\`
> Building Cairo ───────────→ \`~/.julia…/packages/Cairo/NBtbd/deps/build.log\`
> ┌ Error: Error building \`Cairo\`: 
> │ ┌ Warning: Deprecated syntax \`assignment inside \[\]\`.
> │ └ @ none:0
> │ ┌ Warning: \`is\_apple\` is deprecated, use \`Sys.isapple\` instead.
> │ │ caller = top-level scope at none:0
> │ └ @ Core none:0
> │ ┌ Warning: \`is\_linux\` is deprecated, use \`Sys.islinux\` instead.
> │ │ caller = xx(::String, ::Vararg{String,N} where N) at build.jl:109
> │ └ @ Main ~/.julia/packages/Cairo/NBtbd/deps/build.jl:109
> │ ┌ Warning: \`is\_linux\` is deprecated, use \`Sys.islinux\` instead.
> │ │ caller = top-level scope at none:0
> │ └ @ Core none:0
> │ ┌ Warning: \`is\_apple\` is deprecated, use \`Sys.isapple\` instead.
> │ │ caller = top-level scope at none:0
> │ └ @ Core none:0
> │ ┌ Warning: \`similar(a::AbstractDict)\` is deprecated, use \`empty(a)\` instead.
> │ │ caller = adjust\_env(::Dict{AbstractString,AbstractString}) at BinDeps.jl:388
> │ └ @ BinDeps ~/.julia/packages/BinDeps/Z6fwm/src/BinDeps.jl:388
> │ ┌ Warning: \`replace(s::AbstractString, pat, f)\` is deprecated, use \`replace(s, pat =\> f)\` instead.
> │ │ caller = top-level scope at none:0
> │ └ @ Core none:0
> │ ┌ Warning: \`replace(s::AbstractString, pat, f)\` is deprecated, use \`replace(s, pat =\> f)\` instead.
> │ │ caller = top-level scope at none:0
> │ └ @ Core none:0
> │ ERROR: LoadError: Provider Homebrew.HB failed to satisfy dependency pangocairo
> │ Stacktrace:
> │ \[1\] error(::String) at ./error.jl:33
> │ \[2\] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /Users/lewis/.julia/packages/BinDeps/Z6fwm/src/dependencies.jl:945
> │ \[3\] satisfy!(::BinDeps.LibraryGroup, ::Array{DataType,1}) at /Users/lewis/.julia/packages/BinDeps/Z6fwm/src/dependencies.jl:910
> │ \[4\] satisfy!(::BinDeps.LibraryGroup) at /Users/lewis/.julia/packages/BinDeps/Z6fwm/src/dependencies.jl:874
> │ \[5\] top-level scope at /Users/lewis/.julia/packages/BinDeps/Z6fwm/src/dependencies.jl:977
> │ \[6\] include at ./boot.jl:317 \[inlined\]
> │ \[7\] include\_relative(::Module, ::String) at ./loading.jl:1038
> │ \[8\] include(::Module, ::String) at ./sysimg.jl:29
> │ \[9\] include(::String) at ./client.jl:398
> │ \[10\] top-level scope at none:0
> │ in expression starting at /Users/lewis/.julia/packages/Cairo/NBtbd/deps/build.jl:161
> └ @ Pkg.Operations /Users/osx/buildbot/slave/package\_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:1068
> \`\`\`

The basic problem is that `libcairo` is a giant and complicated binary dependency, and getting that installed reliably is hard. The ideal would be to use the new BinaryBuilder infrastructure to do this, but that turns out to be tricky because of how Cairo needs to interact with Gtk:

> <https://github.com/JuliaGraphics/Cairo.jl/pull/229>
>
> At least locally this gives me:
> \`\`\`Julia
> julia\> Pkg.test("Cairo")
> INFO: Testi…ng Cairo
> Test Summary: | Pass Total
> Image Surface | 7 7
> Test Summary: | Pass Total
> Conversions | 5 5
> Test Summary: | Pass Total
> TexLexer | 1 1
> Test Summary: | Pass Total
> Samples | 30 30
> Test Summary: | Pass Total
> Bitmap Painting | 6 6
> Test Summary: | Pass Total
> Vector Surfaces | 9 9
> Test Summary: | Pass Total
> Bitmap Surfaces | 3 3
> Test Summary: | Pass Total
> Assert/Status | 7 7
> Test Summary: | Pass Total
> reset\_transform | 6 6
> INFO: Cairo tests passed
> \`\`\`
> :) 
> This disables pango, though!
> Pango looks easy to build, but I think I'm done for now with building more libs, so anyone else: just fire up the wizzard and follow http://www.linuxfromscratch.org/blfs/view/7.6/x/pango.html 1:1 ;)
> Usually just takes a couple of minutes per dependency and can be done while doing other stuff ;)
> 
> Further discussion is needed to figure out what to do about the issues raised in #214 .

---

<div class="post-metadata">

**Author:** ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Post date:** [April 3, 2019, 6:59pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/15 "2019-04-03T18:59:40Z")

</div>

If you are on macOS Mojave, you could try [this](https://github.com/JuliaGraphics/Cairo.jl/issues/271#issuecomment-476827465).

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 3, 2019, 7:07pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/16 "2019-04-03T19:07:18Z")

</div>

Since that issue was last updated, it did get fixed, I think, but early in March this year it broke again, due to what looks like new `dlopen` errors for `pango` and `glib` (?) and there are some possible workrounds listed in more recent issues on Cairo.jl…

---

<div class="post-metadata">

**Author:** ![ezaron](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ezaron/32/18778_2.png) [@ezaron](https://discourse.julialang.org/u/ezaron)\
**Post date:** [April 3, 2019, 7:22pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/17 "2019-04-03T19:22:17Z")

</div>

Thanks a lot! The approach over at [Cannot build Cairo.jl on macOS Mojave · Issue #271 · JuliaGraphics/Cairo.jl · GitHub](https://github.com/JuliaGraphics/Cairo.jl/issues/271#issuecomment-476827465) seems to be making progress.

Another question, I’m not sure where to ask, but maybe you could provide leads:

Back in the pre-Julia-0.7 era, there was a problem with the Gtk version that Julia used on macOS: Gtk would not open an X-Window on a remote terminal (it only opened it on the desktop terminal). This was a problem for me because I like to used julia remotely via a “ssh -Y” to get to the command line (and this worked fine in Linux).

I worked around this by modifying the Gtk build to link against my macports Gtk library.

I have not been able to understand how make a similar changes under Julia-1.0.x. Can you point me to the right place to post a query about this, which might get the attention of someone knowledgeable?

---

<div class="post-metadata">

**Author:** ![ezaron](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ezaron/32/18778_2.png) [@ezaron](https://discourse.julialang.org/u/ezaron)\
**Post date:** [April 3, 2019, 7:26pm UTC](https://discourse.julialang.org/t/winston-and-the-dependency-of-cairo/18092/18 "2019-04-03T19:26:48Z")

</div>

SOLVED: Building Cairo (and Winston) with macOS mojave (10.14.4):

(1) Installed Julia-1.1.0 using the dmg from [Julialang.org](http://Julialang.org) downloads.

(2) using Pkg  
Pkg.add(“Homebrew”)  
using Homebrew  
Homebrew.brew(`unlink glib`)  
Homebrew.brew(`install --verbose --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/05871cb0394f78ef25a5c1c071456d0f1e4be4fe/Formula/glib.rb`)  
Pkg.add(“Cairo”) or Pkg.build(“Cairo”)  
Pkg.add(“Winston”)

(3) Success! Simple plots working from Winston displayed in X-Window on the desktop.
