Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cairo version 0.5.6 builds successfully in Linux but not in OSX. #279

Closed
ppalmes opened this issue Apr 17, 2019 · 95 comments · Fixed by #292
Closed

Cairo version 0.5.6 builds successfully in Linux but not in OSX. #279

ppalmes opened this issue Apr 17, 2019 · 95 comments · Fixed by #292

Comments

@ppalmes
Copy link

ppalmes commented Apr 17, 2019

error in travis build: https://travis-ci.com/IBM/TSML.jl/jobs/193248596

Building Cairo ──────────→ ~/.julia/packages/Cairo/CXPG1/deps/build.log
┌ Error: Error building Cairo:

│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/travis/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 17948020 (Pool: 17945255; Big: 2765); GC: 39

build.jl at line 165:
@BinDeps.install Dict([(:gobject, :_jl_libgobject),
(:cairo, :_jl_libcairo),
(:pango, :_jl_libpango),
(:pangocairo, :_jl_libpangocairo)])

@lobingera
Copy link
Contributor

Could you show a successful build with 0.5.5?

@asinghvi17
Copy link

I'm also on OSX, and have the same issue. Building on v0.5.5 fails as well.

(v1.1) pkg> add Cairo@0.5.5
 Resolving package versions...
 Installed Cairo ─ v0.5.5
  Updating `~/.julia/environments/v1.1/Project.toml`
  [159f3aea] + Cairo v0.5.5
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [159f3aea]  Cairo v0.5.6  v0.5.5
  Building Cairo  `~/.julia/packages/Cairo/mbKYP/deps/build.log`
┌ Error: Error building `Cairo`:
│
│ signal (11): Segmentation fault: 11in expression starting at /Users/anshul/.julia/packages/Cairo/mbKYP/deps/build.jl:164
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 17613150 (Pool: 17610690; Big: 2460); GC: 39
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

(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/mbKYP/deps/build.log`
┌ Error: Error building `Cairo`:
│
│ signal (11): Segmentation fault: 11in expression starting at /Users/anshul/.julia/packages/Cairo/mbKYP/deps/build.jl:164
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 17598553 (Pool: 17596090; Big: 2463); GC: 39
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@asinghvi17
Copy link

as does building 0.5.4 (with the same error).

Building 0.5.3 also fails, but for another reason:

(v1.1) pkg> add Cairo@0.5.3
 Resolving package versions...
 Installed Cairo ─ v0.5.3
  Updating `~/.julia/environments/v1.1/Project.toml`
  [159f3aea]  Cairo v0.5.4  v0.5.3
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [159f3aea]  Cairo v0.5.4  v0.5.3
  Building Cairo  `~/.julia/packages/Cairo/NBtbd/deps/build.log`
┌ Error: Error building `Cairo`:
│ ERROR: LoadError: syntax: misplaced assignment statement in "[libpng = library_dependency("png", aliases = ["libpng", "libpng-1.5.14", "libpng15", "libpng12.so.0", "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", "libgobject-2.0.so.0"], depends = [libffi, gettext], group = group); freetype = library_dependency("freetype", aliases = ["libfreetype"], runtime = false, group = group); fontconfig = library_dependency("fontconfig", aliases = ["libfontconfig-1", "libfontconfig", "libfontconfig.so.1"], depends = [freetype], runtime = false, group = group); cairo = library_dependency("cairo", aliases = ["libcairo-2", "libcairo", "libcairo.so.2", "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.so.0", "libpango-1_0-0"], group = group); pangocairo = library_dependency("pangocairo", aliases = ["libpangocairo-1.0-0", "libpangocairo-1.0", "libpangocairo-1.0.so.0"], depends = [cairo], group = group); zlib = library_dependency("zlib", aliases = ["libzlib", "zlib1"], os = :Windows, group = group)]"
│ Stacktrace:
│  [1] include at ./boot.jl:326 [inlined]
│  [2] include_relative(::Module, ::String) at ./loading.jl:1038
│  [3] include(::Module, ::String) at ./sysimg.jl:29
│  [4] include(::String) at ./client.jl:403
│  [5] top-level scope at none:0in expression starting at /Users/anshul/.julia/packages/Cairo/NBtbd/deps/build.jl:19
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@lobingera
Copy link
Contributor

then it's mostlikely #271

@asinghvi17
Copy link

Yep, looks like it. Will post build output there when I get the time, thanks!

@asinghvi17
Copy link

So @daviehh's solution worked. Thanks! @ppalmes you should take a look here:

#271 (comment)

@ppalmes
Copy link
Author

ppalmes commented Apr 17, 2019

upon more investigations, i noticed that i didn't have cairo in the previous releases and it was added recently when I installed Queryverse which installed Vegalite which installed Cairo.

Travis build fails and my local mac Pkg.build("Cairo") also fails.

(v1.0) 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/ppalmes/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 18087618 (Pool: 18084845; Big: 2773); GC: 40
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1097

I stand corrected when I said previous version was successful in mac.

@ppalmes ppalmes changed the title Cairo version 0.5.6 builds successfully in Linux but not in OSX. Previous versions work Cairo version 0.5.6 builds successfully in Linux but not in OSX. Apr 17, 2019
@daviehh
Copy link
Contributor

daviehh commented Apr 17, 2019

you may also try Cario#master, since this segfault is potentially caused by dlopen/dlclose with glib; master has this PR #274 which basically skips the dlclose. Note if you have system-wide homebrew's glib, you may need to brew unlink glib in terminal outside julia repl before build and revert by brew link glib after the build finishes.

@ppalmes
Copy link
Author

ppalmes commented Apr 17, 2019

thanks @daviehh. it made me rethink what causes it and realized that using Queryverse loaded so many packages including Cairo which i don't necessarily need. i just needed FileIO, CSVFiles, and FeatherFiles which Queryverse reimports/reexports for common save/load API to different file formats. I removed Queryverse which removed so many deps including Cairo ;)

@sbacelar
Copy link

I think I have the same problem also on macOS 10.14.4:

(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 /Users/sergiobacelar/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19796921 (Pool: 19794088; Big: 2833); GC: 44
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

What can I do? I have reinstalled cairo using Homebrew without success.

@daviehh
Copy link
Contributor

daviehh commented Apr 25, 2019

@sbacelar should be ok in the latest version, try ]up?
current version is ]st

[159f3aea] Cairo v0.6.0

@sbacelar
Copy link

@daviehh Yes I did ]up without success. Using ]st I see that my Cairo version is v0.5.6. Is it possible to install Cairo v0.6.0?

@daviehh
Copy link
Contributor

daviehh commented Apr 25, 2019

@sbacelar one reason for ]up not updating Cairo might be another package pins Cairo to v0.5.6; if you are comfortable doing some editing, you may go to ~/.julia/packages/Cairo/CXPG1/deps/ to edit the build.jl file: basically put

Cairo.jl/deps/build.jl

Lines 7 to 15 in 3d781a7

if Sys.isapple()
deps_file_str = open(joinpath(dirname(pathof(BinDeps)), "dependencies.jl")) do file
read(file, String)
end
if occursin("ZEval",pathof(BinDeps))
patched_dlclose = replace(deps_file_str, "Libdl.dlclose(h)" => "println(\"ignored: dlclose()\")")
include_string(BinDeps,patched_dlclose)
end
end

after import Compat.Sys and before @BinDeps.setup

@sbacelar
Copy link

@daviehh I edited the build.jl file but after doing ]up Cairo version stays the same v0.5.6. But I think you were right: after removing Agents.jl package it was possible to update Cairo to 0.6.0. But now I can't install Agents.jl.

(v1.1) pkg> rm Agents
  Updating `~/.julia/environments/v1.1/Project.toml`
  [46ada45e] - Agents v1.1.0
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [46ada45e] - Agents v1.1.0
  [5721bf48] - DataVoyager v0.3.1
  [a1bb12fb] - Electron v0.4.0
  [8fc22ac5] - FilePaths v0.7.0
  [48062228] - FilePathsBase v0.4.0
  [2bd173c7] - NodeJS v0.6.0
  [c4c386cf] - Rsvg v0.2.3
  [112f6efa] - VegaLite v0.6.0

(v1.1) pkg> up
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/TuringLang/Turing.jl.git`
  Updating git-repo `https://github.com/JuliaPlots/MakieGallery.jl.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [159f3aea] ↑ Cairo v0.5.6 ⇒ v0.6.0
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [159f3aea] ↑ Cairo v0.5.6 ⇒ v0.6.0

Now, when I try to install Agents I get:

(v1.1) pkg> add Agents
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package VegaLite [112f6efa]:
 VegaLite [112f6efa] log:
 ├─possible versions are: [0.0.1-0.0.3, 0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0] or uninstalled
 ├─restricted by compatibility requirements with Agents [46ada45e] to versions: [0.0.1-0.0.3, 0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0]
 │ └─Agents [46ada45e] log:
 │   ├─possible versions are: 1.1.0 or uninstalled
 │   └─restricted to versions * by an explicit requirement, leaving only versions 1.1.0
 ├─restricted by julia compatibility requirements to versions: [0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0] or uninstalled, leaving only versions: [0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0]
 └─restricted by compatibility requirements with Cairo [159f3aea] to versions: 0.0.1-0.0.3 or uninstalled — no versions left
   └─Cairo [159f3aea] log:
     ├─possible versions are: [0.0.1, 0.2.0-0.2.35, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.6, 0.6.0] or uninstalled
     └─restricted to versions 0.6.0 by an explicit requirement, leaving only versions 0.6.0

@sbacelar
Copy link

@daviehh Well, I think the problem is between Cairo and VegaLite, because when I try to add VegaLite I get:

(v1.1) pkg> add VegaLite
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package VegaLite [112f6efa]:
 VegaLite [112f6efa] log:
 ├─possible versions are: [0.0.1-0.0.3, 0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.3, 0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0]
 ├─restricted by julia compatibility requirements to versions: [0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0] or uninstalled, leaving only versions: [0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0]
 └─restricted by compatibility requirements with Cairo [159f3aea] to versions: 0.0.1-0.0.3 or uninstalled — no versions left
   └─Cairo [159f3aea] log:
     ├─possible versions are: [0.0.1, 0.2.0-0.2.35, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.6, 0.6.0] or uninstalled
     └─restricted to versions 0.6.0 by an explicit requirement, leaving only versions 0.6.0

@sbacelar
Copy link

After a fresh Julia installation on macOS Mojave I added only one package Agents and then I got the same problem with Cairo:

Building Cairo ───────────→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
┌ 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/sergiobacelar/Library/Caches/Homebrew.jl/downloads/36f9054572b26853c4726b48a48041476190c6e2069d088be488bd9489445ade--graphite2-1.3.13.mojave.bottle.tar.gz
│ ==> Pouring graphite2-1.3.13.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/graphite2/1.3.13: 18 files, 232.2KB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/graphite2/1.3.13
│
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/sergiobacelar/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 20694732 (Pool: 20691713; Big: 3019); GC: 46
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@daviehh
Copy link
Contributor

daviehh commented Apr 27, 2019

@sbacelar yes, the reason is Agents uses an older version of Cairo. You may now edit the build.jl file according to #279 (comment) but then use ] build Cairo and not ]up; alternatively, you may ask Agents to use the current version of Cairo?

@sbacelar
Copy link

@daviehh Thank you. I asked Agents to do that. Let me stress that at this moment I have a fresh Julia version and the only added package is Agents. But I have to insert again the comment you mentioned since I deleted the folder .julia

@sbacelar
Copy link

I don't know if this helps to solve the problem. With no package installed and without the build.jl file edited, I did ]add Cairo and then:

  Building Cairo → `~/.julia/packages/Cairo/p68X8/deps/build.log`
┌ Error: Error building `Cairo`:
│ WARNING: redefining constant DEBIAN_VERSION_REGEX
│ WARNING: redefining constant have_sonames
│ WARNING: redefining constant sonames
│ WARNING: redefining constant EXTENSIONS
│
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/sergiobacelar/.julia/packages/Cairo/p68X8/deps/build.jl:176
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19981857 (Pool: 19979012; Big: 2845); GC: 44
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@asinghvi17
Copy link

What's the output of ]st?

@sbacelar
Copy link

After freeing Cairo:

(v1.1) pkg> st
    Status `~/.julia/environments/v1.1/Project.toml`
  [159f3aea] Cairo v0.6.0

@asinghvi17
Copy link

Weird...and it still doesn't build correctly?

@asinghvi17
Copy link

Have you tried switching glib?

@sbacelar
Copy link

Here is what is happening now. Can you explain to me how to switch glib?

(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/p68X8/deps/build.log`
┌ Error: Error building `Cairo`:
│ WARNING: redefining constant DEBIAN_VERSION_REGEX
│ WARNING: redefining constant have_sonames
│ WARNING: redefining constant sonames
│ WARNING: redefining constant EXTENSIONS
│
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/sergiobacelar/.julia/packages/Cairo/p68X8/deps/build.jl:176
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 19974556 (Pool: 19971711; Big: 2845); GC: 44
└ @

@daviehh
Copy link
Contributor

daviehh commented Apr 27, 2019

@sbacelar i think you may have a system-wide (not julia) glib installed... can you try brew unlink glib outside julia (either in a new terminal window or by ;, which will change julia> to shell>) and do ]build Cairo? you can brew link glib after the build finished for the system-wide glib

@sbacelar
Copy link

@daviehh I did brew unlink glib in other tab of iTerm and then:

(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/p68X8/deps/build.log`
┌ Error: Error building `Cairo`, showing the last 100 of log:
│ If you need Homebrew's Python 2.7 run
│   brew install python@2
│
│ You can install Python packages with
│   pip3 install <package>
│ They will install into the site-package directory
│   /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/lib/python3.7/site-packages
│
│ See: https://docs.brew.sh/Homebrew-and-Python
│ ==> Summary
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/python/3.7.3: 3,863 files, 59.9MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/python/3.7.3
│ ==> Installing libffi from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/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/sergiobacelar/.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/sergiobacelar/.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/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/opt/libffi/lib/pkgconfig"
│
│ ==> Summary
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/libffi/3.2.1: 16 files, 297KB
│ ==> Installing glib from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/glib-2.60.1.mojave.bottle.tar.gz
│ ==> Pouring glib-2.60.1.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.1: 429 files, 15.2MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/glib/2.60.1
│ ==> Installing libpng from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.37.mojave.bottle.tar.gz
│ Already downloaded: /Users/sergiobacelar/Library/Caches/Homebrew.jl/downloads/1957fe4350dafd271e0a5ae9ac4c9e3583520b3b77111f873366c8a21f2e9703--libpng-1.6.37.mojave.bottle.tar.gz
│ ==> Pouring libpng-1.6.37.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/libpng/1.6.37: 27 files, 1.2MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/libpng/1.6.37
│ ==> Installing freetype from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/freetype-2.10.0.mojave.bottle.tar.gz
│ Already downloaded: /Users/sergiobacelar/Library/Caches/Homebrew.jl/downloads/b11d24b3f88092e926183279c927c8f3b1ed6c1044a2828a6c7474513fdd567b--freetype-2.10.0.mojave.bottle.tar.gz
│ ==> Pouring freetype-2.10.0.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/freetype/2.10.0: 61 files, 2.3MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/freetype/2.10.0
│ ==> Installing fontconfig from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.13.1.mojave.bottle.tar.gz
│ Already downloaded: /Users/sergiobacelar/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/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fontconfig/2.13.1/bin/fc-cache -frv
│ Last 15 lines from /Users/sergiobacelar/Library/Logs/Homebrew/fontconfig/post_install.01.fc-cache:
│
│ /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fontconfig/2.13.1/bin/fc-cache -frv
│
│ /usr/share/fonts: skipping, no such directory
│ /System/Library/Fonts: caching, new cache contents: 398 fonts, 0 dirs
│ /Library/Fonts: caching, new cache contents: 463 fonts, 0 dirs
│ /Users/sergiobacelar/Library/Fonts: /Users/sergiobacelar/Library/Fonts: failed to write cache
│ caching, new cache contents: 242 fonts, 0 dirs
│ /System/Library/Assets/com_apple_MobileAsset_Font4: skipping, no such directory
│ /Users/sergiobacelar/.local/share/fonts: skipping, no such directory
│ /Users/sergiobacelar/.fonts: skipping, no such directory
│ /usr/local/var/cache/fontconfig: not cleaning unwritable cache directory
│ /Users/sergiobacelar/.cache/fontconfig: not cleaning unwritable cache directory
│ /Users/sergiobacelar/.fontconfig: not cleaning non-existent cache directory
│ /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fontconfig/2.13.1/bin/fc-cache: failed
│ Warning: The post-install step did not complete successfully
│ You can try again using `brew postinstall staticfloat/juliatranslated/fontconfig`
│ ==> Summary
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fontconfig/2.13.1: 531 files, 3.3MB
│ ERROR: LoadError: failed process: Process(`/Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/bin/brew install --ignore-dependencies staticfloat/juliatranslated/fontconfig`, ProcessExited(1)) [1]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│  [2] pipeline_error at ./process.jl:785 [inlined]
│  [3] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:726
│  [4] run at ./process.jl:724 [inlined]
│  [5] #brew#4(::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::Cmd) at /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/src/API.jl:19
│  [6] #brew at ./none:0 [inlined]
│  [7] #install_and_link#38(::Bool, ::Function, ::String) at /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/src/API.jl:492
│  [8] (::getfield(Homebrew, Symbol("#kw##install_and_link")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(Homebrew.install_and_link), ::String) at ./none:0
│  [9] #add#29(::Bool, ::Bool, ::Function, ::String) at /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/src/API.jl:462
│  [10] add at /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/src/API.jl:412 [inlined]
│  [11] install(::Array{String,1}) at /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/src/bindeps_integration.jl:50
│  [12] (::getfield(Homebrew, Symbol("##80#81")))() at /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/src/bindeps_integration.jl:45
│  [13] run(::getfield(Homebrew, Symbol("##80#81"))) at /Users/sergiobacelar/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:478
│  [14] run(::BinDeps.SynchronousStepCollection) at /Users/sergiobacelar/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521
│  [15] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at ./string:944
│  [16] satisfy!(::BinDeps.LibraryGroup, ::Array{DataType,1}) at ./string:910
│  [17] satisfy!(::BinDeps.LibraryGroup) at ./string:874
│  [18] top-level scope at string:977
│  [19] include at ./boot.jl:326 [inlined]
│  [20] include_relative(::Module, ::String) at ./loading.jl:1038
│  [21] include(::Module, ::String) at ./sysimg.jl:29
│  [22] include(::String) at ./client.jl:403
│  [23] top-level scope at none:0
│ in expression starting at /Users/sergiobacelar/.julia/packages/Cairo/p68X8/deps/build.jl:176
│ ignored: dlclose()
│ ignored: dlclose()
│ ignored: dlclose()
│ ignored: dlclose()
│ ignored: dlclose()
│
│ Full log at /Users/sergiobacelar/.julia/packages/Cairo/p68X8/deps/build.log
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@daviehh
Copy link
Contributor

daviehh commented Apr 27, 2019

@sbacelar that seems to be caused by some font cache conflicts... try ]build Cairo a second time it should pass

@sbacelar
Copy link

(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/p68X8/deps/build.log`
┌ Error: Error building `Cairo`:
│ WARNING: redefining constant DEBIAN_VERSION_REGEX
│ WARNING: redefining constant have_sonames
│ WARNING: redefining constant sonames
│ WARNING: redefining constant EXTENSIONS
│ ==> Installing pixman from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/pixman-0.38.4.mojave.bottle.tar.gz
│ ==> Pouring pixman-0.38.4.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pixman/0.38.4: 13 files, 1.3MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pixman/0.38.4
│ ==> Installing cairo from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/cairo-1.16.0.mojave.bottle.tar.gz
│ ==> Pouring cairo-1.16.0.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo/1.16.0: 117 files, 5.5MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/cairo/1.16.0
│ ==> Installing icu4c from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/icu4c-64.2.mojave.bottle.tar.gz
│ ==> Pouring icu4c-64.2.mojave.bottle.tar.gz
│ ==> Caveats
│ icu4c is keg-only, which means it was not symlinked into /Users/sergiobacelar/.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/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
│   echo 'export PATH="/Users/sergiobacelar/.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/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/lib"
│   export CPPFLAGS="-I/Users/sergiobacelar/.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/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/opt/icu4c/lib/pkgconfig"
│
│ ==> Summary
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/icu4c/64.2: 257 files, 69.2MB
│ ==> Installing fribidi from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/fribidi-1.0.5.mojave.bottle.tar.gz
│ ==> Pouring fribidi-1.0.5.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fribidi/1.0.5: 66 files, 581.4KB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/fribidi/1.0.5
│ ==> Installing harfbuzz from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/harfbuzz-2.4.0_1.mojave.bottle.tar.gz
│ ==> Pouring harfbuzz-2.4.0_1.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/harfbuzz/2.4.0_1: 145 files, 9.4MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/harfbuzz/2.4.0_1
│ ==> Installing pango from staticfloat/juliatranslated
│ ==> Downloading https://homebrew.bintray.com/bottles/pango-1.42.4_1.mojave.bottle.tar.gz
│ ==> Pouring pango-1.42.4_1.mojave.bottle.tar.gz
│ 🍺  /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pango/1.42.4_1: 106 files, 4.4MB
│ Warning: Already linked: /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/Cellar/pango/1.42.4_1
│
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/sergiobacelar/.julia/packages/Cairo/p68X8/deps/build.jl:176
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 21118533 (Pool: 21115380; Big: 3153); GC: 47
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@asinghvi17
Copy link

It looks like you still have glib 2.6 installed. There's a solution here: #271 (comment)

@asinghvi17
Copy link

cd("~/.julia/environments" |> expanduser) instead?

@sbacelar
Copy link

Yes, but the result is similar,

julia> Pkg.add.(["Agents"])
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package VegaLite [112f6efa]:
 VegaLite [112f6efa] log:
 ├─possible versions are: [0.0.1-0.0.3, 0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0] or uninstalled
 ├─restricted by julia compatibility requirements to versions: [0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0] or uninstalled
 ├─restricted by compatibility requirements with Agents [46ada45e] to versions: [0.0.1-0.0.3, 0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0], leaving only versions: [0.3.4, 0.4.0, 0.5.0-0.5.3, 0.6.0]
 │ └─Agents [46ada45e] log:
 │   ├─possible versions are: 1.1.0 or uninstalled
 │   └─restricted to versions * by an explicit requirement, leaving only versions 1.1.0
 └─restricted by compatibility requirements with Cairo [159f3aea] to versions: 0.0.1-0.0.3 or uninstalled — no versions left
   └─Cairo [159f3aea] log:
     ├─possible versions are: [0.0.1, 0.2.0-0.2.35, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.6, 0.6.0] or uninstalled
     ├─restricted to versions * by Rsvg [c4c386cf], leaving only versions [0.0.1, 0.2.0-0.2.35, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.6, 0.6.0]
     │ └─Rsvg [c4c386cf] log:
     │   ├─possible versions are: 0.3.0 or uninstalled
     │   └─Rsvg [c4c386cf] is fixed to version 0.3.0
     └─restricted to versions 0.6.0 by an explicit requirement, leaving only versions 0.6.0
Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/GraphType.jl:1005
 [2] propagate_constraints! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/GraphType.jl:946 [inlined]
 [3] #simplify_graph!#121(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/GraphType.jl:1460
 [4] simplify_graph! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/GraphType.jl:1460 [inlined] (repeats 2 times)
 [5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Nothing) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:371
 [6] resolve_versions! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:315 [inlined]
 [7] #add_or_develop#63(::Array{Base.UUID,1}, ::Symbol, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1171
 [8] #add_or_develop at ./none:0 [inlined]
 [9] #add_or_develop#15(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:54
 [10] #add_or_develop at ./none:0 [inlined]
 [11] #add_or_develop#14 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:31 [inlined]
 [12] #add_or_develop at ./none:0 [inlined]
 [13] #add_or_develop#13 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:29 [inlined]
 [14] #add_or_develop at ./none:0 [inlined]
 [15] #add_or_develop#12(::Base.Iterators.Pairs{Symbol,Symbol,Tuple{Symbol},NamedTuple{(:mode,),Tuple{Symbol}}}, ::Function, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:28
 [16] #add_or_develop at ./none:0 [inlined]
 [17] #add#20 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:59 [inlined]
 [18] add at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:59 [inlined]
 [19] _broadcast_getindex_evalf at ./broadcast.jl:578 [inlined]
 [20] _broadcast_getindex at ./broadcast.jl:551 [inlined]
 [21] getindex at ./broadcast.jl:511 [inlined]
 [22] macro expansion at ./broadcast.jl:843 [inlined]
 [23] macro expansion at ./simdloop.jl:73 [inlined]
 [24] copyto! at ./broadcast.jl:842 [inlined]
 [25] copyto! at ./broadcast.jl:797 [inlined]
 [26] copy at ./broadcast.jl:773 [inlined]
 [27] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Pkg.API.add),Tuple{Array{String,1}}}) at ./broadcast.jl:753
 [28] top-level scope at none:0

@asinghvi17
Copy link

]rm Cairo, VegaLite, Rsvg; add Cairo, VegaLite, Rsvg; add Agents in that environment?

@sbacelar
Copy link

How do I know in what environment I am?

@asinghvi17
Copy link

When you go into Pkg REPL-mode, the name in parentheses will tell you. In a vanilla Julia session, that would be (1.1), like so:

(v1.1) pkg>

whereas this should look like:

(agent-env) pkg>

@sbacelar
Copy link

In REPL-mode is always (v1.1) pkg> even after doing cd("~/.julia/environments" |> expanduser) first. I can't change to (agent-env) pkg>

@asinghvi17
Copy link

asinghvi17 commented Apr 27, 2019

Right, you have to do the other stuff as well - the thing that changes the environment is activate.

This is the code that will setup and activate the environment:

cd("~/.julia/environments" |> expanduser)
mkdir("agent-env")
cd("agent-env")

using Pkg
Pkg.activate()

@sbacelar
Copy link

Doesn't work. I keep getting (v1.1) pkg>

@asinghvi17
Copy link

asinghvi17 commented Apr 27, 2019

Ah, shit - I forgot that Pkg defaults to default environment. Try Pkg.activate(".")?

@sbacelar
Copy link

It didn't remove nothing but,

(agent-env) pkg> st
    Status `~/.julia/environments/agent-env/Project.toml`
  [46ada45e] Agents v1.1.0
  [159f3aea] Cairo v0.5.6
  [c4c386cf] Rsvg v0.2.3
  [112f6efa] VegaLite v0.6.0

@asinghvi17
Copy link

Nice, did the installation work?

@sbacelar
Copy link

Well I didn't try. I am going to do using Agents.

@sbacelar
Copy link

No it didn't,

julia> using Agents
[ Info: Precompiling Agents [46ada45e-f475-11e8-01d0-f70cc89e6671]
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/sergiobacelar/.julia/packages/Cairo/CXPG1/src/Cairo.jl:9
ERROR: LoadError: Failed to precompile Cairo [159f3aea-2a34-519c-b102-8c37f9878175] to /Users/sergiobacelar/.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/sergiobacelar/.julia/packages/Rsvg/uwc9D/src/Rsvg.jl:8
ERROR: LoadError: Failed to precompile Rsvg [c4c386cf-5103-5370-be45-f3a111cca3b8] to /Users/sergiobacelar/.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/sergiobacelar/.julia/packages/VegaLite/5UYyY/src/VegaLite.jl:3
ERROR: LoadError: Failed to precompile VegaLite [112f6efa-9a02-5b7d-90c0-432ed331239a] to /Users/sergiobacelar/.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/sergiobacelar/.julia/packages/Agents/2wiNF/src/Agents.jl:7
ERROR: Failed to precompile Agents [46ada45e-f475-11e8-01d0-f70cc89e6671] to /Users/sergiobacelar/.julia/compiled/v1.1/Agents/nTsV8.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

@asinghvi17
Copy link

What happens with ]build Cairo? At least the version conflicts were resolved...

@sbacelar
Copy link

(agent-env) 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`

@asinghvi17
Copy link

Hmm...try ]build Agents?

@sbacelar
Copy link

(agent-env) pkg> build Agents
  Building Electron ────────→ `~/.julia/packages/Electron/AHiDq/deps/build.log`
  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`
  Building Rsvg ────────────→ `~/.julia/packages/Rsvg/uwc9D/deps/build.log`
  Building NodeJS ──────────→ `~/.julia/packages/NodeJS/rx0mH/deps/build.log`
  Building VegaLite ────────→ `~/.julia/packages/VegaLite/5UYyY/deps/build.log`
  Building Arpack ──────────→ `~/.julia/packages/Arpack/UiiMc/deps/build.log`
  Building SpecialFunctions → `~/.julia/packages/SpecialFunctions/fvheQ/deps/build.log`
  Building Rmath ───────────→ `~/.julia/packages/Rmath/Py9gH/deps/build.log`

@asinghvi17
Copy link

Nice, now try using Agents again? It looks like Cairo just needed to be built again.

@sbacelar
Copy link

I think it worked (with some Warnings). What is the "moral of this story"?

julia> using Agents
[ Info: Precompiling Agents [46ada45e-f475-11e8-01d0-f70cc89e6671]
objc[74101]: Class GNotificationCenterDelegate is implemented in both /Users/sergiobacelar/.julia/packages/Homebrew/s09IX/deps/usr/lib/libgio-2.0.dylib (0x111b17498) and /usr/local/opt/glib/lib/libgio-2.0.0.dylib (0x111ea5498). One of the two will be used. Which one is undefined.
┌ Warning: special characters "#{}()[]<>|&*?~;" should now be quoted in commands
│   caller = #shell_parse#351(::String, ::Function, ::String, ::Bool) at shell.jl:100
└ @ Base ./shell.jl:100

@asinghvi17
Copy link

When in doubt, use a fresh environment? :D

@sbacelar
Copy link

:-) And stay there forever?

@asinghvi17
Copy link

I imagine there was some residual incompatibility somewhere in your default environment which prevented you from using Agents. One thing you could do, though I don't know how it would turn out, is to copy a list of the packages you need into some text file, then delete ~/.julia/environments/v1.1/Manifest.toml and ~/.julia/environments/v1.1/Project.toml, cd to ~/.julia/environments/v1.1/ and call Pkg.activate(".") then use Pkg to re-add your currently installed packages.

@asinghvi17
Copy link

That would in effect regenerate your default environment without whatever quirk caused the original incompatibility (hopefully). Also, back up your Project.toml before doing this so you have a record of what was installed.

@sbacelar
Copy link

Well, I will try that. I have nothing to lose :-)

@asinghvi17
Copy link

In summary: to resolve a segfault while building Cairo, it is necessary to switch glib version on both the system wide homebrew install and Julia's local Homebrew install. You will need to have two Terminal windows open - one with a Julia session and the other as just a shell. Do NOT use Julia's shell mode.

You will also need to have Homebrew.jl in your Project; do so by ]add Homebrew.

In Julia:

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

In terminal:

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

Now, restart your Julia session, and try ]build Cairo. If that fails, please read the full conversation in the issue - even though it is a bit long, it's rather comprehensive.

A related issue is #271.

@sbacelar
Copy link

A synthesis of what I did afterwards: I deleted Manifest.toml and Project.toml (after backup). Then I added in environment v1.1 first: Cairo, Rsvg, VegaLite and Agents. using Agents worked.
At last I tried to add all of my packages. I could add everyone with the following exceptions: GLM, Hypothesistests, KernelDensity and QuantEcon.
As I understood from what happened before, when something similar happens I have to create a fresh environment and add the conflicting packages that I want. Is there a radical solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants