Cairo install problems

296 views
Skip to first unread message

le...@neilson-levin.org

unread,
Oct 5, 2015, 3:49:50 PM10/5/15
to julia-users


Posted, but for some reason the post disappeared as I am new to the group.

Ran BinDep.debug("Cairo") --nice feature!--to see if I could figure out more.  

It suggests that dependencies that failed to build aren't needed on my platform (which makes on wonder why any attempt to build them occurred...).

Here is the output:

julia> BinDeps.debug("Cairo")

INFO: Reading build script...

The package declares 1 dependencies.

 - Library Group "cairo"

     - Library "png" (not applicable to this system)

     - Library "pixman" (not applicable to this system)

     - Library "ffi" (not applicable to this system)

     - Library "gettext"

        - Satisfied by:

          - Homebrew Bottles gettext at /Users/lewislevinmbr/.julia/v0.4/Homebrew/deps/usr/lib/libintl.dylib

          - Homebrew Bottles gettext at /Users/lewislevinmbr/.julia/v0.4/Homebrew/deps/usr/lib/libgettextpo.dylib

        - Providers:

          - Homebrew Bottles gettext

          - BinDeps.AptGet package gettext (can't provide)

          - BinDeps.Yum package gettext-libs (can't provide)

          - Autotools Build

     - Library "gobject"

        - Satisfied by:

          - Homebrew Bottles glib at /Users/lewislevinmbr/.julia/v0.4/Homebrew/deps/usr/lib/libgobject-2.0.dylib

        - Providers:

          - Homebrew Bottles glib

          - BinDeps.AptGet package libglib2.0-0 (can't provide)

          - BinDeps.Yum package glib2 (can't provide)

          - Autotools Build

     - Library "freetype" (not applicable to this system)

     - Library "fontconfig" (not applicable to this system)

     - Library "cairo"

        - Providers:

          - Homebrew Bottles cairo

          - BinDeps.AptGet package libcairo2 (can't provide)

          - BinDeps.Yum package cairo (can't provide)

          - Autotools Build

     - Library "pango"

        - Providers:

          - Homebrew Bottles pango

          - BinDeps.AptGet package libpango1.0-0 (can't provide)

          - BinDeps.Yum package pango (can't provide)

          - Autotools Build

     - Library "pangocairo"

        - Providers:

          - Homebrew Bottles pango

          - BinDeps.AptGet package libpango1.0-0 (can't provide)

          - BinDeps.Yum package pango (can't provide)

          - Autotools Build

     - Library "zlib" (not applicable to this system)


But, when I run using Cairo, it fails to precompile:


julia> using Cairo

INFO: Precompiling module Cairo...

ERROR: LoadError: could not open file /Users/lewislevinmbr/.julia/v0.4/Cairo/src/../deps/deps.jl

 in include at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include_from_node1 at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include_from_node1 at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib

 [inlined code] from none:2

 in anonymous at no file:0

 in process_options at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib

 in _start at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib

while loading /Users/lewislevinmbr/.julia/v0.4/Cairo/src/Cairo.jl, in expression starting on line 7

ERROR: Failed to precompile Cairo to /Users/lewislevinmbr/.julia/lib/v0.4/Cairo.ji

 in error at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib

 in compilecache at loading.jl:383

 in require at /Applications/Julia-0.4.0-rc4.app/Contents/Resources/julia/lib/julia/sys.dylib



The reason I want Cairo is for Gadfly.  This is just one of several Gadfly dependencies that fail to build.  In my other post I pointed out that this seems to become a serious general problem for the Julia community.  The deep dependency stacks of packages lead to many failures that are hard to debug leading to a general impression of fragility.  Since there is not any reasonable "native" graphics package for Julia (though PyPlot works quite well), we are thus compelled to the deep dependency stacks.  So, that problem needs to be solved.  But, perhaps a higher priority is native graphics.

le...@neilson-levin.org

unread,
Oct 5, 2015, 4:03:02 PM10/5/15
to julia-users
More cairo debugging.   Pkg.status() shows both Cairo and Gadfly as installed.
But, trying to use Cairo:

julia> using Gadfly

INFO: Precompiling module Gadfly...

ERROR: LoadError: could not open file /Users/lewislevinmbr/.julia/v0.4/Cairo/src/../deps/deps.jl


Note the load error. Well, there is no such deps.jl anywhere in the Cairo package tree.  So, of course it can't be loaded.

I also installed cairo, successfully, with homebew outside of julia, but that doesn't help julia in the slightest.

This stuff seems rather fragile and the source of many problems.

le...@neilson-levin.org

unread,
Oct 5, 2015, 7:15:39 PM10/5/15
to julia-users
OK.  Solved by the usual expedient of deleting .julia and starting over.  Not clear always what happens, but if you try to do too much to a new install of Julia (0.4.0-rc4 in this case) it just hasn't settled down.

I quickly got PyPlot and all dependencies and Gadfly and some of its dependencies installed.  Now I just need to test with pdf output to see if Cairo got installed.

Call it resolved and no new information that hasn't been reported many times before.

BTW, loving Julia.  I will post a benchmark of a machine learning simulation with Python, Cython, Pypy, Python/Numba, Nim (compiled).

Great syntax all 'round.  Speed without fussing.  Library support will happen.

le...@neilson-levin.org

unread,
Oct 5, 2015, 7:48:36 PM10/5/15
to julia-users
I guess I am not quite ready to call this closed. Gadfly installed successfully without dependency Cairo.  But, of course, Cairo is needed for pdf and png output.  

Cairo won't install.  Now it gets stuck trying to install pixman.  Looks like a bug in the make file.  I won't bother pasting in the trace; I'll report over at Homebrew julia dev as recommended.

Comments about too many dependencies and too much fragility apply.

Julia needs a "native" graphics package (whatever "native" may mean...).



On Monday, October 5, 2015 at 12:49:50 PM UTC-7, le...@neilson-levin.org wrote:

le...@neilson-levin.org

unread,
Oct 5, 2015, 9:24:04 PM10/5/15
to julia-users
An update.  There is a pull request on juliadep at github for a new brew formula that fixes the problem. Unfortunately, staticfloat hasn't started creating bottles (binaries) for el capitan so no immediate solution.

However, the new formula is available as a commit.  Anyway I can get Homebrew.jl to use a specific commit from github.  Pkg.clone() doesn't seem to do it and there appears to be no way to get Homebrew to do it.

Guess I'll have to wait.

Tim Holy

unread,
Oct 5, 2015, 10:26:30 PM10/5/15
to julia...@googlegroups.com
Thanks for your patience. Indeed, binary dependencies are a pain, but
persistent people like you help iron out some of the wrinkles for everyone
else.

Best,
--Tim

le...@neilson-levin.org

unread,
Oct 5, 2015, 11:11:11 PM10/5/15
to julia-users
The nice people at Homebrew/juliadeps, aka staticfloat, aka Elliott Saba, merged the change into master and now the latest installs by default and 

IT WORKS. 


Andreas Lobinger

unread,
Oct 6, 2015, 1:00:10 AM10/6/15
to julia-users
Hello colleague,

When i read the thread correctly, you have now a solution. Just for completness and if someone runs into the same problem:


On Monday, October 5, 2015 at 9:49:50 PM UTC+2, le...@neilson-levin.org wrote:

Posted, but for some reason the post disappeared as I am new to the group.

Ran BinDep.debug("Cairo") --nice feature!--to see if I could figure out more.  
...
It suggests that dependencies that failed to build aren't needed on my platform (which makes on wonder why any attempt to build them occurred...).
But, when I run using Cairo, it fails to precompile:


julia> using Cairo

INFO: Precompiling module Cairo...

ERROR: LoadError: could not open file /Users/lewislevinmbr/.julia/v0.4/Cairo/src/../deps/deps.jl

 

le...@neilson-levin.org

unread,
Oct 6, 2015, 12:19:11 PM10/6/15
to julia-users

No, actually, it was different: the brew formula needs to be changed and a new "bottle" for el capitan had to be created.

But, it is solved due to Elliot and Meris' great work.  (and prompt...!)
Reply all
Reply to author
Forward
0 new messages