JuliaGraphics / Cairo.jl

Bindings to the Cairo graphics library.
Other
87 stars 55 forks source link

Cannot build Cairo.jl on macOS Mojave #271

Closed ronisbr closed 5 years ago

ronisbr commented 5 years ago

Hi guys!

I am trying to build Cairo.jl on macOS Mojave (clean Julia installation) and I am getting the following error:

┌ Error: Error building `Cairo`:
│ ==> Installing graphite2 from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/graphite2-1.3.13.mojave.bottle.tar.gz
│ Already downloaded: /Users/ronan.arraes/Library/Caches/Homebrew.jl/downloads/36f9054572b26853c4726b48a48041476190c6e2069d088be488bd9489445ade--graphite2-1.3.13.mojave.bottle.tar.gz
│ ==> Pouring graphite2-1.3.13.mojave.bottle.tar.gz
│ 🍺  /Users/ronan.arraes/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/graphite2/1.3.13: 18 files, 232.2KB
│ Warning: Already linked: /Users/ronan.arraes/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/graphite2/1.3.13
│ ==> Installing gettext from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.mojave.bottle.tar.gz
│ Already downloaded: /Users/ronan.arraes/Library/Caches/Homebrew.jl/downloads/20fb183d8882abab5874937646456a6d73fcd3510ec65a0b2a54fdfeb0174519--gettext-0.19.8.1.mojave.bottle.tar.gz
│ ==> Pouring gettext-0.19.8.1.mojave.bottle.tar.gz
│ ==> Caveats
│ gettext is keg-only, which means it was not symlinked into /Users/ronan.arraes/.julia/packages/Homebrew/s09IX/deps/usr,
│ because macOS provides the BSD gettext library & some software gets confused if both are in the library path.
│
│ If you need to have gettext first in your PATH run:
│   echo 'export PATH="/Users/ronan.arraes/.julia/packages/Homebrew/s09IX/deps/usr/opt/gettext/bin:$PATH"' >> ~/.zshrc
│
│ For compilers to find gettext you may need to set:
│   export LDFLAGS="-L/Users/ronan.arraes/.julia/packages/Homebrew/s09IX/deps/usr/opt/gettext/lib"
│   export CPPFLAGS="-I/Users/ronan.arraes/.julia/packages/Homebrew/s09IX/deps/usr/opt/gettext/include"
│
│ ==> Summary
│ 🍺  /Users/ronan.arraes/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/gettext/0.19.8.1: 1,935 files, 16.9MB
│
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/ronan.arraes/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 20714313 (Pool: 20711314; Big: 2999); GC: 46
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

Trying to build manually Cairo leads to:

julia> Pkg.build("Cairo")
  Building LibCURL ─→ `~/.julia/packages/LibCURL/OoXMv/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
┌ Error: Error building `Cairo`:
│
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/ronan.arraes/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19803997 (Pool: 19801167; Big: 2830); GC: 44
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
mcmcgrath13 commented 5 years ago

I am also getting this error, both locally and on Travis

aramirezreyes commented 5 years ago

Me as well. Using Julia Version 1.0.2 (2018-11-08) Mac Os Mojave 10.14.3

cormullion commented 5 years ago

I can now see this error on Travis, which looks to have been introduced since I last ran it (which was 5 days ago, Tuesday):

https://travis-ci.org/JuliaGraphics/Luxor.jl/jobs/503554126

(Although Travis builds on the previous macOS release rather than the latest Mojave, I think.)

It might be a fontconfig/pango problem?

lobingera commented 5 years ago

@cormullion It's obviously a homebrew/brew problem in the first place. Do you have a build log with homebrew version output available?

cormullion commented 5 years ago

Only the Travis logs I limked to... I've not had the problem locally (i've pinned a few things to avoid these productivity-ruining issues.. :).

sdanthine commented 5 years ago

Get similar tasting error: ┌ Error: Error building Cairo: │ │ signal (11): Segmentation fault: 11 │ in expression starting at /Users/sdanthine/.julia/packages/Cairo/CXPG1/deps/build.jl:165 │ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line) │ Allocations: 19234553 (Pool: 19231774; Big: 2779); GC: 42

Funny thing is, managed to build it on one computer, not on the other. Both are Mac Mojave, both times initially Queryverse needed Cairo.

Below is the message I get from initial install of Queryverse. Any ideas where to go? Thanks

┌ Error: Error building Cairo, showing the last 100 of log: │ See: https://docs.brew.sh/Homebrew-and-Python │ ==> Summary │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/python/3.7.2_2: 3,861 files, 59.7MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/python/3.7.2_2 │ ==> Installing libffi from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/libffi-3.2.1.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/89b4ef328be250153e7a2b39982ac446e0b3bbfe7f3e2708912ba1976862c302--libffi-3.2.1.mojave.bottle.tar.gz │ ==> Pouring libffi-3.2.1.mojave.bottle.tar.gz │ ==> Caveats │ libffi is keg-only, which means it was not symlinked into /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr, │ because some formulae require a newer version of libffi. │ │ For compilers to find libffi you may need to set: │ export LDFLAGS="-L/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/opt/libffi/lib" │ │ For pkg-config to find libffi you may need to set: │ export PKG_CONFIG_PATH="/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/opt/libffi/lib/pkgconfig" │ │ ==> Summary │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/libffi/3.2.1: 16 files, 297.0KB │ ==> Installing glib from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/glib-2.60.0_1.mojave.bottle.tar.gz │ ==> Pouring glib-2.60.0_1.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.0_1: 432 files, 15.3MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.0_1 │ ==> Installing libpng from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.36.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/b401f5b07a537975da7de448c4bbdaf0c2112d5dc7d8e0955e0d4fb938909010--libpng-1.6.36.mojave.bottle.tar.gz │ ==> Pouring libpng-1.6.36.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/libpng/1.6.36: 27 files, 1.2MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/libpng/1.6.36 │ ==> Installing freetype from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/freetype-2.9.1.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/89f20f0e2fae652cad0bf2c354912f65951b055050a0cf525f6a67939cb6e682--freetype-2.9.1.mojave.bottle.tar.gz │ ==> Pouring freetype-2.9.1.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/freetype/2.9.1: 60 files, 2.6MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/freetype/2.9.1 │ ==> Installing fontconfig from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.13.1.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/b7ad94d49bcdca22738f50b570efc07c7a20f98a469b3c4b32198b7318b8af5a--fontconfig-2.13.1.mojave.bottle.tar.gz │ ==> Pouring fontconfig-2.13.1.mojave.bottle.tar.gz │ ==> Regenerating font cache, this may take a while │ ==> /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fontconfig/2.13.1/bin/fc-cache -frv │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fontconfig/2.13.1: 531 files, 3.3MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fontconfig/2.13.1 │ ==> Installing pixman from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/pixman-0.38.0.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/0c26d4c3daf0b26cd91366caf1df3eca0bad5611e9742a0f8b409d6b80fc6a53--pixman-0.38.0.mojave.bottle.tar.gz │ ==> Pouring pixman-0.38.0.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pixman/0.38.0: 13 files, 1.3MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pixman/0.38.0 │ ==> Installing cairo from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/cairo-1.16.0.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/fafc9fd181a939883ef055697994edea57d091a35299109bf774fc91092fbae7--cairo-1.16.0.mojave.bottle.tar.gz │ ==> Pouring cairo-1.16.0.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo/1.16.0: 117 files, 5.5MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo/1.16.0 │ ==> Installing icu4c from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/icu4c-63.1.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/88108185da55bf1af475d5e191e97f633514bd24c1c70bb89029af6cf5cc5185--icu4c-63.1.mojave.bottle.tar.gz │ ==> Pouring icu4c-63.1.mojave.bottle.tar.gz │ ==> Caveats │ icu4c is keg-only, which means it was not symlinked into /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr, │ because macOS provides libicucore.dylib (but nothing else). │ │ If you need to have icu4c first in your PATH run: │ echo 'export PATH="/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/bin:$PATH"' >> ~/.bash_profile │ echo 'export PATH="/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile │ │ For compilers to find icu4c you may need to set: │ export LDFLAGS="-L/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/lib" │ export CPPFLAGS="-I/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/include" │ │ For pkg-config to find icu4c you may need to set: │ export PKG_CONFIG_PATH="/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/lib/pkgconfig" │ │ ==> Summary │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/icu4c/63.1: 254 files, 68.4MB │ ==> Installing fribidi from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/fribidi-1.0.5.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/b966c6f589c81500014b64f8e15ff29e9b70f3e7ee8e0b0b5851f700c2ad0fa4--fribidi-1.0.5.mojave.bottle.tar.gz │ ==> Pouring fribidi-1.0.5.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fribidi/1.0.5: 66 files, 581.4KB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fribidi/1.0.5 │ ==> Installing harfbuzz from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/harfbuzz-2.3.1.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/784a181552c10546bdab9595d963a36fa65d6e17cc04609285349cb81be623b9--harfbuzz-2.3.1.mojave.bottle.tar.gz │ ==> Pouring harfbuzz-2.3.1.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/harfbuzz/2.3.1: 180 files, 9.5MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/harfbuzz/2.3.1 │ ==> Installing pango from staticfloat/juliatranslated │ ==> Downloading https://homebrew.bintray.com/bottles/pango-1.42.4_1.mojave.bottle.tar.gz │ Already downloaded: /Users/sdanthine/Library/Caches/Homebrew.jl/downloads/f7d576fd30d48fab15ea38e97c79854a517864b3a64199be1550eb79e1143cf3--pango-1.42.4_1.mojave.bottle.tar.gz │ ==> Pouring pango-1.42.4_1.mojave.bottle.tar.gz │ 🍺 /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pango/1.42.4_1: 106 files, 4.4MB │ Warning: Already linked: /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pango/1.42.4_1 │ │ signal (11): Segmentation fault: 11 │ in expression starting at /Users/sdanthine/.julia/packages/Cairo/CXPG1/deps/build.jl:165 │ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line) │ Allocations: 20858472 (Pool: 20855284; Big: 3188); GC: 46 │ │ Full log at /Users/sdanthine/.julia/packages/Cairo/CXPG1/deps/build.log

lobingera commented 5 years ago

I can see the same thing on a recent build in travis. My first (and only) guess is, something changed in brew,

cormullion commented 5 years ago

It's confusing me that Travis is running:

ProductName:    Mac OS X
ProductVersion: 10.13.3

(which is High Sierra, not Mojave).

jonathanBieler commented 5 years ago

Can this be reproduced using brew alone :

brew install cairo

/Users/username/.julia/packages/Homebrew/s09IX/deps/usr/bin/brew install cairo

?

sdanthine commented 5 years ago

I did /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/bin/brew reinstall cairo

then tried using Queryverse with error as below once more. Really puzzing to me.

[ Info: Precompiling Queryverse [612083be-0b0f-5412-89c1-4e7c75506a58]
ERROR: LoadError: Cairo not properly installed. Please run
Pkg.build("Cairo")
Stacktrace:
 [1] error(::String, ::String) at ./error.jl:42
 [2] top-level scope at none:0
 [3] include at ./boot.jl:326 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1038
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:328 [inlined]
 [8] eval(::Expr) at ./client.jl:404
 [9] top-level scope at ./none:3
in expression starting at /Users/sdanthine/.julia/packages/Cairo/CXPG1/src/Cairo.jl:9
ERROR: LoadError: Failed to precompile Cairo [159f3aea-2a34-519c-b102-8c37f9878175] to /Users/sdanthine/.julia/compiled/v1.1/Cairo/l6vnT.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853
 [6] include at ./boot.jl:326 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1038
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:328 [inlined]
 [11] eval(::Expr) at ./client.jl:404
 [12] top-level scope at ./none:3
in expression starting at /Users/sdanthine/.julia/packages/Rsvg/uwc9D/src/Rsvg.jl:8
ERROR: LoadError: Failed to precompile Rsvg [c4c386cf-5103-5370-be45-f3a111cca3b8] to /Users/sdanthine/.julia/compiled/v1.1/Rsvg/aWLhH.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853
 [6] include at ./boot.jl:326 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1038
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:328 [inlined]
 [11] eval(::Expr) at ./client.jl:404
 [12] top-level scope at ./none:3
in expression starting at /Users/sdanthine/.julia/packages/VegaLite/5UYyY/src/VegaLite.jl:3
ERROR: LoadError: Failed to precompile VegaLite [112f6efa-9a02-5b7d-90c0-432ed331239a] to /Users/sdanthine/.julia/compiled/v1.1/VegaLite/lrJqi.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853
 [6] include at ./boot.jl:326 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1038
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:328 [inlined]
 [11] eval(::Expr) at ./client.jl:404
 [12] top-level scope at ./none:3
in expression starting at /Users/sdanthine/.julia/packages/Queryverse/BmZo1/src/Queryverse.jl:16
ERROR: Failed to precompile Queryverse [612083be-0b0f-5412-89c1-4e7c75506a58] to /Users/sdanthine/.julia/compiled/v1.1/Queryverse/hLJnW.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853
sdanthine commented 5 years ago

And when I then try building Cairo from Julia: Pkg.build("Cairo"):

.............
  Building LibCURL ─→ `~/.julia/packages/LibCURL/OoXMv/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
┌ Error: Error building `Cairo`: 
│ 
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/sdanthine/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19333078 (Pool: 19330283; Big: 2795); GC: 43
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
..............

so seems like it can't find libsystem_platform.dylib

jonathanBieler commented 5 years ago

So brew alone works, correct ? I'm just trying to understand if we should open an issue on homebrew-core or not.

sdanthine commented 5 years ago

Yes brew alone works.

On Thu, Mar 14, 2019 at 3:12 PM Jonathan Bieler notifications@github.com wrote:

So brew alone works, correct ? I'm just trying to understand if we should open an issue on homebrew-core or not.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JuliaGraphics/Cairo.jl/issues/271#issuecomment-472874407, or mute the thread https://github.com/notifications/unsubscribe-auth/AVxxWURmvO-rIdkspmaMI7TXeZA4y7l4ks5vWljkgaJpZM4bl1bX .

sdanthine commented 5 years ago

Hello The puzzling thing to me is that all works fine on my desktop but I cannot get Queryverse due to Cairo to work on my laptop. Tried using the Homebrew julia package directly to add Cairo. Results in this change in error message:

Homebrew.add("Cairo")

julia> Pkg.build("Cairo")
  Building LibCURL ─→ `~/.julia/packages/LibCURL/OoXMv/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
┌ Error: Error building `Cairo`: 
│ Error: No such file or directory @ realpath_rec - /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo
│ Error: No such file or directory @ realpath_rec - /Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo
│ 
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/sdanthine/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19754140 (Pool: 19751304; Big: 2836); GC: 44
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
jonathanBieler commented 5 years ago

What about :

using Libdl

l = "/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo/1.16.0/lib/libcairo.dylib"
h = Libdl.dlopen_e(l, Libdl.RTLD_LAZY)

? (the path might not be correct)

That's how BinDeps tests that the libraries work, maybe it crashes at that point.

sdanthine commented 5 years ago

Like such? Doesn't seem to work (but I might not have done it properly).... Thanks for your inputs!

julia> using Libdl

julia> l = "/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo/1.16.0/lib/libcairo.dylib"
"/Users/sdanthine/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo/1.16.0/lib/libcairo.dylib"

julia> h = Libdl.dlopen_e(l, Libdl.RTLD_LAZY)
Ptr{Nothing} @0x00007fac2cc5b2c0

julia> Pkg.build("Cairo")
  Building LibCURL ─→ `~/.julia/packages/LibCURL/OoXMv/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
┌ Error: Error building `Cairo`: 
│ 
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/sdanthine/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19243692 (Pool: 19240876; Big: 2816); GC: 42
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

julia> 

`

jonathanBieler commented 5 years ago

The fact that it returns a non-null pointer means the library exists (homebrew managed to install it) and Julia manages to open it. It maybe crashes when trying to do something with it. There's also other libraries in that folder.

jonathanBieler commented 5 years ago

I tried to setup a package to test this (can't reproduce on my laptop):

https://github.com/jonathanBieler/TestCairo.jl/blob/master/test/runtests.jl

But that fails with a :

Error: No available formula with the name "staticfloat/juliatranslated/gettext"

https://travis-ci.org/jonathanBieler/TestCairo.jl/jobs/508454006#L232

I'm pretty sure I've seen this error somewhere, any idea what the fix is ?

sdanthine commented 5 years ago

No change for me, still the signal (11) segmentation fault : 11 when building Cairo

lobingera commented 5 years ago

i see test of travis ci failing with signal11. I think, that Makie isn't using Cairo.jl but an own cairo adaptation (excluding the features not needed).

mjs2600 commented 5 years ago

I'm still seeing this issue too:

(v1.1) pkg> build Cairo
  Building LibCURL ─→ `~/.julia/packages/LibCURL/khRkY/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
┌ Error: Error building `Cairo`:
│
│ signal (11): Segmentation fault: 11
│ in expression starting at ~/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19355595 (Pool: 19352771; Big: 2824); GC: 43
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
jonathanBieler commented 5 years ago

I managed to get my test package going and I tested installing cairo and pango, opening each library and make some basic call in libcairo and libpango, everything works fine.

https://github.com/jonathanBieler/TestCairo.jl/blob/master/test/runtests.jl

I think that all what BinDeps does when installing Cairo, so I don't get what causes the crash.

cormullion commented 5 years ago

@jonathanBieler I ran your runtests.jl file, it didn't error. But then after build Cairo I saw the usual segmentation fault.

Animadversio commented 5 years ago

Getting the same issue with my macOS Mojave 10.14.2 Julia version 1.1.0 The output is likewise. julia> Pkg.build("Cairo") Updating registry at ~/.julia/registries/General Updating git-repo https://github.com/JuliaRegistries/General.git Building LibCURL ─→ ~/.julia/packages/LibCURL/OoXMv/deps/build.log Building WinRPM ──→ ~/.julia/packages/WinRPM/Y9QdZ/deps/build.log Building Homebrew → ~/.julia/packages/Homebrew/s09IX/deps/build.log Building Cairo ───→ ~/.julia/packages/Cairo/CXPG1/deps/build.log ┌ Error: Error building Cairo: │ │ signal (11): Segmentation fault: 11 │ in expression starting at /Users/binxu/.julia/packages/Cairo/CXPG1/deps/build.jl:165 │ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line) │ Allocations: 19242699 (Pool: 19239919; Big: 2780); GC: 42 └ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

Seems this problem is specific to macOS system, everything goes fine on Windows 10 and Ubuntu 16 with same Julia and same installation sequence.

jonathanBieler commented 5 years ago

Could someone try to add this to their Cairo/deps/build.jl (after using/import) and try to build again. It adds a bunch of print statements in BinDeps and should tells us which library crashes (assuming it crashes at this point):

```julia @eval BinDeps begin function _find_library(dep::LibraryDependency; provider = Any) println("test print") ret = Any[] # Same as find_library, but with extra check defined by dep libnames = [dep.name;get(dep.properties,:aliases,String[])] # Make sure we keep the defaults first, but also look in the other directories providers = unique([reduce(vcat,[getallproviders(dep,p) for p in defaults]);dep.providers]) for (p,opts) in providers (p !== nothing && can_use(typeof(p)) && can_provide(p,opts,dep)) || continue paths = AbstractString[] # Allow user to override installation path if haskey(opts,:installed_libpath) && isdir(opts[:installed_libpath]) pushfirst!(paths,opts[:installed_libpath]) end ppaths = libdir(p,dep) append!(paths,isa(ppaths,Array) ? ppaths : [ppaths]) if haskey(opts,:unpacked_dir) dir = opts[:unpacked_dir] if dir == "." && isdir(joinpath(depsdir(dep), dep.name)) # the archive unpacks into the root, so we created a subdir with the dep name push!(paths, joinpath(depsdir(dep), dep.name)) elseif isdir(joinpath(depsdir(dep),dir)) push!(paths,joinpath(depsdir(dep),dir)) end end # Windows, do you know what `lib` stands for??? if Compat.Sys.iswindows() push!(paths,bindir(p,dep)) end (isempty(paths) || all(map(isempty,paths))) && continue for lib in libnames, path in paths @info "testing $lib" l = joinpath(path, lib) @show h = Libdl.dlopen_e(l, Libdl.RTLD_LAZY) if h != C_NULL @info "validating $lib" works = dep.libvalidate(l,h) @info "done validating $lib" l = Libdl.dlpath(h) Libdl.dlclose(h) if works push!(ret, ((p, opts), l)) else # We tried to load this providers' library, but it didn't satisfy # the requirements, so tell it to force a rebuild since the requirements # have most likely changed opts[:force_rebuild] = true end end @info "done testing $lib" end end # Now check system libraries for lib in libnames # We don't want to use regular dlopen, because we want to get at # system libraries even if one of our providers is higher in the # DL_LOAD_PATH for path in Libdl.DL_LOAD_PATH for ext in EXTENSIONS opath = string(joinpath(path,lib),ext) check_path!(ret,dep,opath) end end for ext in EXTENSIONS opath = string(lib,ext) check_path!(ret,dep,opath) end soname = lookup_soname(lib) isempty(soname) || check_path!(ret, dep, soname) end return ret end end ```
daviehh commented 5 years ago

@jonathanBieler Thanks for this troubleshooting script! full output:

julia> Pkg.build("Cairo",verbose=true)
  Building LibCURL ─→ `~/.julia/packages/LibCURL/khRkY/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
Already up-to-date.
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
[ Info: BUILDING --- 
test print

...

[ Info: testing gobject
h = Libdl.dlopen_e(l, Libdl.RTLD_LAZY) = Ptr{Nothing} @0x0000000000000000
[ Info: done testing gobject
[ Info: testing libgobject-2.0-0
h = Libdl.dlopen_e(l, Libdl.RTLD_LAZY) = Ptr{Nothing} @0x0000000000000000
[ Info: done testing libgobject-2.0-0
[ Info: testing libgobject-2.0

signal (11): Segmentation fault: 11
in expression starting at /Users/david/.julia/packages/Cairo/CXPG1/deps/build.jl:248
_platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
Allocations: 20389559 (Pool: 20386564; Big: 2995); GC: 45
daviehh commented 5 years ago

Furthermore, if I put @show in front of

https://github.com/jonathanBieler/Cairo.jl/blob/278341dc82fa21339b819602fdba503e79eda6e5/deps/build.jl#L47

the last output is:

...
l = joinpath(path, lib) = "/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/lib/libgobject-2.0-0"
h = Libdl.dlopen_e(l, Libdl.RTLD_LAZY) = Ptr{Nothing} @0x0000000000000000
[ Info: done testing libgobject-2.0-0
[ Info: testing libgobject-2.0
l = joinpath(path, lib) = "/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/lib/libgobject-2.0"

signal (11): Segmentation fault: 11
in expression starting at /Users/david/.julia/packages/Cairo/CXPG1/deps/build.jl:248
_platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
Allocations: 20382718 (Pool: 20379722; Big: 2996); GC: 45
┌ Error: Error building `Cairo`: 
└ @ Pkg.Operations ~/code/julia_mkl/julia/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

so the seg fault appears before dlopen_e; however, opening directly is ok:

julia> Libdl.dlopen_e("/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/lib/libgobject-2.0", Libdl.RTLD_LAZY)
Ptr{Nothing} @0x00007fb5ec4718b0
vancleve commented 5 years ago

I'm seeing this seg fault too on macOS 10.14.3 / Julia 1.1.0

jonathanBieler commented 5 years ago

Thanks @daviehh, it's really strange. I can't reproduce the crash either outside of BinDeps. At least we know it crashes when trying to dlopen_e libgobject.

cormullion commented 5 years ago

@jonathanBieler If I copy .julia/packages/Homebrew/s09IX/deps/usr/lib/libgobject-2.0.0.dylib from a working version to a new installation, Cairo builds correctly. It might therefore be this file that is causing the segfault.

jonathanBieler commented 5 years ago

@cormullion Was that file present before you copied it ? from the log above it looks like it wasn't found (pointer is always null).

cormullion commented 5 years ago

@jonathanBieler Yes, I think so. I did it a different way avoiding the links, and I was copying/overwriting:

Homebrew/s09IX/deps/usr/Cellar/glib/2.58.2/lib/libgobject-2.0.0.dylib (working installation)

to

Homebrew/s09IX/deps/usr/Cellar/glib/2.60.0_1/lib/libgobject-2.0.0.dylib (segfaulting installation)

daviehh commented 5 years ago

Looks like upstream glib issue? Still, the seg fault error message is quite strange considering dlopen_e from julia REPL works.

The glib version 2.58.3 works fine. To revert to this older version of glib

Homebrew.brew(`switch glib 2.58.3`)

if you have 2.58.3 installed, otherwise you need to build the previous version from source: 2.58.3 is here, click raw to download or something like

Homebrew.brew(`install --verbose --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/05871cb0394f78ef25a5c1c071456d0f1e4be4fe/Formula/glib.rb`)

Then, Pkg.build("Cairo") works for me.

julia> Pkg.build("Cairo")
  Building LibCURL ─→ `~/.julia/packages/LibCURL/khRkY/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`

julia> Homebrew.brew(`info glib`)
glib: stable 2.60.0
Core application library for C
https://developer.gnome.org/glib/
/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.2 (451 files, 18.8MB)
  Built from source on 2019-03-26 at 14:33:30
/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.3 (451 files, 18.8MB) *
  Built from source on 2019-03-26 at 16:05:54
/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.0_1 (432 files, 15.3MB)
  Poured from bottle on 2019-03-26 at 14:15:42
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/glib.rb
==> Dependencies
Build: meson ✔, ninja ✔, pkg-config ✔
Required: gettext ✔, libffi ✔, pcre ✔, python ✔
Process(`/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/bin/brew info glib`, ProcessExited(0))

(the * shows glib/2.58.3 is being used here)

daviehh commented 5 years ago

btw, with @show in front of https://github.com/jonathanBieler/Cairo.jl/blob/278341dc82fa21339b819602fdba503e79eda6e5/deps/build.jl#L47

one can see that ~/.julia/packages/Homebrew/s09IX/deps/usr/lib/libgobject-2.0 has been dlopen'ed twice: the first time it's okay, with a non-null handle; the second time it seg faulted.

daviehh commented 5 years ago

Found a possible cause: libpango (and libpangocairo) appears to have some conflict with libgobject, able to reproduce the seg fault with this script/in REPL:

using Libdl
using Homebrew

@show h = Libdl.dlopen(Homebrew.prefix()*"/lib/libpango-1.0",Libdl.RTLD_LAZY)
Libdl.dlclose(h)

@show h = Libdl.dlopen(Homebrew.prefix()*"/lib/libgobject-2.0.dylib",Libdl.RTLD_LAZY)
Libdl.dlclose(h)

also, in CI here, using the test code

Build Status

looks to be specific to julia since on python similar things run ok:

from ctypes import *
p = CDLL("/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/lib/libpango-1.0.dylib")
del p
p = CDLL("/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/lib/libgobject-2.0.dylib")
del p
cormullion commented 5 years ago

Good sleuthing @daviehh! I wonder why this problem started on 5-8 March. How do these libs get updated/released?

daviehh commented 5 years ago

@cormullion generally upstream then updated in Homebrew repo as PR; look like a julia issue, reported. thanks!

JackFram commented 5 years ago

I don't know why switch to 2.58.3 still don't work for me @daviehh , I still have the same segmentation fault 11 issue. julia> Homebrew.brew(info glib) glib: stable 2.60.0 Core application library for C https://developer.gnome.org/glib/ /Users/zhangzhihao/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.3 (451 files, 18.8MB) * Built from source on 2019-04-03 at 14:56:00 /Users/zhangzhihao/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.0_1 (432 files, 15.3MB) Poured from bottle on 2019-04-03 at 14:43:41 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/glib.rb ==> Dependencies Build: meson ✘, ninja ✘, pkg-config ✔ Required: gettext ✔, libffi ✔, pcre ✔, python ✔ Process(/Users/zhangzhihao/.julia/packages/Homebrew/s09IX/deps/usr/bin/brew info glib`, ProcessExited(0))

julia> Pkg.build("Cairo") Building LibCURL ─→ ~/.julia/packages/LibCURL/khRkY/deps/build.log Building WinRPM ──→ ~/.julia/packages/WinRPM/Y9QdZ/deps/build.log Building Homebrew → ~/.julia/packages/Homebrew/s09IX/deps/build.log Building Cairo ───→ ~/.julia/packages/Cairo/CXPG1/deps/build.log ┌ Error: Error building Cairo: │ │ signal (11): Segmentation fault: 11 │ in expression starting at /Users/zhangzhihao/.julia/packages/Cairo/CXPG1/deps/build.jl:165 │ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line) │ Allocations: 19807774 (Pool: 19804937; Big: 2837); GC: 44 └ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

`

daviehh commented 5 years ago

@JackFram you may have glib installed in the system-wide (not julia) homebrew as well; if so, you may temporary unlink glib [run brew unlink glib in terminal/shell, outside julia (or type ; in REPL, you'll see julia> changed to shell>)], build cairo and brew link glib for the system-wide homebrew.

This is a temporary fix; since glib does not support dlopen/dclose, and according to them, it's surprising that it worked before.

https://gitlab.gnome.org/GNOME/pango/issues/363

JackFram commented 5 years ago

@daviehh thank you for your suggestion! But it seems not work for me. My steps are 1. ; to shell mode, run brew unlink glib. 2. in julia run Pkg.build("Cairo") and this still turn out to a segmentation fault. I am a little bit desperate now

shell> brew unlink glib Unlinking /Users/zhangzhihao/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.3... 148 symlinks removed

julia> Pkg.build("Cairo") Building LibCURL ─→ ~/.julia/packages/LibCURL/khRkY/deps/build.log Building WinRPM ──→ ~/.julia/packages/WinRPM/Y9QdZ/deps/build.log Building Homebrew → ~/.julia/packages/Homebrew/s09IX/deps/build.log Building Cairo ───→ ~/.julia/packages/Cairo/CXPG1/deps/build.log ┌ Error: Error building Cairo: │ Warning: staticfloat/juliatranslated/glib 2.60.0_1 is already installed, it's just not linked │ You can use brew link glib to link this version. │ │ signal (11): Segmentation fault: 11 │ in expression starting at /Users/zhangzhihao/.julia/packages/Cairo/CXPG1/deps/build.jl:165 │ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line) │ Allocations: 20738524 (Pool: 20735461; Big: 3063); GC: 46 └ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

daviehh commented 5 years ago

@JackFram sorry, it works for me... Do you have hombre installed outside julia? may not be a good suggestion to go to shell by ;? not sure. However, the output from shell> brew unlink glib shows from the shell> inside julia REPL, the glib unlinked is the julia one, not the system-wide one. Can you try:

  1. brew link glib in the shell> inside the julia REPL
  2. brew unlink glib in Terminal.app, outside julia
  3. optionally, close/reopen julia

As a last resort: you may use the modified script by https://github.com/JuliaGraphics/Cairo.jl/issues/271#issuecomment-476261952,

link: https://github.com/jonathanBieler/Cairo.jl/blob/master/deps/build.jl

go to ~/.julia/packages/Cairo/CXPG1/deps/, overwrite the build.jl file with the one above

but comment out the dlclose (line 54)

https://github.com/jonathanBieler/Cairo.jl/blob/278341dc82fa21339b819602fdba503e79eda6e5/deps/build.jl#L54

JackFram commented 5 years ago

@daviehh oh I print out debug info in verbose mode and it seems like mine segmentation fault is related to libpango-1_0-0, I am trying to resolve it

JackFram commented 5 years ago

@daviehh I have finally made it work by downloading 2.58.3 glib for system-wide homebrew. Thank you very much for detailed explanation!

vancleve commented 5 years ago

@daviehh I have finally made it work by downloading 2.58.3 glib for system-wide homebrew. Thank you very much for detailed explanation!

this is also what I had to do. thanks!

Animadversio commented 5 years ago

Looks like upstream glib issue? Still, the seg fault error message is quite strange considering dlopen_e from julia REPL works.

The glib version 2.58.3 works fine. To revert to this older version of glib

Homebrew.brew(`switch glib 2.58.3`)

if you have 2.58.3 installed, otherwise you need to build the previous version from source: 2.58.3 is here, click raw to download or something like

Homebrew.brew(`install --verbose --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/05871cb0394f78ef25a5c1c071456d0f1e4be4fe/Formula/glib.rb`)

Then, Pkg.build("Cairo") works for me.

julia> Pkg.build("Cairo")
  Building LibCURL ─→ `~/.julia/packages/LibCURL/khRkY/deps/build.log`
  Building WinRPM ──→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew → `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`

julia> Homebrew.brew(`info glib`)
glib: stable 2.60.0
Core application library for C
https://developer.gnome.org/glib/
/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.2 (451 files, 18.8MB)
  Built from source on 2019-03-26 at 14:33:30
/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.3 (451 files, 18.8MB) *
  Built from source on 2019-03-26 at 16:05:54
/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.0_1 (432 files, 15.3MB)
  Poured from bottle on 2019-03-26 at 14:15:42
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/glib.rb
==> Dependencies
Build: meson ✔, ninja ✔, pkg-config ✔
Required: gettext ✔, libffi ✔, pcre ✔, python ✔
Process(`/Users/david/.julia/packages/Homebrew/s09IX/deps/usr/bin/brew info glib`, ProcessExited(0))

(the * shows glib/2.58.3 is being used here)

Thank you ! This method really solved my problem! (although Homebrew takes some time)

sdanthine commented 5 years ago

Finally had time to get back to research and went through all the steps with success. Thanks for all the sleuthing and for the detailed explanations!

On Thu, Apr 4, 2019 at 8:49 PM Jeremy Van Cleve notifications@github.com wrote:

@daviehh https://github.com/daviehh I have finally made it work by downloading 2.58.3 glib for system-wide homebrew. Thank you very much for detailed explanation!

this is also what I had to do. thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JuliaGraphics/Cairo.jl/issues/271#issuecomment-480018885, or mute the thread https://github.com/notifications/unsubscribe-auth/AVxxWZi9CAewbRbnUmJUuB3wLtiM4X2Aks5vdkk5gaJpZM4bl1bX .

asinghvi17 commented 5 years ago

i see test of travis ci failing with signal11. I think, that Makie isn't using Cairo.jl but an own cairo adaptation (excluding the features not needed).

We actually just use Cairo - but we don't have tests yet :)

JeremyKahn commented 5 years ago

I have the same problem with building Cairo in Mojave 10.14.4:

Building Cairo ───→ ~/.julia/packages/Cairo/CXPG1/deps/build.log ┌ Error: Error building Cairo: │ │ signal (11): Segmentation fault: 11 │ in expression starting at /Users/jkahn/.julia/packages/Cairo/CXPG1/deps/build.jl:165 │ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line) │ Allocations: 19365390 (Pool: 19362600; Big: 2790); GC: 43 └ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

And I have already installed glib 2.58.3 and switched to it:

Homebrew.brew(info glib) glib: stable 2.60.1 Core application library for C https://developer.gnome.org/glib/ /Users/jkahn/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.3 (451 files, 18.8MB) * Built from source on 2019-04-17 at 17:47:49 /Users/jkahn/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.1 (429 files, 15.2MB) Poured from bottle on 2019-04-17 at 17:18:06

asinghvi17 commented 5 years ago

Your glib version seems to still be 2.6.0...

JeremyKahn commented 5 years ago

Your glib version seems to still be 2.6.0...

Doesn't the * next to the path for 2.58.3 mean that that's the version being used?

/Users/jkahn/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.58.3 (451 files, 18.8MB) *