Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Julia-0.4 drawing to png backend fails. #651

Closed
GravityAssisted opened this issue Aug 4, 2015 · 4 comments
Closed

Julia-0.4 drawing to png backend fails. #651

GravityAssisted opened this issue Aug 4, 2015 · 4 comments

Comments

@GravityAssisted
Copy link

I am trying to use the latest version of Gadfly on Juli-0.4 (Version 0.4.0-dev+6307 (2015-07-27 22:18 UTC))

The command

draw(PNG("test.png",6inch,6inch),m)

throws the following error:

ERROR: Cairo must be installed to use the PNG backend.
 in PNG at /home/arora/.julia/v0.4/Compose/src/Compose.jl:137

Looks like it cannot find Cairo, though I already have it installed.

Julia-0.4 is not the default Julia on my system and I use it by giving the full path to the installation src directory. Is the reason for this error ?

thanks

@GravityAssisted
Copy link
Author

Looks like the error is similar to #637 but I didn't get any warnings from Cairo and it loads just fine. I did get a bunch of warnings while I loaded Gadfly.

WARNING: New definition 
    -(DataArrays.DataArray, Base.Range{T<:Any}) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType}) at dates/arithmetic.jl:103.
To fix, define 
    -(DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType})
before the new definition.
WARNING: New definition 
    -(DataArrays.DataArray, AbstractArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType}) at dates/arithmetic.jl:103.
To fix, define 
    -(DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType})
before the new definition.
WARNING: New definition 
    -(DataArrays.DataArray, AbstractArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}) at dates/arithmetic.jl:88.
To fix, define 
    -(DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any}, Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}})
before the new definition.
WARNING: New definition 
    -(DataArrays.DataArray, AbstractArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:105.
To fix, define 
    -(DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(DataArrays.AbstractDataArray, Base.Range{T<:Any}) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType}) at dates/arithmetic.jl:103.
To fix, define 
    -(DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType})
before the new definition.
WARNING: New definition 
    -(Base.Range{T<:Any}, DataArrays.DataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(Base.Range{#T<:Base.Dates.TimeType}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:104.
To fix, define 
    -(Base.Range{#T<:Base.Dates.TimeType}, DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(Base.Range{T<:Any}, DataArrays.AbstractDataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(Base.Range{#T<:Base.Dates.TimeType}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:104.
To fix, define 
    -(Base.Range{#T<:Base.Dates.TimeType}, DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(AbstractArray, DataArrays.DataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:90.
To fix, define 
    -(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(AbstractArray, DataArrays.DataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(Base.Range{#T<:Base.Dates.TimeType}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:104.
To fix, define 
    -(Base.Range{#T<:Base.Dates.TimeType}, DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(AbstractArray, DataArrays.DataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:105.
To fix, define 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(DataArrays.AbstractDataArray, AbstractArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType}) at dates/arithmetic.jl:103.
To fix, define 
    -(DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any}, Base.Range{#T<:Base.Dates.TimeType})
before the new definition.
WARNING: New definition 
    -(DataArrays.AbstractDataArray, AbstractArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}) at dates/arithmetic.jl:88.
To fix, define 
    -(DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any}, Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}})
before the new definition.
WARNING: New definition 
    -(DataArrays.AbstractDataArray, AbstractArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:105.
To fix, define 
    -(DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(AbstractArray, DataArrays.AbstractDataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:90.
To fix, define 
    -(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(AbstractArray, DataArrays.AbstractDataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(Base.Range{#T<:Base.Dates.TimeType}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:104.
To fix, define 
    -(Base.Range{#T<:Base.Dates.TimeType}, DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    -(AbstractArray, DataArrays.AbstractDataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:105.
To fix, define 
    -(AbstractArray{#T<:Base.Dates.TimeType, N<:Any}, DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    +(AbstractArray, DataArrays.DataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:326
is ambiguous with: 
    +(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:90.
To fix, define 
    +(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, DataArrays.DataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.
WARNING: New definition 
    +(AbstractArray, DataArrays.AbstractDataArray) at /home/arora/.julia/v0.4/DataArrays/src/operators.jl:349
is ambiguous with: 
    +(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, AbstractArray{#T<:Base.Dates.TimeType, N<:Any}) at dates/arithmetic.jl:90.
To fix, define 
    +(Union{DenseArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any}, Base.SubArray{#P<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, N<:Any, A<:DenseArray, I<:Tuple{Vararg{Union{Base.Colon, Base.Range{Int64}, Int64}}}, LD<:Any}}, DataArrays.AbstractDataArray{#T<:Base.Dates.TimeType, N<:Any})
before the new definition.

WARNING: deprecated syntax "zip (" at /home/arora/.julia/v0.4/Gadfly/src/scale.jl:797.
Use "zip(" instead.

@timholy
Copy link
Collaborator

timholy commented Aug 4, 2015

If you update to a more recent julia, most/all of those ambiguity warnings should have been fixed by JuliaLang/julia#12370

@GravityAssisted
Copy link
Author

Wow ! Switching to the latest version of Julia and recompiling Gadfly (via Base.compile) fixes everything.. I am loving 0.4

@jgoldfar
Copy link

Came here to report that this issue re-appeared in the v0.4 RC, but it turns out I was caught by a precompilation gotcha I didn't expect; within a REPL session, using Gadfly even after e.g. Pkg.checkout("Gadfly") does not trigger recompilation...
Unrelated note (I know the RC is brand new) you may want to add a notice somewhere that for v0.4 support, the latest Gadfly (and Compose?) are required, it seems.
Thanks for the excellent package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants