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