Closed ronisbr closed 5 years ago
I am also getting this error, both locally and on Travis
Me as well. Using Julia Version 1.0.2 (2018-11-08) Mac Os Mojave 10.14.3
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?
@cormullion It's obviously a homebrew/brew problem in the first place. Do you have a build log with homebrew version output available?
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.. :).
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
I can see the same thing on a recent build in travis. My first (and only) guess is, something changed in brew,
It's confusing me that Travis is running:
ProductName: Mac OS X
ProductVersion: 10.13.3
(which is High Sierra, not Mojave).
Can this be reproduced using brew alone :
brew install cairo
/Users/username/.julia/packages/Homebrew/s09IX/deps/usr/bin/brew install cairo
?
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
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
So brew alone works, correct ? I'm just trying to understand if we should open an issue on homebrew-core or not.
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 .
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
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.
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>
`
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.
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 ?
No change for me, still the signal (11) segmentation fault : 11 when building Cairo
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).
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
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.
@jonathanBieler I ran your runtests.jl file, it didn't error. But then after build Cairo
I saw the usual segmentation fault.
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.
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):
@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
Furthermore, if I put @show
in front of
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
I'm seeing this seg fault too on macOS 10.14.3 / Julia 1.1.0
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.
@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.
@cormullion Was that file present before you copied it ? from the log above it looks like it wasn't found (pointer is always null).
@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)
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)
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.
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
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
Good sleuthing @daviehh! I wonder why this problem started on 5-8 March. How do these libs get updated/released?
@cormullion generally upstream then updated in Homebrew repo as PR; look like a julia issue, reported. thanks!
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
`
@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.
@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
@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:
brew link glib
in the shell>
inside the julia REPLbrew unlink glib
in Terminal.app, outside juliaAs 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)
@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
@daviehh I have finally made it work by downloading 2.58.3 glib for system-wide homebrew. Thank you very much for detailed explanation!
@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!
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)
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 .
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 :)
I have the same problem with building Cairo in Mojave 10.14.4:
Building Cairo ───→
~/.julia/packages/Cairo/CXPG1/deps/build.log
┌ Error: Error buildingCairo
: │ │ 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
Your glib version seems to still be 2.6.0...
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) *
Hi guys!
I am trying to build Cairo.jl on macOS Mojave (clean Julia installation) and I am getting the following error:
Trying to build manually Cairo leads to: