Coder Social home page Coder Social logo

Comments (33)

cbecker avatar cbecker commented on July 28, 2024

Sounds great ;)

For the tests, Gtk doesn't seem to come prepared with tests, because I get

julia> Pkg.test("Gtk")
INFO: No packages to install, update or remove
ERROR: Gtk did not provide a test/runtests.jl file
 in error at error.jl:21
 in test at pkg/entry.jl:711
 in anonymous at pkg/dir.jl:28
 in cd at ./file.jl:20
 in cd at pkg/dir.jl:28
 in test at pkg.jl:67

Though I tried include("/home/<USERNAME>/.julia/v0.3/Gtk/test/tests.jl") and worked fine.
I am running julia v0.3.1 on archlinux 64-bit.

from imageview.jl.

juliohm avatar juliohm commented on July 28, 2024

Very good news! I added the package here without problems.

from imageview.jl.

elsuizo avatar elsuizo commented on July 28, 2024

great Tim¡¡ on a fresh install in Debian sid works fine

from imageview.jl.

rsrock avatar rsrock commented on July 28, 2024

Works here too. One hiccup that I encountered is documented here: JuliaPackaging/Homebrew.jl#69

image

from imageview.jl.

timholy avatar timholy commented on July 28, 2024

This is great news.

Another fun thing to try while you're waiting (and it could easily be a couple weeks before I get to this): for those of you who build your own Julia, you can precompile it with Gtk. That means basically no delay for graphical applications. You'll only have to wait for ImageView itself to load, but it's not a huge package.

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

I was able to install it fine in ubuntu, no problems
Using both julia v0.3.0 and the a recent v0.4
6b3276fdb528c6ac05f8fcd826bef0cee1f362b2.

I opened a ticket for Gtk.jl about the tests.jl vs runtests.jl file.. in
case it just needs to be renamed? It'd be more convenient to just run
Pkg.test("Gtk"). - JuliaGraphics/Gtk.jl#120 .

In mac os (10.9.4), I can build and test fine (using macports gtk) with the
same v0.4 julia above.

(I ran into a few problems running the tests in v0.3.0 julia on mac os, but
the errors didn't seem specific to gtk, so I'm going to take a closer look
when I get a chance and open a ticket if needed... especially since others
don't seem to have problems on mac os...)

On Wed, Sep 17, 2014 at 10:38 AM, Tim Holy [email protected] wrote:

This is great news.

Another fun thing to try while you're waiting (and it could easily be a
couple weeks before I get to this): for those of you who build your own
Julia, you can precompile it with Gtk
https://github.com/JuliaLang/Gtk.jl#precompilation. That means
basically no delay for graphical applications. You'll only have to wait for
ImageView itself to load, but it's not a huge package.


Reply to this email directly or view it on GitHub
#46 (comment).

from imageview.jl.

timholy avatar timholy commented on July 28, 2024

Great, thanks especially for the Gtk ticket.

On the Mac, did you install via Pkg.add("Gtk") or did you have to/choose to intervene manually?

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

For mac it needed a little fiddling...

I tried Pkg.add("Gtk"), and it attempted to use the Homebrew.jl package to
install gtk, but that didn't work.

So I unlinked my system homebrew gtk as suggested here
JuliaPackaging/Homebrew.jl#69
JuliaPackaging/Homebrew.jl#69, and that worked for
v0.4, but still had problems with v0.3...

So then I noticed on the Gtk.jl readme it suggested using Macports (added
macport binary directory to loadpath)... I switched to that which again
worked for v0.4 but still having problems with v0.3.

Again, not sure if v0.3 is gtk specific or not... once I get some more time
to mess with this, I'll take another look..

On Thu, Sep 18, 2014 at 10:27 AM, Tim Holy [email protected] wrote:

Great, thanks especially for the Gtk ticket.

On the Mac, did you install via Pkg.add("Gtk") or did you have to/choose
to intervene manually?


Reply to this email directly or view it on GitHub
#46 (comment).

from imageview.jl.

staticfloat avatar staticfloat commented on July 28, 2024

When you run into problems, the output of BinDeps.debug("Gtk") is useful
for us.
-E

On Thu, Sep 18, 2014 at 10:41 AM, Daniel Perry [email protected]
wrote:

For mac it needed a little fiddling...

I tried Pkg.add("Gtk"), and it attempted to use the Homebrew.jl package to
install gtk, but that didn't work.

So I unlinked my system homebrew gtk as suggested here
JuliaPackaging/Homebrew.jl#69
JuliaPackaging/Homebrew.jl#69, and that worked for
v0.4, but still had problems with v0.3...

So then I noticed on the Gtk.jl readme it suggested using Macports (added
macport binary directory to loadpath)... I switched to that which again
worked for v0.4 but still having problems with v0.3.

Again, not sure if v0.3 is gtk specific or not... once I get some more
time
to mess with this, I'll take another look..

On Thu, Sep 18, 2014 at 10:27 AM, Tim Holy [email protected]
wrote:

Great, thanks especially for the Gtk ticket.

On the Mac, did you install via Pkg.add("Gtk") or did you have to/choose
to intervene manually?


Reply to this email directly or view it on GitHub
#46 (comment).


Reply to this email directly or view it on GitHub
#46 (comment).

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

Here is my v0.3 currently using macports gtk.

julia> BinDeps.debug("Gtk")
INFO: Reading build script...
The package declares 1 dependencies.

  • Library Group "gtk" (satisfied by SystemPaths, SystemPaths)
    • Library "glib"
      • Satisfied by:
        • Homebrew Bottles glib at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libglib-2.0.dylib
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libglib-2.0.0.dylib
        • System Paths at /opt/local/lib/libglib-2.0.dylib
      • Providers:
        • Homebrew Bottles glib
    • Library "gobject"
      • Satisfied by:
        • Homebrew Bottles gtk+3 at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libgobject-2.0.dylib
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libgobject-2.0.0.dylib
        • System Paths at /opt/local/lib/libgobject-2.0.dylib
      • Providers:
        • Homebrew Bottles gtk+3
    • Library "gtk"
      • Satisfied by:
        • System Paths at /opt/local/lib/libgtk-3.dylib
      • Providers:
        • Homebrew Bottles gtk+3
    • Library "gdk"
      • Satisfied by:
        • System Paths at /opt/local/lib/libgdk-3.0.dylib
      • Providers:
        • Homebrew Bottles gtk+3
    • Library "gdk_pixbuf"
      • Satisfied by:
        • Homebrew Bottles gdk-pixbuf at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libgdk_pixbuf-2.0.dylib
        • System Paths at /usr/local/Cellar/gdk-pixbuf/2.30.8/lib/libgdk_pixbuf-2.0.0.dylib
        • System Paths at /opt/local/lib/libgdk_pixbuf-2.0.0.dylib
      • Providers:
        • Homebrew Bottles gdk-pixbuf
    • Library "gio"
      • Satisfied by:
        • Homebrew Bottles glib at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libgio-2.0.0.dylib
        • System Paths at /usr/local/lib/libgio-2.0.0.dylib
        • System Paths at /opt/local/lib/libgio-2.0.0.dylib
      • Providers:
        • Homebrew Bottles glib

Here is what my v0.3 is currently saying when I include the tests file:

julia> include("/Users/dperry/.julia/v0.3/Gtk/test/tests.jl")
ERROR: libgobject not defined
in anonymous at no file
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:51
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
while loading /Users/dperry/.julia/v0.3/Gtk/src/GLib/GLib.jl, in expression starting on line 45
while loading /Users/dperry/.julia/v0.3/Gtk/src/Gtk.jl, in expression starting on line 6
while loading /Users/dperry/.julia/v0.3/Gtk/test/tests.jl, in expression starting on line 2

from imageview.jl.

timholy avatar timholy commented on July 28, 2024

This is probably not relevant, but just to check: have you recently done a Pkg.update? Cairo made some changes recently that affected Tk, although I suspect that's different from what you're seeing. But wanted to mention it in case it's an easy fix.

from imageview.jl.

staticfloat avatar staticfloat commented on July 28, 2024

You have multiple different Gtk installations sitting side by side. Choose to go with either MacPorts, System Homebrew, or Homebrew.jl, and remove the other two. Then run BinDeps.debug() again.

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

So... is there a way to only use the System homebrew ? I tried uninstalling Homebrew.jl ( Pkg.rm("Homebrew") ), but now everything is complaining that Homebrew.jl is missing:

julia> Pkg.build("Cairo")
INFO: Building Cairo
=======================================================================[ ERROR: Cairo ]========================================================================

Homebrew package not installed, please run Pkg.add("Homebrew")
while loading /Users/dperry/.julia/v0.3/Cairo/deps/build.jl, in expression starting on line 32

=======================================================================[ BUILD ERRORS ]========================================================================

WARNING: Cairo had build errors.

  • packages with build errors remain installed in /Users/dperry/.julia/v0.3
  • build a package and all its dependencies with Pkg.build(pkg)
  • build a single package by running its deps/build.jl script

julia> BinDeps.debug("Cairo")
INFO: Reading build script...
ERROR: Homebrew package not installed, please run Pkg.add("Homebrew")
in error at error.jl:21
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in debug_context at /Users/dperry/.julia/v0.3/BinDeps/src/debug.jl:54
in debug at /Users/dperry/.julia/v0.3/BinDeps/src/debug.jl:59
in debug at /Users/dperry/.julia/v0.3/BinDeps/src/debug.jl:65
while loading /Users/dperry/.julia/v0.3/Cairo/deps/build.jl, in expression starting on line 32

from imageview.jl.

staticfloat avatar staticfloat commented on July 28, 2024

You shouldn't uninstall Homebrew.jl; even if you don't use it to provide your binary dependencies, it still needs to be around. If you have a functional set of Gtk libraries in your system homebrew, they should be used instead of the Homebrew.jl ones by default, so don't worry about that.

For now, I would Pkg.add("Homebrew") again, then just Pkg.build() followed by BinDeps.debug() if things don't work. Please post all logs and errors in their entirety. System Homebrew libraries will be represented as SystemPaths in BinDeps.debug() that start with /usr/local/Cellar.

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

Ok... I re-instlalled Homebrew.jl, but removed all the packages to be sure only the system-brew-installed dependencies would be found (my system had . But when I re-build Cairo it re-installs all the same dependencies using Homebrew.jl (see below)...

I assumed it would detect the system libs and not install the Hombrew.jl version, but that doesn't seem to be the case?

(I can just use the Homebrew.jl versions if that's what should be done... But if there is some way to use system libs instead that's preferable because it seems painful to have to unlink all my system homebrew libs whenever I re-build a julia pkg.)

Thanks for your help.

julia> BinDeps.debug("Cairo")
INFO: Reading build script...
The package declares 1 dependencies.

  • Library Group "cairo"
    • Library "png" (not applicable to this system)
    • Library "pixman" (not applicable to this system)
    • Library "ffi" (not applicable to this system)
    • Library "gettext"
      • Providers:
        • Homebrew Bottles gettext
        • AptGet package gettext (can't provide)
        • Yum package gettext-libs (can't provide)
        • Autotools Build
    • Library "gobject"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libgobject-2.0.0.dylib
      • Providers:
        • Homebrew Bottles glib
        • AptGet package libglib2.0-0 (can't provide)
        • Yum package glib2 (can't provide)
        • Autotools Build
    • Library "freetype" (not applicable to this system)
    • Library "fontconfig" (not applicable to this system)
    • Library "cairo"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.2.dylib
      • Providers:
        • Homebrew Bottles cairo
        • AptGet package libcairo2 (can't provide)
        • Yum package cairo (can't provide)
        • Autotools Build
    • Library "pango"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/pango/1.36.6/lib/libpango-1.0.0.dylib
      • Providers:
        • Homebrew Bottles pango
        • AptGet package libpango1.0-0 (can't provide)
        • Yum package pango (can't provide)
        • Autotools Build
    • Library "pangocairo"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/pango/1.36.6/lib/libpangocairo-1.0.0.dylib
      • Providers:
        • Homebrew Bottles pango
        • AptGet package libpango1.0-0 (can't provide)
        • Yum package pango (can't provide)
        • Autotools Build
    • Library "zlib" (not applicable to this system)

julia> Pkg.build("Cairo")
INFO: Building Homebrew
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 34 (delta 24), reused 34 (delta 24)
Unpacking objects: 100% (34/34), done.
From https://github.com/Homebrew/homebrew
bbf9ad1..9f1af49 master -> origin/master
HEAD is now at 9f1af49 Fix exiting the debugger menu with CTRL-D
HEAD is now at 73c6cfe Bottle cbc
INFO: Building Cairo
==> Downloading https://juliabottles.s3.amazonaws.com/gettext-0.19.2.mavericks.bottle.1.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//gettext-0.19.2.mavericks.bottle.1.tar.gz
==> Pouring gettext-0.19.2.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/gettext/0.19.2: 1920 files, 18M
To relink: brew unlink gettext && brew link gettext
==> Installing glib dependency: libffi
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libffi-3.0.13.mavericks.bottle.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//libffi-3.0.13.mavericks.bottle.tar.gz
==> Pouring libffi-3.0.13.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /Users/dperry/.julia/v0.3/Homebrew/deps/usr.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Some formulae require a newer version of libffi.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS:  -L/Users/dperry/.julia/v0.3/Homebrew/deps/usr/opt/libffi/lib

==> Summary
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/libffi/3.0.13: 13 files, 388K
==> Installing glib
==> Downloading https://juliabottles.s3.amazonaws.com/glib-2.40.0_1.mavericks.bottle.1.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//glib-2.40.0_1.mavericks.bottle.1.tar.gz
==> Pouring glib-2.40.0_1.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/glib/2.40.0_1: 410 files, 18M
To relink: brew unlink glib && brew link glib
==> Installing dependencies for cairo: libpng, freetype, pixman
==> Installing cairo dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.13.mavericks.bottle.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//libpng-1.6.13.mavericks.bottle.tar.gz
==> Pouring libpng-1.6.13.mavericks.bottle.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/libpng/1.6.13: 17 files, 1.2M
==> Installing cairo dependency: freetype
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/freetype-2.5.3_1.mavericks.bottle.1.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//freetype-2.5.3_1.mavericks.bottle.1.tar.gz
==> Pouring freetype-2.5.3_1.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/freetype/2.5.3_1: 60 files, 2.5M
==> Installing cairo dependency: pixman
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pixman-0.32.6.mavericks.bottle.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//pixman-0.32.6.mavericks.bottle.tar.gz
==> Pouring pixman-0.32.6.mavericks.bottle.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/pixman/0.32.6: 11 files, 1.4M
==> Installing cairo
==> Downloading https://juliabottles.s3.amazonaws.com/cairo-1.12.16.mavericks.bottle.3.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//cairo-1.12.16.mavericks.bottle.3.tar.gz
==> Pouring cairo-1.12.16.mavericks.bottle.3.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/cairo/1.12.16: 99 files, 7.2M
To relink: brew unlink cairo && brew link cairo
==> Installing dependencies for pango: staticfloat/juliadeps/icu4c, staticfloat/juliadeps/harfbuzz, staticfloat/juliadeps/fontconfig, staticfloat/juliad
==> Installing pango dependency: staticfloat/juliadeps/icu4c
==> Downloading https://juliabottles.s3.amazonaws.com/icu4c-52.1.mavericks.bottle.2.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//icu4c-52.1.mavericks.bottle.2.tar.gz
==> Pouring icu4c-52.1.mavericks.bottle.2.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /Users/dperry/.julia/v0.3/Homebrew/deps/usr.

Conflicts; see: https://github.com/Homebrew/homebrew/issues/issue/167

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS:  -L/Users/dperry/.julia/v0.3/Homebrew/deps/usr/opt/icu4c/lib
CPPFLAGS: -I/Users/dperry/.julia/v0.3/Homebrew/deps/usr/opt/icu4c/include

==> Summary
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/icu4c/52.1: 239 files, 60M
==> Installing pango dependency: staticfloat/juliadeps/harfbuzz
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/harfbuzz-0.9.33.mavericks.bottle.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//harfbuzz-0.9.33.mavericks.bottle.tar.gz
==> Pouring harfbuzz-0.9.33.mavericks.bottle.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/harfbuzz/0.9.33: 72 files, 2.9M
==> Installing pango dependency: staticfloat/juliadeps/fontconfig
==> Downloading https://juliabottles.s3.amazonaws.com/fontconfig-2.11.1.mavericks.bottle.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//fontconfig-2.11.1.mavericks.bottle.tar.gz
==> Pouring fontconfig-2.11.1.mavericks.bottle.tar.gz
==> /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/fontconfig/2.11.1/bin/fc-cache -frv
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/fontconfig/2.11.1: 448 files, 3.6M
==> Installing pango dependency: staticfloat/juliadeps/gobject-introspection
==> Downloading https://juliabottles.s3.amazonaws.com/gobject-introspection-1.40.0.mavericks.bottle.1.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//gobject-introspection-1.40.0.mavericks.bottle.1.tar.gz
==> Pouring gobject-introspection-1.40.0.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/gobject-introspection/1.40.0: 192 files, 9.9M
==> Installing pango
==> Downloading https://juliabottles.s3.amazonaws.com/pango-1.36.5.mavericks.bottle.1.tar.gz
Already downloaded: /Users/dperry/Library/Caches/Homebrew.jl//pango-1.36.5.mavericks.bottle.1.tar.gz
==> Pouring pango-1.36.5.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/pango/1.36.5: 126 files, 4.6M
To relink: brew unlink pango && brew link pango

julia> BinDeps.debug("Cairo")
INFO: Reading build script...
The package declares 1 dependencies.

  • Library Group "cairo" (satisfied by HB, HB)
    • Library "png" (not applicable to this system)
    • Library "pixman" (not applicable to this system)
    • Library "ffi" (not applicable to this system)
    • Library "gettext"
      • Satisfied by:
        • Homebrew Bottles gettext at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libintl.dylib
        • Homebrew Bottles gettext at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libgettextpo.dylib
      • Providers:
        • Homebrew Bottles gettext
        • AptGet package gettext (can't provide)
        • Yum package gettext-libs (can't provide)
        • Autotools Build
    • Library "gobject"
      • Satisfied by:
        • Homebrew Bottles glib at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libgobject-2.0.dylib
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libgobject-2.0.0.dylib
      • Providers:
        • Homebrew Bottles glib
        • AptGet package libglib2.0-0 (can't provide)
        • Yum package glib2 (can't provide)
        • Autotools Build
    • Library "freetype" (not applicable to this system)
    • Library "fontconfig" (not applicable to this system)
    • Library "cairo"
      • Satisfied by:
        • Homebrew Bottles cairo at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libcairo.dylib
        • System Paths at /usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.2.dylib
      • Providers:
        • Homebrew Bottles cairo
        • AptGet package libcairo2 (can't provide)
        • Yum package cairo (can't provide)
        • Autotools Build
    • Library "pango"
      • Satisfied by:
        • Homebrew Bottles pango at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libpango-1.0.dylib
        • System Paths at /usr/local/Cellar/pango/1.36.6/lib/libpango-1.0.0.dylib
      • Providers:
        • Homebrew Bottles pango
        • AptGet package libpango1.0-0 (can't provide)
        • Yum package pango (can't provide)
        • Autotools Build
    • Library "pangocairo"
      • Satisfied by:
        • Homebrew Bottles pango at /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libpangocairo-1.0.dylib
        • System Paths at /usr/local/Cellar/pango/1.36.6/lib/libpangocairo-1.0.0.dylib
      • Providers:
        • Homebrew Bottles pango
        • AptGet package libpango1.0-0 (can't provide)
        • Yum package pango (can't provide)
        • Autotools Build
    • Library "zlib" (not applicable to this system)

julia> Homebrew.list()
12-element Array{BrewPkg,1}:
cairo: 1.12.16
fontconfig: 2.11.1
freetype: 2.5.3+1
gettext: 0.19.2
glib: 2.40.0+1
gobject-introspection: 1.40.0
harfbuzz: 0.9.33
icu4c: 52.1.0
libffi: 3.0.13
libpng: 1.6.13
pango: 1.36.5
pixman: 0.32.6

julia> Pkg.test("Cairo")
INFO: Testing Cairo
INFO: Cairo tests passed
INFO: No packages to install, update or remove

from imageview.jl.

staticfloat avatar staticfloat commented on July 28, 2024

Very helpful, thanks. Try running brew link --force gettext, remove the
homebrew.jl packages and try again.
On Sep 18, 2014 12:31 PM, "Daniel Perry" [email protected] wrote:

Ok... I re-instlalled Homebrew.jl, but removed all the packages to be sure
only the system-brew-installed dependencies would be found (my system had .
But when I re-build Cairo it re-installs all the same dependencies using
Homebrew.jl (see below)...

I assumed it would detect the system libs and not install the Hombrew.jl
version, but that doesn't seem to be the case?

(I can just use the Homebrew.jl versions if that's what should be done...
But if there is some way to use system libs instead that's preferable
because it seems painful to have to unlink all my system homebrew libs
whenever I re-build a julia pkg.)

Thanks for your help.

julia> BinDeps.debug("Cairo")
INFO: Reading build script...
The package declares 1 dependencies.

  • Library Group "cairo"
    • Library "png" (not applicable to this system)
    • Library "pixman" (not applicable to this system)
    • Library "ffi" (not applicable to this system)
    • Library "gettext"
      • Providers:
        • Homebrew Bottles gettext
        • AptGet package gettext (can't provide)
        • Yum package gettext-libs (can't provide)
        • Autotools Build
        • Library "gobject"
      • Satisfied by:
        • System Paths at
          /usr/local/Cellar/glib/2.40.0_1/lib/libgobject-2.0.0.dylib
        • Providers:
          • Homebrew Bottles glib
          • AptGet package libglib2.0-0 (can't provide)
          • Yum package glib2 (can't provide)
          • Autotools Build
        • Library "freetype" (not applicable to this system)
    • Library "fontconfig" (not applicable to this system)
    • Library "cairo"
      • Satisfied by:
        • System Paths at
          /usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.2.dylib
        • Providers:
          • Homebrew Bottles cairo
          • AptGet package libcairo2 (can't provide)
          • Yum package cairo (can't provide)
          • Autotools Build
        • Library "pango"
      • Satisfied by:
        • System Paths at
          /usr/local/Cellar/pango/1.36.6/lib/libpango-1.0.0.dylib
        • Providers:
          • Homebrew Bottles pango
          • AptGet package libpango1.0-0 (can't provide)
          • Yum package pango (can't provide)
          • Autotools Build
        • Library "pangocairo"
      • Satisfied by:
        • System Paths at
          /usr/local/Cellar/pango/1.36.6/lib/libpangocairo-1.0.0.dylib
        • Providers:
          • Homebrew Bottles pango
          • AptGet package libpango1.0-0 (can't provide)
          • Yum package pango (can't provide)
          • Autotools Build
        • Library "zlib" (not applicable to this system)

julia> Pkg.build("Cairo")
INFO: Building Homebrew
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 34 (delta 24), reused 34 (delta 24)
Unpacking objects: 100% (34/34), done.
From https://github.com/Homebrew/homebrew
bbf9ad1..9f1af49 master -> origin/master
HEAD is now at 9f1af49 Fix exiting the debugger menu with CTRL-D
HEAD is now at 73c6cfe Bottle cbc
INFO: Building Cairo
==> Downloading
https://juliabottles.s3.amazonaws.com/gettext-0.19.2.mavericks.bottle.1.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//gettext-0.19.2.mavericks.bottle.1.tar.gz
==> Pouring gettext-0.19.2.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/gettext/0.19.2:
1920 files, 18M
To relink: brew unlink gettext && brew link gettext
==> Installing glib dependency: libffi
==> Downloading
https://downloads.sf.net/project/machomebrew/Bottles/libffi-3.0.13.mavericks.bottle.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//libffi-3.0.13.mavericks.bottle.tar.gz
==> Pouring libffi-3.0.13.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into
/Users/dperry/.julia/v0.3/Homebrew/deps/usr.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Some formulae require a newer version of libffi.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS: -L/Users/dperry/.julia/v0.3/Homebrew/deps/usr/opt/libffi/lib

==> Summary
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/libffi/3.0.13: 13
files, 388K
==> Installing glib
==> Downloading
https://juliabottles.s3.amazonaws.com/glib-2.40.0_1.mavericks.bottle.1.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//glib-2.40.0_1.mavericks.bottle.1.tar.gz
==> Pouring glib-2.40.0_1.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/glib/2.40.0_1: 410
files, 18M
To relink: brew unlink glib && brew link glib
==> Installing dependencies for cairo: libpng, freetype, pixman
==> Installing cairo dependency: libpng
==> Downloading
https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.13.mavericks.bottle.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//libpng-1.6.13.mavericks.bottle.tar.gz
==> Pouring libpng-1.6.13.mavericks.bottle.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/libpng/1.6.13: 17
files, 1.2M
==> Installing cairo dependency: freetype
==> Downloading
https://downloads.sf.net/project/machomebrew/Bottles/freetype-2.5.3_1.mavericks.bottle.1.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//freetype-2.5.3_1.mavericks.bottle.1.tar.gz
==> Pouring freetype-2.5.3_1.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/freetype/2.5.3_1:
60 files, 2.5M
==> Installing cairo dependency: pixman
==> Downloading
https://downloads.sf.net/project/machomebrew/Bottles/pixman-0.32.6.mavericks.bottle.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//pixman-0.32.6.mavericks.bottle.tar.gz
==> Pouring pixman-0.32.6.mavericks.bottle.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/pixman/0.32.6: 11
files, 1.4M
==> Installing cairo
==> Downloading
https://juliabottles.s3.amazonaws.com/cairo-1.12.16.mavericks.bottle.3.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//cairo-1.12.16.mavericks.bottle.3.tar.gz
==> Pouring cairo-1.12.16.mavericks.bottle.3.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/cairo/1.12.16: 99
files, 7.2M
To relink: brew unlink cairo && brew link cairo
==> Installing dependencies for pango: staticfloat/juliadeps/icu4c,
staticfloat/juliadeps/harfbuzz, staticfloat/juliadeps/fontconfig,
staticfloat/juliad
==> Installing pango dependency: staticfloat/juliadeps/icu4c
==> Downloading
https://juliabottles.s3.amazonaws.com/icu4c-52.1.mavericks.bottle.2.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//icu4c-52.1.mavericks.bottle.2.tar.gz
==> Pouring icu4c-52.1.mavericks.bottle.2.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into
/Users/dperry/.julia/v0.3/Homebrew/deps/usr.

Conflicts; see: https://github.com/Homebrew/homebrew/issues/issue/167

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS: -L/Users/dperry/.julia/v0.3/Homebrew/deps/usr/opt/icu4c/lib
CPPFLAGS: -I/Users/dperry/.julia/v0.3/Homebrew/deps/usr/opt/icu4c/include

==> Summary
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/icu4c/52.1: 239
files, 60M
==> Installing pango dependency: staticfloat/juliadeps/harfbuzz
==> Downloading
https://downloads.sf.net/project/machomebrew/Bottles/harfbuzz-0.9.33.mavericks.bottle.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//harfbuzz-0.9.33.mavericks.bottle.tar.gz
==> Pouring harfbuzz-0.9.33.mavericks.bottle.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/harfbuzz/0.9.33: 72
files, 2.9M
==> Installing pango dependency: staticfloat/juliadeps/fontconfig
==> Downloading
https://juliabottles.s3.amazonaws.com/fontconfig-2.11.1.mavericks.bottle.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//fontconfig-2.11.1.mavericks.bottle.tar.gz
==> Pouring fontconfig-2.11.1.mavericks.bottle.tar.gz
==>
/Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/fontconfig/2.11.1/bin/fc-cache
-frv
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/fontconfig/2.11.1:
448 files, 3.6M
==> Installing pango dependency:
staticfloat/juliadeps/gobject-introspection
==> Downloading
https://juliabottles.s3.amazonaws.com/gobject-introspection-1.40.0.mavericks.bottle.1.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//gobject-introspection-1.40.0.mavericks.bottle.1.tar.gz
==> Pouring gobject-introspection-1.40.0.mavericks.bottle.1.tar.gz
🍺
/Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/gobject-introspection/1.40.0:
192 files, 9.9M
==> Installing pango
==> Downloading
https://juliabottles.s3.amazonaws.com/pango-1.36.5.mavericks.bottle.1.tar.gz
Already downloaded:
/Users/dperry/Library/Caches/Homebrew.jl//pango-1.36.5.mavericks.bottle.1.tar.gz
==> Pouring pango-1.36.5.mavericks.bottle.1.tar.gz
🍺 /Users/dperry/.julia/v0.3/Homebrew/deps/usr/Cellar/pango/1.36.5: 126
files, 4.6M
To relink: brew unlink pango && brew link pango

julia> BinDeps.debug("Cairo")
INFO: Reading build script...
The package declares 1 dependencies.

  • Library Group "cairo" (satisfied by HB, HB)
    • Library "png" (not applicable to this system)
    • Library "pixman" (not applicable to this system)
    • Library "ffi" (not applicable to this system)
    • Library "gettext"
      • Satisfied by:
        • Homebrew Bottles gettext at
          /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libintl.dylib
        • Homebrew Bottles gettext at
          /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libgettextpo.dylib
        • Providers:
          • Homebrew Bottles gettext
          • AptGet package gettext (can't provide)
          • Yum package gettext-libs (can't provide)
          • Autotools Build
        • Library "gobject"
      • Satisfied by:
        • Homebrew Bottles glib at
          /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libgobject-2.0.dylib
        • System Paths at
          /usr/local/Cellar/glib/2.40.0_1/lib/libgobject-2.0.0.dylib
        • Providers:
          • Homebrew Bottles glib
          • AptGet package libglib2.0-0 (can't provide)
          • Yum package glib2 (can't provide)
          • Autotools Build
        • Library "freetype" (not applicable to this system)
    • Library "fontconfig" (not applicable to this system)
    • Library "cairo"
      • Satisfied by:
        • Homebrew Bottles cairo at
          /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libcairo.dylib
        • System Paths at
          /usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.2.dylib
        • Providers:
          • Homebrew Bottles cairo
          • AptGet package libcairo2 (can't provide)
          • Yum package cairo (can't provide)
          • Autotools Build
        • Library "pango"
      • Satisfied by:
        • Homebrew Bottles pango at
          /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libpango-1.0.dylib
        • System Paths at
          /usr/local/Cellar/pango/1.36.6/lib/libpango-1.0.0.dylib
        • Providers:
          • Homebrew Bottles pango
          • AptGet package libpango1.0-0 (can't provide)
          • Yum package pango (can't provide)
          • Autotools Build
        • Library "pangocairo"
      • Satisfied by:
        • Homebrew Bottles pango at
          /Users/dperry/.julia/v0.3/Homebrew/deps/usr/lib/libpangocairo-1.0.dylib
        • System Paths at
          /usr/local/Cellar/pango/1.36.6/lib/libpangocairo-1.0.0.dylib
        • Providers:
          • Homebrew Bottles pango
          • AptGet package libpango1.0-0 (can't provide)
          • Yum package pango (can't provide)
          • Autotools Build
        • Library "zlib" (not applicable to this system)

julia> Homebrew.list()
12-element Array{BrewPkg,1}:
cairo: 1.12.16

fontconfig: 2.11.1

freetype: 2.5.3+1

gettext: 0.19.2

glib: 2.40.0+1

gobject-introspection: 1.40.0
harfbuzz: 0.9.33

icu4c: 52.1.0

libffi: 3.0.13

libpng: 1.6.13

pango: 1.36.5

pixman: 0.32.6

julia> Pkg.test("Cairo")
INFO: Testing Cairo
INFO: Cairo tests passed
INFO: No packages to install, update or remove


Reply to this email directly or view it on GitHub
#46 (comment).

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

That seems to have worked... so it has to have all dependencies satisfied or else it installs them all via Homebrew.jl? Good to know.

I will try the same now with Gtk and let you know how it goes.

julia>
[2]+ Stopped julia
moriarty:~ dperry$ brew link --force gettext
Linking /usr/local/Cellar/gettext/0.19.2... 184 symlinks created
moriarty:~ dperry$ fg
julia
julia> for f in Homebrew.list()
s = @sprintf("%s",f)
println(s)
parts = split(s,":")
println(parts[1])
Homebrew.rm(parts[1])
end
cairo: 1.12.16
cairo
Uninstalling cairo...
fontconfig: 2.11.1
fontconfig
Uninstalling fontconfig...
freetype: 2.5.3+1
freetype
Uninstalling freetype...
gettext: 0.19.2
gettext
Uninstalling gettext...
glib: 2.40.0+1
glib
Uninstalling glib...
gobject-introspection: 1.40.0
gobject-introspection
Uninstalling gobject-introspection...
harfbuzz: 0.9.33
harfbuzz
Uninstalling harfbuzz...
icu4c: 52.1.0
icu4c
Uninstalling icu4c...
libffi: 3.0.13
libffi
Uninstalling libffi...
libpng: 1.6.13
libpng
Uninstalling libpng...
pango: 1.36.5
pango
Uninstalling pango...
pixman: 0.32.6
pixman
Uninstalling pixman...

julia> Pkg.build("Cairo")
INFO: Building Homebrew
remote: Counting objects: 15, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 15 (delta 12), reused 7 (delta 4)
Unpacking objects: 100% (15/15), done.
From https://github.com/Homebrew/homebrew
9f1af49..c42916f master -> origin/master
HEAD is now at c42916f bib-tool: remove unnecessary autoreconf
HEAD is now at 73c6cfe Bottle cbc
INFO: Building Cairo

julia> Homebrew.list()
0-element Array{BrewPkg,1}

julia> BinDeps.debug("Cairo")
INFO: Reading build script...
The package declares 1 dependencies.

  • Library Group "cairo" (satisfied by SystemPaths, SystemPaths)
    • Library "png" (not applicable to this system)
    • Library "pixman" (not applicable to this system)
    • Library "ffi" (not applicable to this system)
    • Library "gettext"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/gettext/0.19.2/lib/libintl.8.dylib
        • System Paths at /usr/local/Cellar/gettext/0.19.2/lib/libgettextpo.0.dylib
      • Providers:
        • Homebrew Bottles gettext
        • AptGet package gettext (can't provide)
        • Yum package gettext-libs (can't provide)
        • Autotools Build
    • Library "gobject"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libgobject-2.0.0.dylib
      • Providers:
        • Homebrew Bottles glib
        • AptGet package libglib2.0-0 (can't provide)
        • Yum package glib2 (can't provide)
        • Autotools Build
    • Library "freetype" (not applicable to this system)
    • Library "fontconfig" (not applicable to this system)
    • Library "cairo"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.2.dylib
      • Providers:
        • Homebrew Bottles cairo
        • AptGet package libcairo2 (can't provide)
        • Yum package cairo (can't provide)
        • Autotools Build
    • Library "pango"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/pango/1.36.6/lib/libpango-1.0.0.dylib
      • Providers:
        • Homebrew Bottles pango
        • AptGet package libpango1.0-0 (can't provide)
        • Yum package pango (can't provide)
        • Autotools Build
    • Library "pangocairo"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/pango/1.36.6/lib/libpangocairo-1.0.0.dylib
      • Providers:
        • Homebrew Bottles pango
        • AptGet package libpango1.0-0 (can't provide)
        • Yum package pango (can't provide)
        • Autotools Build
    • Library "zlib" (not applicable to this system)

julia> Pkg.test("Cairo")
INFO: Testing Cairo
INFO: Cairo tests passed
INFO: No packages to install, update or remove

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

Yep Gtk built fine and now passes the tests (mostly)...

I do get a "dynamic session lookup failed" message the first time I run the test, but the second time it seems doesn't .. I thought maybe it was because X11 wasn't running when I ran the tests (it launches it eventually), but even if I start X11 and then run the test, it still has that message the first run.

And then if I quit X11 julia crashes..

Should either of those items go into a ticket?

Log:

julia> BinDeps.debug("Gtk")
INFO: Reading build script...
The package declares 1 dependencies.

  • Library Group "gtk" (satisfied by SystemPaths)
    • Library "glib"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libglib-2.0.0.dylib
      • Providers:
        • Homebrew Bottles glib
    • Library "gobject"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libgobject-2.0.0.dylib
      • Providers:
        • Homebrew Bottles gtk+3
    • Library "gtk"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/gtk+3/3.12.2/lib/libgtk-3.0.dylib
      • Providers:
        • Homebrew Bottles gtk+3
    • Library "gdk"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/gtk+3/3.12.2/lib/libgdk-3.0.dylib
      • Providers:
        • Homebrew Bottles gtk+3
    • Library "gdk_pixbuf"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/gdk-pixbuf/2.30.8/lib/libgdk_pixbuf-2.0.0.dylib
      • Providers:
        • Homebrew Bottles gdk-pixbuf
    • Library "gio"
      • Satisfied by:
        • System Paths at /usr/local/Cellar/glib/2.40.0_1/lib/libgio-2.0.0.dylib
      • Providers:
        • Homebrew Bottles glib

julia> Pkg.build("Gtk")
INFO: Building Homebrew
HEAD is now at c42916f bib-tool: remove unnecessary autoreconf
HEAD is now at 73c6cfe Bottle cbc
INFO: Building Cairo
INFO: Building Gtk

julia> include("/Users/dperry/.julia/v0.3/Gtk/test/tests.jl")
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

julia> include("/Users/dperry/.julia/v0.3/Gtk/test/tests.jl")

If I quit X11 while julia is still running, julia crashes:

julia>
(:67101): Gdk-WARNING **: : Fatal IO error 35 (Resource temporarily unavailable) on X server /tmp/launch-XN5JAr/org.macosforge.xquartz:0.

moriarty:~ dperry$

from imageview.jl.

vtjnash avatar vtjnash commented on July 28, 2024

All of the dependencies must come from the same source or the system linker gets very confused. I alternate between nuking Homebrew.jl/deps/usr putting /opt/local or /opt/brew in my DL_LOAD_PATH to test various configs, all the way back to Julia 0.2 -- then rerun Pkg.build("Gtk") to fixup all of the deps files in the dependency tree (eg Cairo.jl and Gtk.jl). If you install Homebrew to /usr/local, than you either need to use it exclusively, or uninstall it between tests of different configurations.

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

Thanks for the explanation. Makes sense that they all need to come from the same source, now that you point that out. Installing homebrew to /opt/brew and using DL_LOAD_PATH is a good idea.. that will make it easier to switch between them.

from imageview.jl.

rsrock avatar rsrock commented on July 28, 2024

Jameson, I seem to remember seeing that you don't like how Homebrew dumps everything into /usr/local. Is /opt/brew working better for you in general? The Homebrew folks go to great lengths to encourage everyone to use /usr/local, I know.

Just asking because I'll probably nuke my Homebrew when Yosemite comes out. May as well set it up right...

from imageview.jl.

staticfloat avatar staticfloat commented on July 28, 2024

Just so you know, if you install things into /opt/brew, you won't be able to use the majority of prepackaged binaries (bottles) with Homebrew; things will still work, but your machine will have to compile a lot of stuff. I personally use Homebrew in /usr/local on about half of my machines, and it works pretty well for me as long as I use Homebrew for most softwares. I install the software that is not available from Homebrew into ~/local and adjust my paths accordingly, but if you want to do it the other way around, (put manually-installed stuff into /usr/local and put Homebrew into some other location) it should work as well.

from imageview.jl.

vtjnash avatar vtjnash commented on July 28, 2024

putting brew somewhere else lets you choose not to use sometimes (either /opt/brew, or ~/local are reasonable choices). /usr/local works well in most cases, because people are content to stay within the Homebrew world, or build from source while linking against Homebrew.

technically, brew isn't even in /usr/local by default, just optional symlinks – all of the real content is in the Cellar. this is strongly reminiscent of Frameworks (where the real content is in /Library/Framework quite often, and just symlinked to /usr/lib). the advantage here is that is possible to link against some library that is not the default (esp. with respect to having multiple versions installed), and let the linker figure out which library you actually wanted at runtime (via two-level dlsym resolution). this works very well if you can do all of the linking at once, since you can guarantee that the library versions won't change on you across machines, upgrades, installation of new libs in /usr/local/lib (which would normally end up higher on the lookup path), and so on. In Julia's case, however, each library is independent. Someone needs to make sure that if I make calls to GLib through Cairo, it is calling the same GLib that I called directly – otherwise unpredictable things happen (on the other-hand, if I need libz and you need libz, it doesn't matter if we use a different libz, as long as we don't try to take global state created in one copy and hand it to the other copy of libz). This step is where the package managers diverge significantly in their approach:

  1. Darwin versions libraries into a specific folder structure so that you should only end up with exactly one copy, plus has private, relocatable Framework folders to give individual applications control of their libraries
  2. Homebrew prohibits duplicating system software libraries (with an exception for cellar-only libraries that can be explicitly requested)
  3. Homebrew.jl inherits the general strategy from Homebrew, but defaults to being a private relocatable copy
  4. MacPorts prohibits linking to system libraries and requires that everything be self-contained and self-consistent within the MacPorts folder

Each approach has it's own advantages and disadvantages. Darwin's approach works well as a system approach, since applications can depend on a unchanging view of the world, and plugins for those applications can depend on the application providing a constant view of the world (consistency by process ordering). MacPorts approach works well if you are willing to trade increased space and install time requirements for full isolation (consistency by design). Homebrew's approach works well if you are willing to track and manage potential interactions yourself (consistency by user awareness / intervention). Homebrew.jl's approach works well, except sometimes it might get confused by software in /usr/local (I'm not sure whether to call this consistency by user inaction, or consistency by design). hopefully that was helpful, and not just a massive wall of text.

@staticfloat yes, quartz is enabled: https://github.com/staticfloat/homebrew-juliadeps/blob/73c6cfe04e54883d606cdd3f0203fc6094b66020/gtk%2B3.rb#L39

from imageview.jl.

vtjnash avatar vtjnash commented on July 28, 2024

If I quit X11 while julia is still running, julia crashes:

this is a little like complaining either "I shutdown my computer and my programs stopped running" or "I quit the program and my program stopped running". it just isn't possible to keep running at that point.

If gdk tried to keep running, it would likely just segfault very shortly afterwards, since all of the user interface pointers are suddenly and unexpectedly invalid. see gdk_x_io_error if you're interested in where it gets killed. We could replace the XLib fatal error handler (XSetIOErrorHandler) with our own, but we can't do much more than die quickly, before someone tries to make a call into gtk – which is exactly what the existing error handler does.

from imageview.jl.

staticfloat avatar staticfloat commented on July 28, 2024

I knew I had enabled building of it, but I wasn't sure if we were using the quartz backend. And Jameson's summary above is spot-on regarding package managers. :)

from imageview.jl.

vtjnash avatar vtjnash commented on July 28, 2024

on the next line, you also disabled X11 (https://github.com/staticfloat/homebrew-juliadeps/blob/73c6cfe04e54883d606cdd3f0203fc6094b66020/gtk%2B3.rb#L40) so it's the only backend that could be used :)

of the 4 approaches described above, only Homebrew seems wrong to me, since it requires user awareness to keep it working – and in the event the user forgets it can cause any of the other 3 to break, whereas the other 3 approaches maintain an element of isolation. of course, Darwin's approach could break everything too if the OS changed, but being dependent upon the OS to maintain a consistent view of the world seems like a necessary and acceptable risk. I split them into 4 categories, but they could probably be reduced to 2: Darwin/Homebrew and MacPorts/Homebrew.jl

from imageview.jl.

rsrock avatar rsrock commented on July 28, 2024

@vtjnash and @staticfloat, that was very helpful-- thanks! Also good to know about BinDeps.debug().

from imageview.jl.

daniel-perry avatar daniel-perry commented on July 28, 2024

On Thu, Sep 18, 2014 at 6:12 PM, Jameson Nash [email protected]
wrote:

If gdk tried to keep running, it would likely just segfault very shortly
afterwards, since all of the user interface pointers are suddenly and
unexpectedly invalid. see gdk_x_io_error if you're interested in where it
gets killed. We could replace the XLib fatal error handler
(XSetIOErrorHandler) with our own, but we can't do much more than die
quickly, before someone tries to make a call into gtk – which is exactly
what the existing error handler does.

Right.. duh... makes sense... by loading the Gtk library I've created a
dependency on X11 so killing that is going to create problems... probably
should have thought that through a little more before reporting it...
thanks.

from imageview.jl.

maxruby avatar maxruby commented on July 28, 2024

@daniel-perry, I reported the same problem with "Dynamic session lookup supported but failed"
in JuliaGraphics/Gtk.jl#121. After brew update,
$ cp /opt/brew/Cellar/d-bus/1.8.8/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist

from imageview.jl.

lucasb-eyer avatar lucasb-eyer commented on July 28, 2024

When this happens, we should also try to play nice with GtkInteract.jl.

from imageview.jl.

timholy avatar timholy commented on July 28, 2024

I totally agree. Or at least base it on Reactive.jl, if GtkInteract doesn't allow (and shouldn't change to permit) the amount of customized layout we will need.

In my own custom GUIs, I'm just now starting to use Reactive for all the entry widgets, etc, and it's a joy to be able to just push! a new value from the REPL to update the state of the GUI. (CC @shashi 😄).

from imageview.jl.

shashi avatar shashi commented on July 28, 2024

Yay! :D

from imageview.jl.

timholy avatar timholy commented on July 28, 2024

This is done.

from imageview.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.