[julia-users] how to move Julia packages from Ubuntu to OSX?

2015-06-13 Thread K leo
hi Elliot,

Thanks for the detailed message.

Strangely, when I did BinDeps.debug(Cairo), I got:
ERROR: BinDeps not defined.

Also strangely, when I did 'brew rm pango, I got:
Error: No such keg: /usr/local/Cellar/pango

What is wrong?


[julia-users] how to move Julia packages from Ubuntu to OSX?

2015-06-13 Thread K leo
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/xxx/.julia/v0.3/Homebrew/deps/usr/lib/libintl.dylib
  - Homebrew Bottles gettext at
/Users/xxx/.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/xxx/.julia/v0.3/Homebrew/deps/usr/lib/libgobject-2.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/xxx/.julia/v0.3/Homebrew/deps/usr/lib/libcairo.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/xxx/.julia/v0.3/Homebrew/deps/usr/lib/libpango-1.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/xxx/.julia/v0.3/Homebrew/deps/usr/lib/libpangocairo-1.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)


On Saturday, June 13, 2015, Elliot Saba staticfl...@gmail.com
javascript:_e(%7B%7D,'cvml','staticfl...@gmail.com'); wrote:

 You need to say using BinDeps first; that will import the package.

 That is pretty strange; let's see what BinDeps has to say.
 -E

 On Sat, Jun 13, 2015 at 4:49 AM, K leo cnbiz...@gmail.com wrote:

 hi Elliot,

 Thanks for the detailed message.

 Strangely, when I did BinDeps.debug(Cairo), I got:
 ERROR: BinDeps not defined.

 Also strangely, when I did 'brew rm pango, I got:
 Error: No such keg: /usr/local/Cellar/pango

 What is wrong?





[julia-users] how to move Julia packages from Ubuntu to OSX?

2015-06-12 Thread K leo
I just installed Julia on a MacBook Pro running OSX 10.0.3 (I am new to
OSX).  Installed Julia in the Applications folder.  But for the packages
that I have been using on Ubuntu, I copied the whole directory ~/.julia
from Ubuntu to the Mac.  Then I did a Pkg.build() in Julia.  Things seem OK
except for a problem with no font on plots, - I got a warning  message
pango-warning failed to choose a font.  I searched and followed this link
https://github.com/JuliaLang/Cairo.jl/issues/46 trying to reinstall
pango but it didn't help.

So I guess perhaps my way of moving the packages is wrong.  Or is it?  What
is a proper way to do it given that I have quite many packages.


Re: [julia-users] how to move Julia packages from Ubuntu to OSX?

2015-06-12 Thread Elliot Saba
I didn't get a screen capture, but I can guess at the problem.  This is
actually most likely not a Julia problem, but an issue with the system-wide
Homebrew packages you have installed outside of Julia.

When you call `using Winston`, the julia package Cairo.jl is loaded as
well.  Cairo.jl looks for libraries on your computer in a few well-defined
places, and because one of those places is /usr/local/lib, the
cairo/pango/fontconfig/freetype etc... libraries that the Cairo.jl package
relies on get picked up if they're sitting in that folder.  If all the
libraries that Cairo.jl needs to load are loadable from /usr/local/lib,
then it won't attempt to install them inside of ~/.julia/v0.3/, and will
instead use the ones from your system-wide Homebrew installation.

The reason I think you are using the system-wide Homebrew installation is
because I see the path
/usr/local/Cellar/pango/1.36.8/lib/pango/1.8.0/modules/pango-basic-coretext.so
in
your message above.  This is a path from system-wide Homebrew, not from the
Homebrew.jl package in Julia.  A good way to check where your cairo
libraries are coming from is to use BinDeps.debug(Cairo):

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:
  - Homebrew Bottles gettext at
/Users/sabae/.julia/v0.3/Homebrew/deps/usr/lib/libintl.dylib
  - Homebrew Bottles gettext at
/Users/sabae/.julia/v0.3/Homebrew/deps/usr/lib/libgettextpo.dylib
  - System Paths at /usr/local/lib/libintl.8.dylib
  - System Paths at
/usr/local/Cellar/gettext/0.19.4/lib/libgettextpo.0.dylib


The output goes on, check out this gist
https://gist.github.com/staticfloat/45a9d47a63932cd697c2 if you're
interested in the full output.  The output mentions a library group,
these are all the libraries that Cairo is interested in.  They are grouped
together so that they all come from the same place (e.g. if you have 3/4 of
the libraries already installed in your SystemPaths, but are missing 1/4,
BinDeps will not install the 1/4 in ~/.julia/v0.3/ It will install ALL
of them, because it's often very important for libraries to all be
installed together).

My output shows that the Library Group cairo is satisfied by
SystemPaths, which basically means that the libraries are going to be
pulled from /usr/local/lib.  You'll note some of the individual libraries
are satisfied by Homebrew Bottles which is referring to Homebrew.jl, but
not all of them, and since all of them are satisfied by SystemPaths, those
are the paths that will be chosen to be loaded when the time comes.


I mention all of this so that you can diagnose which libraries are being
loaded, and if the system-wide Homebrew libraries are truly the ones being
loaded, you know you have a problem with your system-wide Homebrew pango
installation.  One way to possibly fix this would be to brew rm pango; brew
install pango, however I wonder why your pango installation is screwed up
to begin with.  One thing I would ask of you is to show the output of the
BinDeps.debug(Cairo) call, so we can be sure of what's actually being
loaded.
-E

On Fri, Jun 12, 2015 at 3:38 PM, K leo cnbiz...@gmail.com wrote:

 Thanks.  That is very simple.  But I still have the font problem on plot.
 A screen capture is attached to show the problem.  Messages below are from
 the terminal.

 --
 $ julia
_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org
_ _   _| |_  __ _   |  Type help() for help.
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.9 (2015-05-30 11:24 UTC)
  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
 |__/   |  x86_64-apple-darwin13.4.0

 julia using Winston
 Warning: could not import Base.Text into Tk

 julia plot(1:3)

 (process:470): Pango-WARNING **:
 dlopen(/usr/local/Cellar/pango/1.36.8/lib/pango/1.8.0/modules/pango-basic-coretext.so,
 2): image not found

 (process:470): Pango-WARNING **: failed to choose a font, expect ugly
 output. engine-type='PangoRenderCoreText', script='common'


 On Saturday, June 13, 2015, Peter Simon psimon0...@gmail.com wrote:

 If the user has a large number of packages installed on the old system,
 how about doing a Pkg.init(), followed by copying over only the REQUIRE
 file from ~/.julia/v0.x/ and then doing a Pkg.update()?  This could save
 some typing.

 --Peter