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

C[omp]ute

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

Lepl parser for Python.

Colorless Green.

Photography around Santiago.

SVG experiment.

Professional Portfolio

Calibration of seismometers.

Data access via web services.

Cache rewrite.

Extending OpenSSH.

C-ORM: docs, API.

Last 100 entries

[Politics] The =?utf-8?B?d29ybGTigJlz?= most-surveilled cities; [Bike] Hope Freehub; [Restaurant] Mama Chau's (Chinese, Providencia); [Politics] Brexit Podcast; [Diary] Pneumonia; [Politics] Britain's Reichstag Fire moment; GPS Vehicle Tracking for Cat Soft LLC; install cairo; Credit Card Processing for Cat Soft LLC; [Programming] GCC Sanitizer Flags; VOIP quote for Cat Soft LLC; Copier Quotes for Cat Soft LLC; Costs; [GPU, Programming] Per-Thread Program Counters; Now Is Cat Soft LLC's Chance To Save Up To 32% On Mail; 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; [Link, Bike] Cheap Cycling Jerseys; [Link, Music] Music To Steal 2017; [Link, Future] Simulated Brain Drives Robot; [Link, Computing] Learned Index Structures; Solo Air Equalization; Update: Higher Pressures; Psychology; [Bike] Exercise And Fuel; Continental Race King 2.2; Removing Lowers; Mnesiacs; [Maths, Link] Dividing By Zero; [Book, Review] Ray Monk - Ludwig Wittgenstein: The Duty Of Genius; [Link, Bike, Computing] Evolving Lacing Patterns; [Jam] Strawberry and Orange Jam; [Chile, Privacy] Biometric Check During Mail Delivery; [Link, Chile, Spanish] Article on the Chilean Drought; [Bike] Extended Gear Ratios, Shimano XT M8000 (24/36 Chainring); [Link, Politics, USA] The Future Of American Democracy; Mass Hysteria; [Review, Books, Links] Kazuo Ishiguro - Never Let Me Go; [Link, Books] David Mitchell's Favourite Japanese Fiction; [Link, Bike] Rear Suspension Geometry; [Link, Cycling, Art] Strava Artwork; [Link, Computing] Useful gcc flags; [Link] Voynich Manuscript Decoded; [Bike] Notes on Servicing Suspension Forks; [Links, Computing] Snap, Flatpack, Appimage; [Link, Computing] Oracle is leaving Java (to die); [Link, Politics] Cubans + Ultrasonics; [Book, Link] Laurent Binet; VirtualBox; [Book, Link] No One's Ways; [Link] The Biggest Problem For Cyclists Is Bad Driving; [Computing] Doxygen, Sphinx, Breathe; [Admin] Brokw Recent Permalinks; [Bike, Chile] Buying Bearings in Santiago; [Computing, Opensuse] Upgrading to 42.3; [Link, Physics] First Support for a Physics Theory of Life; [Link, Bike] Peruvian Frame Maker; [Link] Awesome Game Theory Tit-For-Tat Thing; [Food, Review] La Fabbrica - Good Italian Food In Santiago; [Link, Programming] MySQL UTF8 Broken; [Link, Books] Latin American Authors

© 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 https://github.com/JuliaLang/Cairo.jl uses BinDeps
https://github.com/JuliaLang/BinDeps.jl - an easy way to see this is to note
that the Cairo package contains a deps directory, which itself contains a
build.jl file https://github.com/JuliaLang/Cairo.jl/blob/master/deps/build.jl

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.

So the question is - WHY DOESN'T IT USE THE CAIRO LIBRARY I HAVE ALREADY
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
required.

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.

Sorry for the CAPS but I AM FEELING KINDA SHOUTY RIGHT NOW.

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: http://docs.julialang.org
     _ _   _| |_  __ _   |  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.so.0", "libpango-1_0-0"])
   - Library "pango"
      - Satisfied by:
	- System Paths at /usr/lib64/libpango-1.0.so

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)

Andrew

An Easier Way

From: andrew cooke <andrew@...>

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

As described https://github.com/JuliaLang/BinDeps.jl/issues/164 (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,
   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/preloadable_libintl.so
	    - System Paths at /usr/lib64/libgettextpo.so
	  - 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/libgobject-2.0.so
	  - 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/libcairo.so
	  - 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/libpango-1.0.so
	  - 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/libpangocairo-1.0.so
	  - 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)

Andrew

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