Andrew Cooke | Contents | Latest | RSS | Previous | Next


Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

Personal Projects

Choochoo Training Diary

Last 100 entries

Surprise Paradox; [Books] Good Author List; [Computing] Efficient queries with grouping in Postgres; [Computing] Automatic Wake (Linux); [Computing] AWS CDK Aspects in Go; [Bike] Adidas Gravel Shoes; [Computing, Horror] Biological Chips; [Books] Weird Lit Recs; [Covid] Extended SIR Models; [Art] York-based Printmaker; [Physics] Quantum Transitions are not Instantaneous; [Computing] AI and Drum Machines; [Computing] Probabilities, Stopping Times, Martingales; bpftrace Intro Article; [Computing] Starlab Systems - Linux Laptops; [Computing] Extended Berkeley Packet Filter; [Green] Mainspring Linear Generator; Better Approach; Rummikub Solver; Chilean Poetry; Felicitations - Empowerment Grant; [Bike] Fixing Spyre Brakes (That Need Constant Adjustment); [Computing, Music] Raspberry Pi Media (Audio) Streamer; [Computing] Amazing Hack To Embed DSL In Python; [Bike] Ruta Del Condor (El Alfalfal); [Bike] Estimating Power On Climbs; [Computing] Applying Azure B2C Authentication To Function Apps; [Bike] Gearing On The Back Of An Envelope; [Computing] Okular and Postscript in OpenSuse; There's a fix!; [Computing] Fail2Ban on OpenSuse Leap 15.3 (NFTables); [Cycling, Computing] Power Calculation and Brakes; [Hardware, Computing] Amazing Pockit Computer; Bullying; How I Am - 3 Years Post Accident, 8+ Years With MS; [USA Politics] In America's Uncivil War Republicans Are The Aggressors; [Programming] Selenium and Python; Better Walking Data; [Bike] How Fast Before Walking More Efficient Than Cycling?; [COVID] Coronavirus And Cycling; [Programming] Docker on OpenSuse; Cadence v Speed; [Bike] Gearing For Real Cyclists; [Programming] React plotting - visx; [Programming] React Leaflet; AliExpress Independent Sellers; Applebaum - Twilight of Democracy; [Politics] Back + US Elections; [Programming,Exercise] Simple Timer Script; [News] 2019: The year revolt went global; [Politics] The world's most-surveilled cities; [Bike] Hope Freehub; [Restaurant] Mama Chau's (Chinese, Providencia); [Politics] Brexit Podcast; [Diary] Pneumonia; [Politics] Britain's Reichstag Fire moment; install cairo; [Programming] GCC Sanitizer Flags; [GPU, Programming] Per-Thread Program Counters; My Bike Accident - Looking Back One Year; [Python] Geographic heights are incredibly easy!; [Cooking] Cookie Recipe; Efficient, Simple, Directed Maximisation of Noisy Function; And for argparse; Bash Completion in Python; [Computing] Configuring Github Jekyll Locally; [Maths, Link] The Napkin Project; You can Masquerade in Firewalld; [Bike] Servicing Budget (Spring) Forks; [Crypto] CIA Internet Comms Failure; [Python] Cute Rate Limiting API; [Causality] Judea Pearl Lecture; [Security, Computing] Chinese Hardware Hack Of Supermicro Boards; SQLAlchemy Joined Table Inheritance and Delete Cascade; [Translation] The Club; [Computing] Super Potato Bruh; [Computing] Extending Jupyter; Further HRM Details; [Computing, Bike] Activities in ch2; [Books, Link] Modern Japanese Lit; What ended up there; [Link, Book] Logic Book; Update - Garmin Express / Connect; Garmin Forerunner 35 v 230; [Link, Politics, Internet] Government Trolls; [Link, Politics] Why identity politics benefits the right more than the left; SSH Forwarding; A Specification For Repeating Events; A Fight for the Soul of Science; [Science, Book, Link] Lost In Math; OpenSuse Leap 15 Network Fixes; Update; [Book] Galileo's Middle Finger; [Bike] Chinese Carbon Rims; [Bike] Servicing Shimano XT Front Hub HB-M8010; [Bike] Aliexpress Cycling Tops; [Computing] Change to ssh handling of multiple identities?; [Bike] Endura Hummvee Lite II; [Computing] Marble Based Logic; [Link, Politics] Sanity Check For Nuclear Launch; [Link, Science] Entropy and Life

© 2006-2017 Andrew Cooke (site) / post authors (content).

Julia's BinDeps (aka How To Install Cairo)

From: andrew cooke <andrew@...>

Date: Thu, 27 Aug 2015 19:53:03 -0300

I just wasted a few painful hours trying to install the Julia Cairo package.
Hopefully the following will help others avoid the frustration.

The Cairo package uses BinDeps - an easy way to see this is to note
that the Cairo package contains a deps directory, which itself contains a
build.jl file

That build.jl file is the spec that BinDeps uses to decide whether (and how)
it should build Cairo from source.

Building Cairo from source currently fails.  So we don't want to build Cairo
from source.  Unfortunately, Pkg.add("Cairo") did try to do so.

INSTALLED ON MY MACHINE?  And here is the answer.

If you look at the buuld.jl file linked above you'll see a neat, declarative
section inside an array called "deps" that specifies what libraries are

The frustrating thing is, as far as I can tell, ALL LIBRARIES MUST BE PRESENT.
If only one is missing, then EVERYTING is built from source.


So, if you're wondering why a package is being built from source, a simple way
to find out is to fire up julia:

  andrew@...:~/.julia/v0.4/Cairo> julia-trunk 
     _       _ _(_)_     |  A fresh approach to technical computing
    (_)     | (_) (_)    |  Documentation:
     _ _   _| |_  __ _   |  Type "help()" for help.
    | | | | | | |/ _` |  |
    | | |_| | | | (_| |  |  Version 0.4.0-dev+6774 (2015-08-17 10:35 UTC)
   _/ |\__'_|_|_|\__'_|  |  Commit f3217a8 (10 days old master)
  |__/                   |  x86_64-suse-linux

and load BinDeps

  julia> using BinDeps

and start BinDeps

  julia> @BinDeps.setup()
  library_dependency (generic function with 1 method)

and try testing different libraries.  Just cut+paste the initial part of each
description (ignoring the keyword arguments).

This kind of thing is OK:

  julia> pango = library_dependency("pango", aliases = ["libpango-1.0-0",
  "libpango-1.0","", "libpango-1_0-0"])
   - Library "pango"
      - Satisfied by:
	- System Paths at /usr/lib64/

But this kind of thing is NOT:

  julia> library_dependency("gettext", aliases = ["libintl", "preloadable_l
	 ibintl", "libgettextpo"])
   - Library "gettext"

When you get soemthing without a "Satisfied by" then you need to run to your
package manager and install it, toot sweet.

Note that (unless you are on Windows ha ha) you don't need to check a spec
that looks like 

  zlib = library_dependency("zlib", aliases = ["libzlib","zlib1"], 
                            os = :Windows, group = group)

because the "os = :Windows" means it's only required there.

And if you do all that, then clean things up:

  julia> Pkg.rm("Cairo")
  $ rm -fr ~/.julia/v0.4/Cairo

  julia> Pkg.add("Cairo")
  INFO: Installing Cairo v0.2.29
  INFO: Building Cairo
  INFO: Package database updated

everything works :o)


An Easier Way

From: andrew cooke <andrew@...>

Date: Thu, 27 Aug 2015 20:04:57 -0300

As described (cryptically)
you can also do the following:

  julia> using BinDeps

  julia> BinDeps.debug("Cairo")
  INFO: Reading build script...
  The package declares 1 dependencies.
   - Library Group "cairo" (satisfied by BinDeps.SystemPaths,
       - 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:
	    - System Paths at /usr/lib64/
	    - System Paths at /usr/lib64/
	  - Providers:
	    - BinDeps.AptGet package gettext (can't provide)
	    - BinDeps.Yum package gettext-libs (can't provide)
	    - Autotools Build
       - Library "gobject"
	  - Satisfied by:
	    - System Paths at /usr/lib64/
	  - Providers:
	    - 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"
	  - Satisfied by:
	    - System Paths at /usr/lib64/
	  - Providers:
	    - BinDeps.AptGet package libcairo2 (can't provide)
	    - BinDeps.Yum package cairo (can't provide)
	    - Autotools Build
       - Library "pango"
	  - Satisfied by:
	    - System Paths at /usr/lib64/
	  - Providers:
	    - BinDeps.AptGet package libpango1.0-0 (can't provide)
	    - BinDeps.Yum package pango (can't provide)
	    - Autotools Build
       - Library "pangocairo"
	  - Satisfied by:
	    - System Paths at /usr/lib64/
	  - Providers:
	    - 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)


install cairo

From: Shadrack <sofori@...>

Date: Fri, 2 Aug 2019 12:03:56 -0500

how do i install it on the package manager? I don=E2=80=99t have the =
'satisfied by=E2=80=99. Using julia 1.1 on a MacOSX El Capitan=20=

Comment on this post