Building package dependencies -> Failure for Cairo on Macs

Hi all,

I am trying to build the Mimi model on my MacBook Pro for the first time. It adds and installs all of the package dependencies first but, it looks like it fails to add “Cairo” one of the graphing packages. (https://github.com/JuliaGraphics/Cairo.jl) Because of this one package dependency, I’m unable to install Mimi.

The error with Cairo seems to be unique to Macs and has an open discussion on Github (https://github.com/JuliaPackaging/Homebrew.jl/issues/253).

Let me know what I can do in the meantime to help with this issue,
Kristina Rolph
Penn State University

Hi, Kristina. I had a problem with Cairo on my Mac a while back and got it going with this bit of magic:

using Homebrew
Homebrew.brew(`reinstall fontconfig`)
Pkg.build("Cairo")

Though that was back in September, which is eons ago in Julia time. Good luck!

Hey all,

I’m working with Kristina on a project and haven’t been able to help sort out her Mimi installation issue. @plevin it seems like your suggestion also no longer works.

Is this something specific to Kristina’s machine, or is there a general issue with installing Mimi on Macs?

Thanks!

This is a generic issue with Cairo.jl on Mac right now. It is obviously very frustrating… I don’t have a good way out right now, but we’ll talk about it tomorrow in our project meeting.

We might have a workaround for Mac for now: at the pkg REPL (which you enter by pressing ] at the normal julia REPL) execute the following command:

add Mimi#macfix

This will install a special version of Mimi that removes the dependency on Cairo.jl, and therefore should hopefully just work.

The drawback is that it removes one piece of functionality related to plotting. We are working on a proper fix that makes everything just work, but for now this is the best option we have, and at least it should enable you to install things on Mac and use almost all the normal functionality.

The thing that doesn’t work with this special version of Mimi is to call explore(m, comp_name, datum_name) function, i.e. to extract a pre-canned plot for a specific variable/parameter.

Thanks David! This did the trick. I’m not sure exactly how you did it but I’m able to use explore(m) and electron opens up a window with the variables and plots.

This is great, thanks!

Hi there, explore should still work, it’s just the explore of a specific component and variable or parameter that normally pulls up a single saveable plot that won’t work for now.

@kar5469: I think the bug with Cairo.jl should now be fixed properly. Could you try to execute the following commands on your pkg REPL:

pkg> up

and then

pkg> free Mimi

and let us know whether that works on your system? If it doesn’t, you can just go back to the temporary fix that you have been using for a while.

That works! Thanks for letting me know.

Excellent! I’ll delete the specific Mimi#macfix branch then. If the proble reappears we can recreate it.

Still having problem installing Cairo after trying out tips in the thread. Any suggestions? Thanks.

@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.