Building package dependencies -> Failure for Cairo on Macs

@kran574 are you on Mac? And on the latest version of MacOS, or some older version?

Yes. I am on Mac. Just updated to version 10.14.15.

@kran574 are you coming to the workshop tomorrow? We have some time scheduled to help with computer problems, so we might try to fix this tomorrow during that session.

In the meantime, here are some other leads: could you post the exact output that you see when things fail? A screenshot or just a copy of all the text in the console would be super helpful. If you don’t want to share that stuff publicly, feel free to email it to me.

You can also try the add Mimi#macfix command at the julia pkg repl (which you enter by pressing ]). That will install a version of Mimi that doesn’t depend on Cairo.jl. There are some features that won’t work with that version, but at least you can install things.

This is what I got so far.

Yes, I will be in the workshop tomorrow.

Ah, ok! The free Mimi command will undo the add Mimi#macfix command. So my best guess is that if you do add Mimi#macfix and then try using MimiFUND, things might work.

We’ll try to sort out the Cairo issue for you tomorrow as well!

this issue has been resolved, see PSA macfix branch

If you’re considering removing the macfix in a future release, please don’t. Cairo and Rsvg are still causing problems on some systems, so the macfix can still be useful.

Hi @AlexandrePavlov, to clarify this, the fix was internal meaning we have removed our dependence on Cairo and Rsvg so Mimi is now independent of those packages because VegaLite.jl is independent of them. You can make sure your versions are ok and you are updated by typing:

pkg> free Mimi

to get the latest tagged version of Mimi (or pkg> add Mimi#master if you want the very latest master branch) and then

pkg> up

to make sure all of your packages are updated. Now if you type

pkg> st

you should see VegaLite v0.7.0 in the list of installed packages.

Let me know if there are any problems. As you indicate the #macfix branch will become out of date rather quickly as we have some changes in our upcoming release so I wouldn’t want to cause confusion.

@lrennels, following these commands breaks Mimi for me. When I remove Mimi and try to install the main branch, I get errors when Julia attempts to build Cairo and Rsvg. Whatever the problem is, installing Mimi using the #macfix branch instead solves it. The system in question is a server, so I realize this is a very specific use case scenario that might be hard to account for.

@davidanthoff ideas here?

Yeah, should (at least in theory) have gotten rid of the Cairo.jl and Rsvg.jl dependency entirely.

You might try to first issue ] up to make sure you have all the latest registry info, and then do ] add VegaLite. Could you then report what you get for ] st? I.e. what version of VegaLite.jl it is installing?

@lrennels @davidanthoff Just wanted to resurrect this issue, less to do with Mimi and more to do with integrating some outdated, but required Julia packages for a project.

@kar5469 and I are working on a new climate/methane cycle model that requires the Julia MCMC Klara package. However, the Klara package is no longer being updated so we need to use pre-v1.0 versions of Julia (and old versions of Mimi), to be able to calibrate the model if we want to keep it in the Mimi framework. Kristina (who works on a Mac) is now having issues with Cairo and Rsvg again, and cannot add the older version of Mimi to her machine.

I know this is a bit of an odd/niche issue, but any thoughts on ways to resolve this other than just re-coding the Klara package to work with Julia v1.0+?

Thanks in advance!

@FrankErrickson - @davidanthoff and I just chatted about this and I think there are a few options we can try.

In the long run if we want to keep using Klara we are probably going to want to port that package, or more simply just the part of the package you use, over to v1.0 but for now we can create a branch or released tag of the last stable version of Mimi that did not depend on VegaLite, since that package does not support previous versions of Julia, and thus won’t be usable for your purposes and will probably keep causing problems.

@lrennels Ok cool and thanks, this is helpful! Agree about having to port Klara over at some point, but having the temporary fix will let us work on the model development right away.

And just to clarify, everything is working on my end. But @kar5469 is having the issues with her Mac. Could you just let us know when the branch or released tag is up and then we can get Kristina up and running with all the old stuff?

I created a branch called macfix-julia-0.6 for Mimi.jl that is a version that doesn’t require VegaLite.jl and is targeting julia 0.6. I think for folks on Mac they should be able to install that branch. I have to admit that I forgot how you install a specific branch of a package with the package manager of julia 0.6, but it should be fairly easy to figure that out from the documentation.

Let us know if this doesn’t work as a fix!

I don’t remember off the top of my head either, only how to pin a tagged version but not branch … I can look into the docs to help though @FrankErrickson

Taking a look here and in particular this paragraph:

“You may want to use the master version of a package rather than one of its registered versions. There might be fixes or functionality on master that you need that aren’t yet published in any registered versions, or you may be a developer of the package and need to make changes on master or some other development branch. In such cases, you can do Pkg.checkout(pkg) to checkout the master branch of pkg or Pkg.checkout(pkg,branch) to checkout some other branch …”

I think something like

Pkg.add(“Mimi”)
Pkg.checkout(“Mimi”, “macfix-julia-0.6”)

Should do the trick!

Hi Lisa,

I follow your directions and when I go to checkout there is an error about tracking information for the branch.

INFO: Checking out Mimi macfix-julia-0.6…

ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.)

Hey! I ended up wiping the .julia folder and starting from scratch. Your fix made it work. Only issue right now is when I try an example the explore() function is showing an error. Possibly not finding the correct directory.

julia> explore(m)

ERROR: could not spawn /Users/kar5469/.julia/v0.6/Electron/src/../deps/electron/Julia.app/Contents/MacOS/Julia /Users/kar5469/.julia/v0.6/Electron/src/main.js juliaelectron-606-2 juliaelectron-sysnotify-606-2: no such file or directory (ENOENT)

Stacktrace:

[1] _jl_spawn( ::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::Base.DevNullStream, ::Base.DevNullStream, ::Base.DevNullStream ) at ./process.jl:360

[2] #376 at ./process.jl:512 [inlined]

[3] setup_stdio( ::Base.##376#377{Cmd}, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream} ) at ./process.jl:499

[4] #spawn#375( ::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream} ) at ./process.jl:511

[5] (::Base.#kw##spawn)( ::Array{Any,1}, ::Base.#spawn, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream} ) at ./:0

[6] Electron.Application() at /Users/kar5469/.julia/v0.6/Electron/src/Electron.jl:107

[7] #explore#114( ::String, ::Function, ::Mimi.Model ) at /Users/kar5469/.julia/v0.6/Mimi/src/explorer/explore.jl:25

[8] explore( ::Mimi.Model ) at /Users/kar5469/.julia/v0.6/Mimi/src/explorer/explore.jl:15

Hi! I’m glad it’s working now! Unfortunately the explore function won’t be available to you on this older version of Mimi, since it requires Julia 1.0 now, so that is to be expected.