Request For Help: BinaryBuilder for Gtk and Cairo

This is a request for help. Might there somebody interested in helping to provide a BinaryBuilder for Gtk and Cairo? Regularly I would say lets better solve the Homebrew issues on Mac but it seems to me that BinaryBuilder will be the future.

@sdanisch started working on a BinaryBuilder for Cairo which could be a good starting point. For me it is important that this will work hand in hand with a BinaryBuilder for Gtk.

Unfortunately I will not have the time (and experience) working on this myself. I put a lot of energy in upgrading Gtk.jl and Winston.jl to Julia 0.7 which are now working (despite the Homebrew installation issue on Mac). In Gtk there are still things preventing it to work on 1.0 and this will be what I will focus on.

I don’t know who to ask but still I ping some people who might be interested @jameson @Keno @staticfloat @jonathanBieler.

I never used BinaryBuilder but I might give it a try, I’ve tried reinstalling the last Gtk on v0.7 but I’m getting the infamous fontconfig issue.

There is a manual fix for that. See in the Cairo.jl issues.

Thanks Tobias to raise this. To put it into context: To make this happen, ALL dependencies of Gtk and Cairo (and Pango and Fontconfig and FreeType2 etc.) need proper builds and in the libcairo case this goes as far as X11/XCB (which btw is actually not soo complicated) and into glib which seems to have a showstopper in gettext (for Windows). Read as: some coordination will be needed and some help by Pkg (dependency tracking for binaries).

It looks manageable, but it clearly not a single-person actitvity (or how many linux distributions do you know, that are run single-person?).

Yes absolutely, I also think the we first should fix the Homebrew issue first (please anybody) but if the people behind BinDeps move over to BinaryBuilder we should also prepare the move. To motivate people behind BinaryBuilder even more: I would say that Gtk/Cairo could be the stress-test for BinaryBuilder. If building these things in a compatible way is possible (cross-platform! Using the quarz backend on Mac) then BinaryBuilder is really the future.

I can help only by complaining, sadly… :slight_smile: It would be nice to have Cairo working on Julia v1.0 soon, but I live in hope.

On linux + julia 1.0 doesn’t look like a problem. The workaround for fontconfig doesn’t work for you?

On Julia v1.0.0, Homebrew doesn’t work because of:

Error: Operation not permitted @ dir_s_mkdir - /Users/me/.julia/packages/Homebrew/l8kUw/deps/usr/Cellar
ERROR: failed process: Process(`/Users/me/.julia/packages/Homebrew/l8kUw/deps/usr/bin/brew reinstall fontconfig`, ProcessExited(1)) [1]

and Cairo doesn’t work because of:

┌ Error: Error building `Cairo`: 
│ ERROR: LoadError: syntax: misplaced assignment statement in "[libpng = library_dependency("png", aliases = ["libpng", "libpng-1.5.14", "libpng15", "", "libpng12"], 
runtime = false, group = group); pixman = library_dependency("pixman", aliases = ["libpixman",
 "libpixman-1", "libpixman-1-0", "libpixman-1.0"], depends = [libpng], runtime = false, group = group);
 libffi = library_dependency("ffi", aliases = ["libffi"], runtime = false, group = group); gettext =
 library_dependency("gettext", aliases = ["libintl", "preloadable_libintl", "libgettextpo"], os = :Unix, group
 = group); gobject = library_dependency("gobject", aliases = ["libgobject-2.0-0", "libgobject-2.0",
 "libgobject-2_0-0", ""], depends = [libffi, gettext], group = group); freetype =
 library_dependency("freetype", aliases = ["libfreetype"], runtime = false, group = group); fontconfig =
 library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", ""],
 depends = [freetype], runtime = false, group = group); cairo = library_dependency("cairo", aliases =
 ["libcairo-2", "libcairo", "", "libcairo2"], depends = [gobject, fontconfig, libpng], group =
 group, validate = validate_cairo_version); pango = library_dependency("pango", aliases = ["libpango
-1.0-0", "libpango-1.0", "", "libpango-1_0-0"], group = group); pangocairo =
 library_dependency("pangocairo", aliases = ["libpangocairo-1.0-0", "libpangocairo-1.0", "libpangocairo"], depends = [cairo], group = group); zlib = library_dependency("zlib", aliases = ["libzlib",
 "zlib1"], os = :Windows, group = group)]"
│ Stacktrace:
│  [1] include at ./boot.jl:317 [inlined]
│  [2] include_relative(::Module, ::String) at ./loading.jl:1038
│  [3] include(::Module, ::String) at ./sysimg.jl:29
│  [4] include(::String) at ./client.jl:388
│  [5] top-level scope at none:0
│ in expression starting at /Users/me/.julia/packages/Cairo/NBtbd/deps/build.jl:19

and both have trouble with LibCURL:

Building LibCURL ─────────→ `~/.julia/packages/LibCURL/yT2TD/deps/build.log`
┌ Error: Error building `LibCURL`: 
│ WARNING: could not import Compat.is_windows into Main
│ ERROR: LoadError: UndefVarError: is_windows not defined

@cormullion: It is not advised to use Julia 1.0 at the moment. Just use 0.7. The error here is within LibCURL and needs to be fixed, but Cairo.jl can only wait at the moment.

Aye, I was replying to Andreas’ comment that v1.0 works on Linux. I got everything working on v0.7.

With LibCURL now fixed, I can get everything working on version 1.0. (Celebration!)

but the syntax: misplaced assignment statement in ... error is not fixed yet in Cairo. To what package are you referring to?

The tests don’t seem to pick up that error…?

(v1.0) pkg> test Cairo
   Testing Cairo
    Status `/var/folders/0n/rxl1scks0f19tnxt9pgjcs_40000gp/T/tmp9bbRgJ/Manifest.toml`
  [9e28174c] BinDeps v0.8.9
  [b99e7846] BinaryProvider v0.4.1
  [e1450e63] BufferedStreams v1.0.0
  [159f3aea] Cairo v0.5.3
  [944b1d66] CodecZlib v0.5.0
  [3da002f7] ColorTypes v0.7.3
  [5ae59095] Colors v0.9.2 #master (
  [34da2185] Compat v1.0.1
  [864edb3b] DataStructures v0.11.0
  [5789e2e9] FileIO v1.0.1
  [53c48c17] FixedPointNumbers v0.5.2
  [a2bd30eb] Graphics v0.3.0
  [0862f596] HTTPClient v0.2.1
  [d9be37ee] Homebrew v0.7.0
  [033835bb] JLD2 v0.1.0
  [682c06a0] JSON v0.19.0
  [b27032c2] LibCURL v0.3.0
  [522f3ed2] LibExpat v0.4.2
  [2ec943e9] Libz v1.0.0
  [77ba4419] NaNMath v0.3.2
  [189a3867] Reexport v0.2.0
  [3bb67fe8] TranscodingStreams v0.8.0
  [30578b45] URIParser v0.4.0
  [c17dfb99] WinRPM v0.4.0
  [2a0f44e3] Base64  [`/Applications/`]
  [ade2ca70] Dates  [`/Applications/`]
  [8bb1440f] DelimitedFiles  [`/Applications/`]
  [8ba89e20] Distributed  [`/Applications/`]
  [b77e0a4c] InteractiveUtils  [`/Applications/`]
  [76f85450] LibGit2  [`/Applications/`]
  [8f399da3] Libdl  [`/Applications/`]
  [37e2e46d] LinearAlgebra  [`/Applications/`]
  [56ddb016] Logging  [`/Applications/`]
  [d6f4376e] Markdown  [`/Applications/`]
  [a63ad114] Mmap  [`/Applications/`]
  [44cfe95a] Pkg  [`/Applications/`]
  [de0858da] Printf  [`/Applications/`]
  [3fa0cd96] REPL  [`/Applications/`]
  [9a3f8284] Random  [`/Applications/`]
  [ea8e919c] SHA  [`/Applications/`]
  [9e88b42a] Serialization  [`/Applications/`]
  [1a1011a3] SharedArrays  [`/Applications/`]
  [6462fe0b] Sockets  [`/Applications/`]
  [2f01184e] SparseArrays  [`/Applications/`]
  [10745b16] Statistics  [`/Applications/`]
  [8dfed614] Test  [`/Applications/`]
  [cf7118a7] UUIDs  [`/Applications/`]
  [4ec0a83e] Unicode  [`/Applications/`]
Test Summary:   | Pass  Total
Image Surface   |    7      7
Test Summary:   | Pass  Total
Conversions     |    5      5
Test Summary:   | Pass  Total
TexLexer        |    1      1
Test Summary:   | Pass  Total
Samples         |   32     32
Test Summary:   | Pass  Total
Bitmap Painting |    6      6
Test Summary:   | Pass  Total
Vector Surfaces |   16     16
Test Summary:   | Pass  Total
Bitmap Surfaces |    3      3
Test Summary:   | Pass  Total
Assert/Status   |    7      7
Test Summary:   | Pass  Total
reset_transform |    6      6
   Testing Cairo tests passed

ok, this seems not to be a fresh build, where you would have got errors. You might have build with Julia 0.7 and then it will also work in Julia 1.0.

Anyway. I have fixed this upstream and once is merged everyone can get Cairo working on 1.0. Just on Mac the Homebrew issues remain.