Coder Social home page Coder Social logo

cairo.jl's Introduction

Build Status codecov

Bindings to the Cairo graphics library

Adaptation to Cairo, a 2D graphics library with support for multiple output devices.

Some of the functions implemented by this wrapper may be documented in Graphics.jl.

There is an extensive set of examples.

cairo.jl's People

Contributors

andrewcooke avatar ararslan avatar bjarthur avatar catawbasam avatar colbec avatar cormullion avatar davidanthoff avatar daviehh avatar dcjones avatar femtocleaner[bot] avatar giordano avatar ihnorton avatar jakebolewski avatar jeffbezanson avatar keno avatar kimikage avatar kmsquire avatar lobingera avatar luchr avatar nolta avatar pao avatar rsrock avatar staticfloat avatar stefankarpinski avatar stevengj avatar timholy avatar tkelman avatar tknopp avatar vtjnash avatar yuyichao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cairo.jl's Issues

symbol could not be found pango_cairo_create_layout

I submitted this as a Winston issue, but I realize it might be a Cairo issue given Jeff's recent removal of the use of OpenLib.

JuliaGraphics/Winston.jl#4

Winston was working great about a week ago. Now I'm getting the following:

julia> require("Winston")

julia> using Winston

julia> x = [-pi:0.2:pi];

julia> y = sin(x);

julia> p = FramedPlot()

julia> add(p, Curve(x, y));

julia> file(p, "winston.eps")
symbol could not be found pango_cairo_create_layout (-1): julia/jul/julia: undefined symbol: pango_cairo_create_layout
in CairoContext: ccall: null function pointer
 in CairoContext at /home/tshort/.julia/Cairo/src/Cairo.jl:197
 in CairoRenderer at /home/tshort/.julia/Cairo/src/Cairo.jl:463
 in EPSRenderer at /home/tshort/.julia/Cairo/src/Cairo.jl:509
 in write_eps at /home/tshort/.julia/Winston/src/Winston.jl:2476
 in file at /home/tshort/.julia/Winston/src/Winston.jl:2496

Ubuntu 12.04
Julia deb6ee8226 (2012-11-29 13:14:14)

Self-documentation: refactor enums?

Pipe dream: it would be nice to have

require("CairoConstants")
CairoConstants.format.rgb24 # -> 1
show(CairoConstants.format) # List all names, alphabetically.

It could be implemented as descendants of an abstract CConst/CEnum type (for the show() implementation), built with a macro that takes a name, an offset and an array of symbols (with nothing for holes) as parameters. A variation could take Dict with symbols as keys.

Once immutable types are implemented, this should be as efficient as traditional const values.

Pkg.add("cairo") fails on Mac

I had to delete Winston but when I tried to add it again I got the following error building Cairo.

I did the following first :
Pkg.rm("Cairo")
Pkg.update()
using Homebrew
Homebrew.rm("Cairo")
Homebrew.rm("pango")

julia> Pkg.add("Cairo")
INFO: Installing Cairo v0.2.8
INFO: Building Homebrew
From https://github.com/staticfloat/homebrew

  • branch kegpkg -> FETCH_HEAD
    HEAD is now at 3536d6f Quash warning about Fink/Macports
    From https://github.com/staticfloat/homebrew-juliadeps
  • branch master -> FETCH_HEAD
    HEAD is now at 3f3f27d Don't need the postinstall anymore!
    INFO: Building Cairo
    ================================[ ERROR: Cairo ]================================

Provider PackageManager failed to satisfy dependency gobject
at /Users/fulford/.julia/Cairo/deps/build.jl:134

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

WARNING: Cairo had build errors.

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

INFO: REQUIRE updated.

other potentilly useful information, output of versioninfo() and ENV
versioninfo()
Julia Version 0.2.0-rc1+99
Commit e296198* 2013-10-22 12:21:10 UTC
Platform Info:
System: Darwin (x86_64-apple-darwin12.5.0)
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm

julia> ENV
TERM_PROGRAM=Apple_Terminal
PIP_REQUIRE_VIRTUALENV=FALSE
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/6h/b_zdwmc55nv2c1pvkk0kr0mct1dbxq/T/
Apple_PubSub_Socket_Render=/tmp/launch-KhH66I/Render
TERM_PROGRAM_VERSION=309
OLDPWD=/Users/fulford/julia
TERM_SESSION_ID=3DF469DE-270E-4DC8-9744-684FA98B21D1
USER=fulford
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-NngaVp/Listeners
__CF_USER_TEXT_ENCODING=0x3416AFB7:0:0
Apple_Ubiquity_Message=/tmp/launch-mJN51X/Apple_Ubiquity_Message
PATH=/Users/fulford/.julia/Homebrew/deps/usr/bin:/Users/fulford/.julia/Homebrew/deps/usr/sbin:/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin
PWD=/Users/fulford
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-IEchZT/unix_domain_listener
LANG=en_AU.UTF-8
SHLVL=1
HOME=/Users/fulford
PYTHONPATH=/usr/local/lib/python2.7/site-packages:
LOGNAME=fulford
PKG_CONFIG=/usr/local/bin/
LDLIBRARY=/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
DISPLAY=/tmp/launch-TTZU8n/org.macosforge.xquartz:0
PYTHONFRAMEWORKPREFIX=/usr/local/Cellar/python/2.7.5/Frameworks/Python.Frameworks
_=./julia/julia
LINES=24
COLUMNS=80
HOMEBREW_CACHE=/Users/fulford/Library/Caches/Homebrew.jl/

Fonts appear as squares and pango issue in Winston

Hi -

I trying to install Winston in a Mac and it works well but I always have a pango error and fonts appear as squares.

I reinstalled, Winston, Julia and even the MacOS ... but no way ... any help will be very welcomed !!!!

Thanks a lot !!!!

Esteve Almirall
[email protected]

julia> using Winston
Warning: Possible conflict in library symbol dtrtri_
Warning: Possible conflict in library symbol dgetri_
Warning: Possible conflict in library symbol dgetrf_

julia> plot(1:4,1:4)

(process:798): Pango-CRITICAL **: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
  '/usr/local/Cellar/pango/1.36.1/etc/pango/pango.modules'
You should create this file by running:
  pango-querymodules > '/usr/local/Cellar/pango/1.36.1/etc/pango/pango.modules'

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

A way to force building from source

Would it be possible to have some way of forcing Julia to always build from source? E.g. if a binary distribution is "broken" somehow, or (in my case) if you want to build a standalone distribution on a machine that happens to have a compatible cairo library already?

Ever since the improvements from the last few days have been applied, Julia finds my Tk and Cairo installations in /usr/local/opt/. This means that my OSX nightlies are junk now, unfortunately. Could we add in e.g. an environment variable such as JULIA_ALWAYS_COMPILE_PKG or something? (This is inspired by brew's HOMEBREW_BUILD_FROM_SOURCE)

Looking for build script in current directory

I was trying to run a julia script from the JULIA_HOME/doc directory

Avik-Senguptas-MacBook-Air:doc aviks$ ../julia listpkg.jl 
.
.
MESSAGE: Upgrading Cairo: v0.0.0 => v0.0.0
MESSAGE: Running build script for package Cairo
ERROR: could not open file /Users/aviks/dev/julia/doc/build.jl
 in include_from_node1 at loading.jl:76
 in anonymous at no file:206
 in cd at file.jl:26
 in runbuildscript at pkg.jl:203
 in _resolve at pkg.jl:248
 in anonymous at no file:488
 in cd at file.jl:26
 in cd_pkgdir at pkg.jl:34
 in gen_listpkg at /Users/aviks/dev/julia/doc/listpkg.jl:15
 in include_from_node1 at loading.jl:76
 in process_options at client.jl:255
 in _start at client.jl:318
at /Users/aviks/dev/julia/doc/listpkg.jl:451

Is this a PKG bug instead?

Forgot to call g_type_init()

I'm having trouble loading a cairo context on Mac OS X, with Cairo 0.2.13. Here's an example session.

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _  |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3661 (2014-06-13 16:12 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 5a6b483* (0 days old master)
|__/                   |  x86_64-apple-darwin13.2.0

julia> using Cairo

julia> c = CairoRGBSurface(256,256);

julia> cr = CairoContext(c);

(process:6802): GLib-GObject-CRITICAL **: /Users/jm843/.julia/Cairo/deps/src/glib-2.34.3/gobject/gtype.c:2720: You forgot to call g_type_init()

(process:6802): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(process:6802): GLib-GObject-CRITICAL **: /Users/jm843/.julia/Cairo/deps/src/glib-2.34.3/gobject/gtype.c:2720: You forgot to call g_type_init()

(process:6802): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(process:6802): GLib-GObject-CRITICAL **: /Users/jm843/.julia/Cairo/deps/src/glib-2.34.3/gobject/gtype.c:2720: You forgot to call g_type_init()

(process:6802): GLib-GObject-CRITICAL **: /Users/jm843/.julia/Cairo/deps/src/glib-2.34.3/gobject/gtype.c:2720: You forgot to call g_type_init()

Please add a license file

I have no doubt that this is free software, but please add a LICENSE.md file to make that explicit.

Merge kf/winmac branch

Once the kf/winmac branch is merged in Cairo.jl and Tk.jl, we can update the Mac binaries on the website.

Cairo doesn't build on Windows

I consistently get the following:

Version 0.2.0-prerelease+4069
Commit a963262 2013-10-15 00:36:01 UTC
x86_64-w64-mingw32

julia> Pkg.build("Cairo")
INFO: Building Cairo
INFO: Updating RPMmd package list
INFO: Downloading http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory//repodata/repomd.xml
INFO: Downloading http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Factory//repodata/repomd.xml
INFO: Multiple package candidates found for glib2, picking newest.
WARNING: max(x) is deprecated, use maximum(x) instead.
=============[ ERROR: Cairo ]=====================

max: ordering is not well-defined for arrays
at C:\Users\Kees.julia\Cairo\deps\build.jl:134

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

WARNING: Cairo had build errors.

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

julia>

dependency on deps/deps.jl (versioning)?

Hello colleagues,

i might get something completely wrong, but

  • Cairo installed via Pkg.add works, contains a include ../deps/deps.lj in Cairo.jl and this file is present in the deps folder of the package
  • Cairo pulled from github master, misses the file; this is already visible by browsing github with a browser. More strange, browsing the history of the deps folder does not bring up the file.

But maybe i just don't understand git...

Wishing a happy day (and a Happy New Year),
Andreas

Cleanup/refactoring proposal

Now that I know Cairo may be fast enough for our needs (see recent julia-users discussion), I'm more motivated to clean this up. I want to know who besides Winston and ImageView might be affected by this. @dcjones, are you using Cairo in Gadfly? Anyone else?

Names

To me, names here seem to be somewhat of a mess, presumably because much of this was written before we had modules. So some proposals:

  • Non-exported functions like cairo_write_to_ios_callback should lose the cairo_ in front of them. We'll access them via Cairo.write_to_ios_callback.
  • Constants are currently exported and are named things like CAIRO_FILTER_FAST. I propose to make them non-exported and have them be called Cairo.FILTER_FAST.
  • Now that methods prints argument names, we should use more informative argument names than set_source_rgb(ctx::CairoContext, d0::Real, d1::Real, d2::Real). Unfortunately, fixing this is painful and carries a big risk of introducing bugs.

Exported types like CairoSVGSurface will keep the Cairo in front of them.

API

  • CairoImageSurface is a mess. This is mostly my fault; I didn't like the automatic taking of a transpose in the original version, so I added many intermediate ways of accessing this function. I propose we move the transpose operation into Winston (which I believe motivated the original design) and then provide a cleaner API here.
  • image() needs to be generalized to allow explicit control of the pattern setting.
  • The text rendering code seems to assume you want to interpret everything as LaTeX. I haven't played with text enough yet to have any other comments about it.
  • I suspect that for performance we're going to want some control over the antialiasing settings. At a low level I've already gotten this implemented locally (it's easy). The bigger question is whether we want to allow control over this to be passed up to a higher level, and if so how to do it.
  • I'm unclear on why cairo_write_to_ios_callback needs to be a different function from cairo_write_to_stream_callback. Presumably this is justified, but if someone can explain it to me...

Tests

  • I have no idea how we should implement tests, but I suspect we need some. Presumably there should be two groups: automated and visual. Or perhaps we could automate everything by writing results to files and doing a byte-for-byte comparison against stored template files?

Documentation

  • Currently the blog is the best we have, but an API reference could be useful.

Dependency on zlib dev files

Compilation (from source) of Cairo requires the development headers, etc... from zlib, which are also needed for source compilation of Julia, but if a user installs the Julia binaries, the zlib1g-dev package is not necessarily installed, leading to a Cairo compilation error. Can zlib be added as a dependency for Cairo? Should this issue be put in bindeps.jl?

[PkgEval] Cairo may have a testing issue on Julia 0.3 (2014-08-16)

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.3) and the nightly build of the unstable version (0.4). The results of this script are used to generate a package listing enhanced with testing results.

On Julia 0.3

  • On 2014-08-15 the testing status was Tests pass.
  • On 2014-08-16 the testing status changed to Package doesn't load.

Tests pass. means that PackageEvaluator found the tests for your package, executed them, and they all passed.

Package doesn't load. means that PackageEvaluator did not find tests for your package. Additionally, trying to load your package with using failed.

This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.

Test log:

>>> 'Pkg.add("Cairo")' log
make  install-recursive
make[1]: Entering directory '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo'
Making install in src
make[2]: Entering directory '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo/src'
make  install-am
make[3]: Entering directory '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo/src'
make[4]: Entering directory '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo/src'
 /usr/bin/mkdir -p '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/include/cairo'
 /usr/bin/mkdir -p '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib/pkgconfig'
 /usr/bin/mkdir -p '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib'
 /usr/bin/mkdir -p '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/include/cairo'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libcairo.la '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib'
 /usr/bin/install -c -m 644 cairo.pc cairo-xlib.pc cairo-xlib-xrender.pc cairo-xcb.pc cairo-xcb-shm.pc cairo-png.pc cairo-script.pc cairo-ft.pc cairo-fc.pc cairo-ps.pc cairo-pdf.pc cairo-svg.pc cairo-gobject.pc '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib/pkgconfig'
 /usr/bin/install -c -m 644 cairo-features.h '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/include/cairo'
 /usr/bin/install -c -m 644 /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-deprecated.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-xlib.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-xlib-xrender.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-xcb.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-script.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-ft.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-ps.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-pdf.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/src/cairo-svg.h /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16/cairo-version.h '/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/include/cairo'
libtool: install: /usr/bin/install -c .libs/libcairo.so.2.11200.16 /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib/libcairo.so.2.11200.16
libtool: install: (cd /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib && { ln -s -f libcairo.so.2.11200.16 libcairo.so.2 || { rm -f libcairo.so.2 && ln -s libcairo.so.2.11200.16 libcairo.so.2; }; })
libtool: install: (cd /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib && { ln -s -f libcairo.so.2.11200.16 libcairo.so || { rm -f libcairo.so && ln -s libcairo.so.2.11200.16 libcairo.so; }; })
libtool: install: /usr/bin/install -c .libs/libcairo.lai /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib/libcairo.la
libtool: install: /usr/bin/install -c .libs/libcairo.a /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib/libcairo.a
... truncated ...
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src
INFO: Directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps
INFO: Directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16
INFO: Directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/src/cairo-1.12.16 already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo
INFO: Directory /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo already created
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/builds/cairo
================================[ ERROR: Cairo ]================================

failed process: Process(setenv(`make -j8 install`,Union(UTF8String,ASCIIString)["PATH=/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/bin:/usr/bin:/bin:/home/idunning/julia03","PWD=/home/idunning/PackageEvaluator.jl/extra/stable","JULIA_PKGDIR=/home/idunning/pkgtest/.julia","PKGEVALEXTRA=/home/idunning/PackageEvaluator.jl/extra","SHELL=/bin/sh","OPENBLAS_NUM_THREADS=8","CPPFLAGS= -I/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/include","PKGTEST_DIR=/home/idunning/pkgtest","LANG=en_US.UTF-8","ORIGPATH=/usr/bin:/bin","STABLE_DIR=/home/idunning/julia03","SHLVL=2","LOGNAME=idunning","LDFLAGS= -L/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib -Wl,-rpath -Wl,/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib","OLDPWD=/home/idunning/PackageEvaluator.jl/extra","PKG_CONFIG_PATH=/home/idunning/pkgtest/.julia/v0.3/Cairo/deps/usr/lib/pkgconfig","_=/home/idunning/julia03/julia","TESTHOME=/home/idunning","USER=idunning","NIGHTLY_DIR=/home/idunning/julia04","HOME=/home/idunning","JAVA_HOME=/usr/lib/jvm/java-7-openjdk/"]), ProcessExited(2)) [2]
while loading /home/idunning/pkgtest/.julia/v0.3/Cairo/deps/build.jl, in expression starting on line 136

================================================================================

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

WARNING: Cairo had build errors.

 - packages with build errors remain installed in /home/idunning/pkgtest/.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

================================================================================
INFO: Package database updated
INFO: METADATA is out-of-date a you may not have the latest version of Cairo
INFO: Use `Pkg.update()` to get the latest versions of your packages

>>> 'using Cairo' log
ERROR: could not open file /home/idunning/pkgtest/.julia/v0.3/Cairo/src/../deps/deps.jl
 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
 in process_options at ./client.jl:285
 in _start at ./client.jl:354
 in _start_3B_1699 at /home/idunning/julia03/usr/bin/../lib/julia/sys.so
while loading /home/idunning/pkgtest/.julia/v0.3/Cairo/src/Cairo.jl, in expression starting on line 3
while loading /home/idunning/pkgtest/.julia/v0.3/Cairo/testusing.jl, in expression starting on line 1


>>> test log
no tests to run
>>> end of log

ERROR: no method convert(Type{Ptr{Int8}},ASCIIString)

Doing a Pkg.update() raised the following error.
After deleteting the $HOME/.julia directory and installing Gadfly with Pkg.add("Gadfly"), I have :

ERROR: no method convert(Type{Ptr{Int8}},ASCIIString)
  in find_library at /home/john/.julia/BinDeps/src/BinDeps.jl:32
  in include_from_node1 at loading.jl:92
  in anonymous at no file:249
  in cd at file.jl:26
  in runbuildscript at pkg.jl:246
  in _resolve at pkg.jl:361
  in anonymous at no file:163
  in cd at file.jl:26
  in cd_pkgdir at pkg.jl:42
  in add at pkg.jl:143
  in add at pkg.jl:175
  at /home/john/.julia/Cairo/deps/build.jl:89

Pkg.add("Winston") fails on OSX 10.7.5

Hi,

I can't get Winston to install because Cairo won't build.
Cairo won't build because of some problem with gettext.

Following up some leads from #43 I include a command history below.

The nub of the thing seems to be that libintl isn't found when attempting to load libgettext.

I'd be grateful for any help you can give.

Thanks,
Rolf

julia> versioninfo()
Julia Version 0.2.0
Commit 05c6461 (2013-11-16 23:44 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin12.5.0)
  WORD_SIZE: 64
  BLAS: libgfortblas
  LAPACK: liblapack
  LIBM: libopenlibm

julia> Pkg.build("Cairo")
INFO: Building Homebrew
HEAD is now at c588ffb Remove git rebasing code that slipped through
HEAD is now at 0854801 Reintroduce freetype and libpng formulae as they're keg-only pre-mountain lion
INFO: Building Cairo
================================[ ERROR: Cairo ]================================

Provider PackageManager failed to satisfy dependency gettext
at /Users/rolfbanting/.julia/Cairo/deps/build.jl:130

================================================================================

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

WARNING: Cairo had build errors.

 - packages with build errors remain installed in /Users/rolfbanting/.julia
 - build a package and all its dependencies with `Pkg.build(pkg)`
 - build a single package by running its `deps/build.jl` script

================================================================================


julia> using Homebrew



julia> run(`otool -L $(joinpath(Homebrew.brew_prefix,"lib","libgettextlib.dylib"))`)
/Users/rolfbanting/.julia/Homebrew/deps/usr/lib/libgettextlib.dylib:
    @@HOMEBREW_PREFIX@@/lib/libgettextlib-0.18.3.dylib (compatibility version 0.0.0, current version 0.0.0)
    @@HOMEBREW_CELLAR@@/gettext/0.18.3.2/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
    /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.8.0)
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.19.0)



julia> dlopen( joinpath(Homebrew.brew_prefix,"lib","libgettextlib"))
ErrorException("could not load module /Users/rolfbanting/.julia/Homebrew/deps/usr/lib/libgettextlib: dlopen(/Users/rolfbanting/.julia/Homebrew/deps/usr/lib/libgettextlib.dylib, 1): Library not loaded: @@HOMEBREW_CELLAR@@/gettext/0.18.3.2/lib/libintl.8.dylib\n  Referenced from: /Users/rolfbanting/.julia/Homebrew/deps/usr/lib/libgettextlib.dylib\n  Reason: image not found")


julia> dlopen( joinpath(Homebrew.brew_prefix,"lib","libintl"))
Ptr{Void} @0x0000000114ab3d00


julia> Homebrew.brew_prefix
"/Users/rolfbanting/.julia/Homebrew/deps/usr"

julia> @@HOMEBREW_CELLAR@@

Installation failure on Windows

This is on latest master, on Windows (both 32 and 64), after completely removing the AppData julia directory.

julia> Pkg.add("Cairo")
INFO: Initializing package repository C:\Users\isaiah\AppData\Roaming\Julia\pack
ages
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
INFO: Cloning cache of Cairo from git://github.com/JuliaLang/Cairo.jl.git
INFO: Cloning cache of BinDeps from git://github.com/loladiro/BinDeps.jl.git
INFO: Cloning cache of Color from git://github.com/JuliaLang/Color.jl.git
INFO: Cloning cache of URIParser from git://github.com/loladiro/URIParser.jl.git

INFO: Installing Cairo v0.2.8
INFO: Installing BinDeps v0.2.9
INFO: Installing Color v0.2.6
INFO: Installing URIParser v0.0.0
INFO: Running build script for package Cairo
INFO: Cloning cache of RPMmd from https://github.com/JuliaLang/RPMmd.jl.git
INFO: Cloning cache of HTTPClient from git://github.com/amitmurthy/HTTPClient.jl
.git
INFO: Cloning cache of LibCURL from git://github.com/amitmurthy/LibCURL.jl.git
INFO: Cloning cache of LibExpat from git://github.com/amitmurthy/LibExpat.jl.git

INFO: Cloning cache of URLParse from git://github.com/tanmaykm/URLParse.jl.git
INFO: Cloning cache of Zlib from git://github.com/dcjones/Zlib.jl.git
INFO: Installing RPMmd v0.0.6
INFO: Installing HTTPClient v0.0.0
INFO: Installing LibCURL v0.0.0
INFO: Installing LibExpat v0.0.0
INFO: Installing URLParse v0.0.0
INFO: Installing Zlib v0.1.3
INFO: Removing Cairo v0.2.8
mv: cannot move `Cairo' to `.trash/Cairo'
INFO: Rolling back install of Zlib
INFO: Rolling back install of URLParse
INFO: Rolling back install of LibExpat
INFO: Rolling back install of LibCURL
INFO: Rolling back install of HTTPClient
INFO: Rolling back install of RPMmd
WARNING: An exception occured while building binary dependencies.
You may have to take manual steps to complete the installation, see the error me
ssage below.
To reattempt the installation, run Pkg.fixup("Cairo").

ERROR: failed process: Process(`mv Cairo .trash/`, ProcessExited(1)) [1]
at C:\Users\isaiah\AppData\Roaming\Julia\packages\Cairo\deps\build.jl:21

On Windows, this line tries to run Pkg.add() to install RPMmd from within another Pkg process. @StefanKarpinski have the recent Pkg changes blocked this behavior? Unfortunately that is the extent of the backtrace above, even on 32 bit.

File ["libffi.dylib"] was not created successfully

I wiped out .julia and use Pkg2 to reinstall packages today, on Mac OS X 10.8.4. The installation of Cairo failed.

Following is the message:

.....
/bin/sh ./libtool --tag=CC   --mode=link gcc -g  -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -mpentiumpro -Wall -fexceptions -version-info `grep -v '^#' /Users/dhlin/.julia/Cairo/deps/src/libffi-3.0.11/libtool-version`   -L/Users/dhlin/.julia/Cairo/deps/usr/lib -Wl,-rpath -Wl,/Users/dhlin/.julia/Cairo/deps/usr/lib -o libffi.la -rpath /Users/dhlin/.julia/Cairo/deps/usr/lib src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo       src/x86/ffi.lo src/x86/darwin.lo src/x86/ffi64.lo src/x86/darwin64.lo                       
/bin/sh ./libtool --tag=CC   --mode=link gcc -g  -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -mpentiumpro -Wall -fexceptions  -L/Users/dhlin/.julia/Cairo/deps/usr/lib -Wl,-rpath -Wl,/Users/dhlin/.julia/Cairo/deps/usr/lib -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo       src/x86/ffi.lo src/x86/darwin.lo src/x86/ffi64.lo src/x86/darwin64.lo                       
libtool: link: ar cru .libs/libffi_convenience.a src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/darwin.o src/x86/.libs/ffi64.o src/x86/.libs/darwin64.o 
/usr/bin/ranlib: file: .libs/libffi_convenience.a(ffi.o) has no symbols
/usr/bin/ranlib: file: .libs/libffi_convenience.a(darwin.o) has no symbols
libtool: link: ranlib .libs/libffi_convenience.a
libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libffi.6.dylib  src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/darwin.o src/x86/.libs/ffi64.o src/x86/.libs/darwin64.o   -L/Users/dhlin/.julia/Cairo/deps/usr/lib  -O3 -mpentiumpro -Wl,-rpath -Wl,/Users/dhlin/.julia/Cairo/deps/usr/lib   -install_name  /Users/dhlin/.julia/Cairo/deps/usr/lib/libffi.6.dylib -compatibility_version 7 -current_version 7.0 
ranlib: file: .libs/libffi_convenience.a(ffi.o) has no symbols
ranlib: file: .libs/libffi_convenience.a(darwin.o) has no symbols
libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../libffi_convenience.la" "libffi_convenience.la" )
ld: warning: directory not found for option '-L/Users/dhlin/.julia/Cairo/deps/usr/lib'
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
libtool: link: dsymutil .libs/libffi.6.dylib || :
libtool: link: (cd ".libs" && rm -f "libffi.dylib" && ln -s "libffi.6.dylib" "libffi.dylib")
libtool: link: ar cru .libs/libffi.a  src/prep_cif.o src/types.o src/raw_api.o src/java_raw_api.o src/closures.o src/x86/ffi.o src/x86/darwin.o src/x86/ffi64.o src/x86/darwin64.o
/usr/bin/ranlib: file: .libs/libffi.a(ffi.o) has no symbols
/usr/bin/ranlib: file: .libs/libffi.a(darwin.o) has no symbols
libtool: link: ranlib .libs/libffi.a
ranlib: file: .libs/libffi.a(ffi.o) has no symbols
ranlib: file: .libs/libffi.a(darwin.o) has no symbols
libtool: link: ( cd ".libs" && rm -f "libffi.la" && ln -s "../libffi.la" "libffi.la" )
WARNING: An exception occured while building binary dependencies.
You may have to take manual steps to complete the installation, see the error message below.
To reattempt the installation, run Pkg.fixup("Cairo").

 in runbuildscript at pkg2.jl:249
ERROR: File ["libffi.dylib"] was not created successfully (Tried to run SynchronousStepCollection({`make -j8`},"","") )
 in run at /Users/dhlin/.julia/BinDeps/src/BinDeps.jl:407
 in run at /Users/dhlin/.julia/BinDeps/src/BinDeps.jl:431 (repeats 2 times)
 in satisfy! at /Users/dhlin/.julia/BinDeps/src/dependencies.jl:399
 in anonymous at /Users/dhlin/.julia/BinDeps/src/dependencies.jl:413
 in include_from_node1 at loading.jl:92
 in anonymous at no file:252
 in cd at file.jl:25
 in cd at pkg2/dir.jl:28
 in runbuildscript at pkg2.jl:249
 in _fixup at pkg2.jl:305
 in fixup at pkg2.jl:335
 in fixup#g154 at no file
 in fixup#g153 at no file
 in fixup#g152 at no file
 in anonymous at no file:241
 in cd at file.jl:25
 in cd at pkg2/dir.jl:28
 in resolve at pkg2.jl:161
 in resolve at no file (repeats 3 times)
 in anonymous at no file:31
 in cd at file.jl:25
 in cd at pkg2/dir.jl:28
 in edit at pkg2.jl:21
 in add at pkg2.jl:18
at /Users/dhlin/.julia/Cairo/deps/build.jl:115

Expose Line Caps?

Hi. Thanks for this (already got it working, my first day using Julia).

Could you expose line caps? This is very useful because the "normal" way of plotting a point is to choose round line caps and then use a closed path. See http://lists.cairographics.org/archives/cairo/2009-June/017459.html (which is my source of the claim this is normal - I am not a Cairo expert). Currently, without setting caps, the default seems to be rectangular ends (which don't work as points).

Thanks, Andrew

Building Cairo.jl causes BoundsErros()

When trying to build the Cairo package on Windows 8.1 an error results:

julia> Pkg.build("Cairo")
INFO: Building Cairo

WARNING: deprecated syntax "x[i:]" at \Users\admin\.julia\v0.3\Zlib\src\Zlib.jl:177.
Use "x[i:end]" instead.
ERROR: BoundsError()

julia> versioninfo()
Julia Version 0.3.0-prerelease+1400
Commit 6f3a4b6* (2014-02-05 19:14 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm

Yum provides gettext needs gettext-devel as well

At this line in the build deps script, gettext also needs gettext-devel. I had the following error today because of it, and after installing gettext-devel by hand, it fixed the cairo build.

julia> Pkg.build("Cairo")
INFO: Building Cairo
Installing dependency gettext via `sudo yum install gettext`:
Loaded plugins: langpacks, refresh-packagekit
Package gettext-0.18.3.2-1.fc20.x86_64 already installed and latest version
Nothing to do
=================================================================================================[ ERROR: Cairo ]==================================================================================================

Provider PackageManager failed to satisfy dependency gettext
while loading /home/jason/.julia/Cairo/deps/build.jl, in expression starting on line 129

===================================================================================================================================================================================================================

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

WARNING: Cairo had build errors.

 - packages with build errors remain installed in /home/jason/.julia
 - build a package and all its dependencies with `Pkg.build(pkg)`
 - build a single package by running its `deps/build.jl` script

===================================================================================================================================================================================================================

Naming/Extending/Lib version

Hello,
i'll probably do a few more additions to Cairo.jl and constants.jl.

Can we somehow agree on consistent naming (or have something like a proposal in HACKING.md available)?

Afiau the cairo development, literally everything -function calls, constants- is prefixed by cairo_ or CAIRO_. In the julia binding/adaptation this seems to fall in place with having Cairo as the module name and all functions with cairo_ reduced -> cairo_move_to -> Cairo.move_to or exported move_to(CairoContext, x,y).

The 'objects' however, like Surface, Context, Pattern, are named including the CairoX -> Cairo.CairoRGBSurface.

(There is a similar mixture in constants.jl - some related to my commits...).

My propsal: Treat everything like the functions, reduce the cairo_ prefix.

  1. There are already functions in Cairo.jl that are proving functionality that does not exist in cairo: image e.g.
    2b) Someone found it a good idea to change stroke also...

For sure this will have entries in different parts of the API documentation, i'd prefer something like a prefix to make clear, that's not a function of the cairo library.

  1. Actually cairo defines symbols for options/features that are available - with this version of the library.

My propsal, do checks in the code, rather to depend on a certain version.

Broken with Pkg1

I'm not sure how we want to deal with this, but trying to install with Pkg instead of Pkg2 fails when it tries to use URIParser.

Cairo Error on Pkg.update for Julia 0.2.0-277.r73f0

julia> Pkg.update()
remote: Counting objects: 46, done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 38 (delta 8), reused 33 (delta 3)
Unpacking objects: 100% (38/38), done.
From git://github.com/JuliaLang/METADATA.jl
   d2daaf0..9b9072f  master     -> origin/master
Updating d2daaf0..9b9072f
Fast-forward
 Cairo/versions/0.0.0/sha1    |    2 +-
 Gaston/url                   |    1 +
 Gaston/versions/0.0.0/sha1   |    1 +
 TOML/url                     |    1 +
 TOML/versions/0.0.0/requires |    2 ++
 TOML/versions/0.0.0/sha1     |    1 +
 Tk/versions/0.0.0/sha1       |    2 +-
 7 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 Gaston/url
 create mode 100644 Gaston/versions/0.0.0/requires
 create mode 100644 Gaston/versions/0.0.0/sha1
 create mode 100644 TOML/url
 create mode 100644 TOML/versions/0.0.0/requires
 create mode 100644 TOML/versions/0.0.0/sha1
MESSAGE: Upgrading Cairo: v0.0.0 => v0.0.0
MESSAGE: Running build script for package Cairo
WARNING: expr(hd,a...) is deprecated, use Expr(hd,a...) instead.
/home/dzea/.julia/Cairo/deps
MESSAGE: There are multiple options available for installing this dependency:
- skip: Skip Installation - Binaries must be installed manually
- source: Install depdendency from source
Plese select desired method: source                                     
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng15/libpng-1.5.14.tar.gz
MESSAGE: Done downloading file ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng15/libpng-1.5.14.tar.gz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/libpng-1.5.14
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/libpng-1.5.14 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/libpng-1.5.14
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/libpng-1.5.14 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libpng-1.5.14
/home/dzea/.julia/Cairo/deps/src/libpng-1.5.14
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libpng-1.5.14
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libpng-1.5.14
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libpng-1.5.14
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.tar.gz
MESSAGE: Done downloading file http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.tar.gz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/gettext-0.18.2
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/gettext-0.18.2 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/gettext-0.18.2
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/gettext-0.18.2 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/gettext-0.18.2
/home/dzea/.julia/Cairo/deps/src/gettext-0.18.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/gettext-0.18.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/gettext-0.18.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/gettext-0.18.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file http://www.cairographics.org/releases/pixman-0.28.2.tar.gz
MESSAGE: Done downloading file http://www.cairographics.org/releases/pixman-0.28.2.tar.gz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/pixman-0.28.2
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/pixman-0.28.2 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/pixman-0.28.2
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/pixman-0.28.2 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/pixman-0.28.2
/home/dzea/.julia/Cairo/deps/src/pixman-0.28.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/pixman-0.28.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/pixman-0.28.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/pixman-0.28.2
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.gz
MESSAGE: Done downloading file http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.gz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/freetype-2.4.11
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/freetype-2.4.11 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/freetype-2.4.11
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/freetype-2.4.11 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/freetype-2.4.11
/home/dzea/.julia/Cairo/deps/src/freetype-2.4.11
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/freetype-2.4.11
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/freetype-2.4.11
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/freetype-2.4.11
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.2.tar.gz
MESSAGE: Done downloading file http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.2.tar.gz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/fontconfig-2.10.2
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/fontconfig-2.10.2 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/fontconfig-2.10.2
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/fontconfig-2.10.2 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/fontconfig-2.10.2
/home/dzea/.julia/Cairo/deps/src/fontconfig-2.10.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/fontconfig-2.10.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/fontconfig-2.10.2
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/fontconfig-2.10.2
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file http://www.cairographics.org/releases/cairo-1.12.8.tar.xz
MESSAGE: Done downloading file http://www.cairographics.org/releases/cairo-1.12.8.tar.xz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/cairo-1.12.8
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/cairo-1.12.8 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/cairo-1.12.8
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/cairo-1.12.8 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/cairo-1.12.8
/home/dzea/.julia/Cairo/deps/src/cairo-1.12.8
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/cairo-1.12.8
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/cairo-1.12.8
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/cairo-1.12.8
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
MESSAGE: Done downloading file ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/libffi-3.0.11
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/libffi-3.0.11 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/libffi-3.0.11
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/libffi-3.0.11 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libffi-3.0.11
/home/dzea/.julia/Cairo/deps/src/libffi-3.0.11
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libffi-3.0.11
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libffi-3.0.11
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/libffi-3.0.11
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file http://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.3.tar.xz
MESSAGE: Done downloading file http://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.3.tar.xz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/glib-2.34.3
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/glib-2.34.3 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/glib-2.34.3
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/glib-2.34.3 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/glib-2.34.3
/home/dzea/.julia/Cairo/deps/src/glib-2.34.3
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/glib-2.34.3
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/glib-2.34.3
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/glib-2.34.3
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/downloads
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/downloads already created
MESSAGE: Downloading file http://ftp.gnome.org/pub/GNOME/sources/pango/1.32/pango-1.32.6.tar.xz
MESSAGE: Done downloading file http://ftp.gnome.org/pub/GNOME/sources/pango/1.32/pango-1.32.6.tar.xz
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/src/pango-1.32.6
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/src/pango-1.32.6 already created
MESSAGE: Attempting to Create directory /home/dzea/.julia/Cairo/deps/builds/pango-1.32.6
MESSAGE: Directory /home/dzea/.julia/Cairo/deps/builds/pango-1.32.6 already created
test
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/pango-1.32.6
/home/dzea/.julia/Cairo/deps/src/pango-1.32.6
MESSAGE: Changing Directory to /home/dzea/.julia/Cairo/deps/builds/pango-1.32.6
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for native Win32... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for sysconf... yes
checking for getpagesize... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... c++ -E
checking for ld used by c++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the c++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for c++ option to produce PIC... -fPIC -DPIC
checking if c++ PIC flag -fPIC -DPIC works... yes
checking if c++ static flag -static works... yes
checking if c++ supports -c -o file.o... yes
checking if c++ supports -c -o file.o... (cached) yes
checking whether the c++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.lt
config.lt: creating libtool
checking for some Win32 platform... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for HARFBUZZ... no
no
checking for CoreText availability... no
checking for CAIRO... yes
checking which cairo font backends could be used... none
configure: Disabling cairo support
configure: error: *** Could not enable any backends.
*** Must have at least one backend to build Pango.
ERROR: failed process: Process(`/home/dzea/.julia/Cairo/deps/src/pango-1.32.6/configure LDFLAGS=-L/home/dzea/.julia/Cairo/deps/usr/lib CPPFLAGS=-I/home/dzea/.julia/Cairo/deps/usr/include --with-included-modules=yes --prefix=/home/dzea/.julia/Cairo/deps/usr`, ProcessExited(1)) [1]
 in pipeline_error at process.jl:394
 in run at process.jl:384
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:350
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:147
 in run at /home/dzea/.julia/BinDeps/src/BinDeps.jl:376
 in include_from_node1 at loading.jl:89
 in anonymous at no file:219
 in cd at file.jl:26
 in runbuildscript at pkg.jl:216
 in _resolve at pkg.jl:261
 in anonymous at no file:518
 in cd at file.jl:26
 in cd_pkgdir at pkg.jl:34
 in update at pkg.jl:493
at /home/dzea/.julia/Cairo/deps/build.jl:79

Cannot build on Windows (64 bits)

Thanks

Joaquim

Version 0.3.0-prerelease+535 (2013-12-15 13:43 UTC)
master/8e008a9* (fork: 42 commits, 0 days)
x86_64-w64-mingw32
INFO: Downloading http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory//repodata/repomd.xml
Trying to load urlmon...
Trying to load libexpat-1...
================================================================[ ERROR: Cairo ]================================================================


WARNING: backtraces on your platform are often misleading or partially incorrect
error compiling xp_parse: error compiling xp_make_parser: could not load module libexpat-1: %1 is not a valid Win32 application.

while loading C:\j\.julia\Cairo\deps\build.jl, in expression starting on line 129

libpng dependency failing

I'm trying to get Gadfly and/or Winston working. However, when using Pkg.add for either of these packages, I get the prompt for installing dependencies through brew or source. Since the brew option seems to fail at the moment (because of a tk problem), I've tried using the source option. However, that fails with the following error:

ERROR: failed process: Process(`curl -o /Users/oliverpierson/.julia/Cairo/deps/downloads/libpng-1.5.14.tar.gz -L ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng15/libpng-1.5.14.tar.gz`, ProcessExited(78)) [78]
     in error at error.jl:22
     in pipeline_error at process.jl:394
     in run at process.jl:384
     in run at /Users/oliverpierson/.julia/BinDeps/src/BinDeps.jl:376
     in run at /Users/oliverpierson/.julia/BinDeps/src/BinDeps.jl:350
     in run at /Users/oliverpierson/.julia/BinDeps/src/BinDeps.jl:376
     in run at /Users/oliverpierson/.julia/BinDeps/src/BinDeps.jl:376
     in run at /Users/oliverpierson/.julia/BinDeps/src/BinDeps.jl:376
     in run at /Users/oliverpierson/.julia/BinDeps/src/BinDeps.jl:147
     in run at /Users/oliverpierson/.julia/BinDeps/src/BinDeps.jl:376
     in include_from_node1 at loading.jl:92
     in anonymous at no file:249
     in cd at file.jl:26
     in runbuildscript at pkg.jl:246
     in _resolve at pkg.jl:330
     in anonymous at no file:163
     in cd at file.jl:26
     in cd_pkgdir at pkg.jl:42
     in add at pkg.jl:143
     in add at pkg.jl:175
    at /Users/oliverpierson/.julia/Cairo/deps/build.jl:79

When I follow the url for libpng-1.5.14.tar.gz, I find that the only version at that location is libpng-1.5.15. I believe fixing this only involves quick changes to line 45 and 63 of deps/build.jl. I'd happily do it myself, but I'm not all that savvy with the package system at the moment. Sorry.

[pao: triplequotes go on their own lines for fenced blocks]

Installation of pango failed in Mac OS 10.9

I am on OS X 10.9 -- fresh install of everything.

When trying to install Cairo, I saw it shows:

==> Installing pango
==> Downloading http://archive.org/download/julialang/bottles/pango-1.36.0.mavericks.bottle.tar.gz
################################################################################################################################## 100.0%
==> Pouring pango-1.36.0.mavericks.bottle.tar.gz
Warning: pango post_install failed. Rerun with `brew postinstall pango`.
/Users/dhlin/.julia/Homebrew/deps/usr/Cellar/pango/1.36.0: 110 files, 3.7M

Then when I use Winston for plotting I saw the following message probably caused by this failure:

julia> plot(x, sin(x));

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

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

I only saw the curves being plotted, but the text is not properly rendered.

cc: @staticfloat

Use mirrors when sites are down

I can't build from source right now because sourceware.org is down. It would be cool if, when a download failed, some mirrors were tried.

Build script fails on pixman

ERROR: File /home/viral/.julia/Cairo/deps/usr/lib/libpixman-1.0.so was not created successfully (Tried to run SynchronousStepCollection({`make -j8 install`},"","") )
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:352
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:147
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in include_from_node1 at loading.jl:76
 in anonymous at no file:206
 in cd at file.jl:26
 in runbuildscript at pkg.jl:203
 in _resolve at pkg.jl:279
 in anonymous at no file:131
 in cd at file.jl:26
 in cd_pkgdir at pkg.jl:34
 in add at pkg.jl:112
 in add at pkg.jl:138
at /home/viral/.julia/Cairo/deps/build.jl:79

zlib build deps need updating

The new source download is at http://zlib.net/zlib-1.2.8.tar.gz. http://zlib.net/zlib-1.2.7.tar.gz no longer works.

Some issues:

  1. every time zlib updates, the previous download becomes unavailable
  2. this is mostly necessary for Windows, and I'm wondering if it wouldn't be better to use the WinRPM zlib package, since the current BinDeps recipe seems to require building zlib
  3. some windows users of GZip.jl have had success using lib1.dll, although I'm unclear on how well that works on 64-bit systems.

cc:@loladiro

stroke defined by Cairo.jl doesn't scale

Hello,

i guess this is called a feature, but it's not expected looking at plain cairo (e.g. porting c-code to julia).

If i run this:

using Base
using Cairo

using Cairo
c = CairoRGBSurface(256,256);
cr = CairoContext(c);

save(cr);
set_source_rgb(cr,0.8,0.8,0.8); 
paint(cr);
restore(cr);

# unscaled
save(cr);
move_to(cr,20,100);
line_to(cr,236,100);
set_line_width(cr,2.0);
stroke(cr);
restore(cr);
# scaled, julia stroke
save(cr);
scale(cr,10,10);
move_to(cr,2,12);
line_to(cr,23.6,12);
set_line_width(cr,2.0);
stroke(cr);
restore(cr);
# scaled, cairo stroke
save(cr);
scale(cr,10,10);
move_to(cr,2,14);
line_to(cr,23.6,14);
set_line_width(cr,2.0);
ccall((:cairo_stroke,Cairo._jl_libcairo),Void, (Ptr{Void},), cr.ptr)
restore(cr);

## mark picture with current date
move_to(cr,0.0,12.0);
set_source_rgb (cr, 0,0,0);
show_text(cr,strftime(time()));
write_to_png(c,"stroke_test.png");

stroke_test

i get the first two lines with a width of 2.0, but the third with the scaling applied.

Difficulties in installing Cairo

I wiped out .julia and use Pkg2 to reinstall the packages on a Mac OS X machine.

The installation of Cairo just become a completely frustrating mess. I did Pkg2.add("Cairo"), it then automatically choose to build from source.

After building libffi, it complains:

 in runbuildscript at pkg2.jl:249
ERROR: File ["libffi.dylib"] was not created successfully (Tried to run SynchronousStepCollection({`make -j8`},"","") )
 in run at /Users/dhlin/.julia/BinDeps/src/BinDeps.jl:407
 in run at /Users/dhlin/.julia/BinDeps/src/BinDeps.jl:431 (repeats 2 times)
 in satisfy! at /Users/dhlin/.julia/BinDeps/src/dependencies.jl:399
 in anonymous at /Users/dhlin/.julia/BinDeps/src/dependencies.jl:413
 in include_from_node1 at loading.jl:92
 in anonymous at no file:252
 in cd at file.jl:25
 in cd at pkg2/dir.jl:28
 in runbuildscript at pkg2.jl:249
 in _fixup at pkg2.jl:305
 in fixup at pkg2.jl:335
 in fixup#g154 at no file
 in fixup#g153 at no file
 in fixup#g152 at no file
 in anonymous at no file:241
 in cd at file.jl:25
 in cd at pkg2/dir.jl:28
 in resolve at pkg2.jl:161
 in resolve at no file (repeats 3 times)
 in anonymous at no file:31
 in cd at file.jl:25
 in cd at pkg2/dir.jl:28
 in edit at pkg2.jl:21
 in add at pkg2.jl:18
at /Users/dhlin/.julia/Cairo/deps/build.jl:115

Then I inspect the dependency build directory:

cd ~/.julia/Cairo/deps/builds/ffi

ls -l
total 1080
-rw-r--r--   1 dhlin  staff   68394 Aug 16 06:55 Makefile
-rw-r--r--   1 dhlin  staff   55184 Aug 16 06:55 config.log
-rwxr-xr-x   1 dhlin  staff   74995 Aug 16 06:55 config.status
-rw-r--r--   1 dhlin  staff    5911 Aug 16 06:55 fficonfig.h
drwxr-xr-x   5 dhlin  staff     170 Aug 16 06:55 include
-rw-r--r--   1 dhlin  staff     966 Aug 16 06:55 libffi.la
-rw-r--r--   1 dhlin  staff     271 Aug 16 06:55 libffi.pc
-rw-r--r--   1 dhlin  staff     920 Aug 16 06:55 libffi_convenience.la
-rwxr-xr-x   1 dhlin  staff  292907 Aug 16 06:55 libtool
drwxr-xr-x   3 dhlin  staff     102 Aug 16 06:55 man
drwxr-xr-x  32 dhlin  staff    1088 Aug 16 06:55 src
-rw-r--r--   1 dhlin  staff      26 Aug 16 06:55 stamp-h1
drwxr-xr-x   3 dhlin  staff     102 Aug 16 06:55 testsuite

Only see libffi.la but no libffi.dylib

Later I found that it is in a hidden subdirectory .lib, and I have to manually copy it out:

cp .libs/libffi.6.dylib .
ln -s libffi.6.dylib libffi.dylib

Come back to Julia, and run Pkg2.fixup("Cairo"). After it takes some time to build glib, it complained again:

 in runbuildscript at pkg2.jl:249
ERROR: File ["libgobject-2.0-0.dylib","libgobject-2.0.dylib"] was not created successfully (Tried to run SynchronousStepCollection({`make -j8`},"","") )
....

Again, I have to manually copy the shared libraries:

cp ./gobject/.libs/libgobject-2.0.0.dylib .
ln -s libgobject-2.0.0.dylib libgobject-2.0.dylib

Then it proceeds to install Pango, and come up with this:

configure: error: *** Could not enable any backends.
*** Must have at least one backend to build Pango.

The package is still not ready for my machine yet ...

Can anyone try to run through the process in a clean machine and fix the issues that come up?

I strongly feel that it is necessary to provide pre-compiled binaries instead of asking every user to go through this.

cc: @timholy @ViralBShah @loladiro

show_layout fails with cairo assert

This was previously a Winston issue, but now:

           _

_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type "help()" to list help topics
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 0.3.0-prerelease+1576 (2014-02-14 22:18 UTC)
/ |_'|||__'| | Commit 494a451* (1 day old master)
|__/ | i686-linux-gnu

julia> using Cairo

julia> s = CairoARGBSurface(400,300);

julia> c = CairoContext(s);

julia> set_text(c,"abab")
"abab"

julia> move_to(c,40,50)

julia> update_layout(c)

julia> show_layout(c)
julia: /build/buildd/cairo-1.12.2/src/cairo-error.c:68: _cairo_error: Assertion `(status != CAIRO_STATUS_SUCCESS && status < CAIRO_STATUS_LAST_STATUS)' failed.
Aborted (core dumped)

It might be a library versioning problem (Cairo.jl uses cairo, pango, pangocairo, g_object).

I have the feeling, that putting the PangoLayout into the CairoContext without proper casting might raise issues.

btw: This is a ubuntu 13.04.

Add Base.writemime methods for export

Supporting the new multimedia I/O functionality in base should be trivial. Just import Base.writemime and add a few methods like:

writemime(io, ::@MIME("image/png"), s::CairoSurface) = write_to_png(s, io)

at which point a CairoSurface will automatically be rendered from display(s) etcetera given any supporting Display backend.

Provider PackageManager failed to satisfy dependency gobject

After circumventing #37, this is where I'm stuck now

julia> Pkg.add("Cairo")
INFO: Installing Cairo v0.2.8
INFO: Running build script for package Cairo
INFO: Nothing to do
WARNING: An exception occured while building binary dependencies.
You may have to take manual steps to complete the installation, see the error me
ssage below.
To reattempt the installation, run Pkg.fixup("Cairo").

 in build at pkg.jl:412

ERROR: Provider PackageManager failed to satisfy dependency gobject
 in error at error.jl:21
 in satisfy! at C:\Users\tim\AppData\Roaming\Julia\packages\BinDeps\src\dependen
cies.jl:435

at C:\Users\tim\AppData\Roaming\Julia\packages\Cairo\deps\build.jl:134

Pkg.add("Cairo") requires sudo password

On julia 0.2.0-prerelease+3564 on Debian Wheezy, since yesterday when I update or try to add Cairo I'm asked the sudo password while the build script for the Cairo package is being run. I think there are two problems:

  1. not clear why the build script is being run since I already have the binary dependencies (libcairo2 libpango1.0-0 tk-dev).
  2. asking for sudo password seems strange and potentially dangerous (e.g. overwriting system library version or risk of malicious attack)

I'm appending the error message I get when I interrupt the package installation process at the request of the password:

julia> Pkg.add("Cairo")
INFO: Initializing package repository /home/sam/.julia.
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
INFO: Cloning cache of Cairo from git://github.com/JuliaLang/Cairo.jl.git
INFO: Cloning cache of BinDeps from git://github.com/loladiro/BinDeps.jl.git
INFO: Cloning cache of Color from git://github.com/JuliaLang/Color.jl.git
INFO: Cloning cache of URIParser from git://github.com/loladiro/URIParser.jl.git
INFO: Installing Cairo v0.2.6
INFO: Installing BinDeps v0.2.2
INFO: Installing Color v0.2.6
INFO: Installing URIParser v0.0.0
INFO: Running build script for package Cairo
WARNING: contains(collection, item) is deprecated, use in(item, collection)    instead
 in contains at reduce.jl:238
[sudo] password for sam: 
WARNING: An exception occured while building binary dependencies.
You may have to take manual steps to complete the installation, see the error     message below.
To reattempt the installation, run Pkg.fixup("Cairo").

 in build at pkg.jl:268
ERROR: interrupt
 in yield at multi.jl:1501
 in wait at task.jl:105
 in wait at process.jl:564
 in success at process.jl:437
 in run at process.jl:424
 in run at /home/sam/.julia/BinDeps/src/BinDeps.jl:431
 in satisfy! at /home/sam/.julia/BinDeps/src/dependencies.jl:399
 in anonymous at /home/sam/.julia/BinDeps/src/dependencies.jl:413
 in include at boot.jl:238
at /home/sam/.julia/Cairo/deps/build.jl:115

Use RPMmd for 32-bit install?

Is there anything other than a historical reason we are using the 32-bit package from googlecode rather than RPMmd? If not, I propose we switch so that it is consistent.

OSX without X11 installed is really annoying

If you don't have X11 installed on 10.8 (as is the default) when Julia attempts to dlopen() any of the libraries that might deal with it (for example, libpixman) there are some fake .dylibs that kill the julia process when they are opened, and pop up a message telling the user to download X11. As far as I can tell, there's no way to disable this "functionality".

I'm not sure what the best way to combat this is, so I'm opening the issue here instead of in BinDeps. The way I see it, we have these options:

  • We could blacklist /usr/X11/lib from the DL_LOAD_PATH somehow. Like a negative DL_LOAD_PATH or something
  • We could not dlopen() stuff in find_library(), but I'm not sure we want to try and faithfully reinvent the wheel there.
  • We could just immediately install Cairo from Homebrew.jl and not even inspect the user's computer for it.

Pinging @loladiro and @StefanKarpinski for good measure.

problems installing Cairo on Debian testing (Jessie)

When I run:

Pkg.add("Winston")

I get the following errors on Debian testing (Jessie):

INFO: Running build script for package Cairo
WARNING: contains(collection, item) is deprecated, use in(item, collection)     instead
 in contains at reduce.jl:238
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gettext is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
WARNING: An exception occured while building binary dependencies.
You may have to take manual steps to complete the installation, see the error     message below.
To reattempt the installation, run Pkg.fixup("Cairo").

 in build at pkg.jl:362
ERROR: Provider PackageManager failed to satisfy dependency gettext
 in error at error.jl:21
 in satisfy! at /home/sam/.julia/BinDeps/src/dependencies.jl:416
 in satisfy! at /home/sam/.julia/BinDeps/src/dependencies.jl:402
 in anonymous at /home/sam/.julia/BinDeps/src/dependencies.jl:430
 in include at boot.jl:238
at /home/sam/.julia/Cairo/deps/build.jl:134

running Pkg.fixup("Cairo") doesn't help. I should have all Cairo dependencies already installed. I ran aptitude install libcairo2 libpango1.0-0 tk-dev and also installed libpango1.0-dev before trying to install Winston.

Pkg.add("Cairo") fails on Windows 7

My fresh Julia installation fails to build Cairo. Error points to pango. Tried on 2 different internet connections and I'm able to reach http://ftp.acc.umu.se/pub/GNOME/sources/pango/1.32/.

This prevents me from plotting with Winston :(
Let me know what I can do to test further. Thanks.

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-rc1+82 (2014-07-18 22:02 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 876e0d3 (1 day old master)
|__/                   |  x86_64-w64-mingw32


In  [3]: Pkg.build("Cairo")
INFO: Building LibCURL
INFO: Updating WinRPM package list
INFO: Downloading http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory//repodata/repomd.xml
INFO: Downloading http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Factory//repodata/repomd.xml
INFO: Building WinRPM
INFO: Downloading http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory//repodata/repomd.xml
INFO: Downloading http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Factory//repodata/repomd.xml
INFO: Building Cairo
================================[ ERROR: Cairo ]================================

None of the selected providers can install dependency pango
while loading C:\Users\K\.julia\v0.3\Cairo\deps\build.jl, in expression starting on line 129

================================================================================

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

WARNING: Cairo had build errors.

 - packages with build errors remain installed in C:\Users\K\.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

================================================================================

In  [4]: versioninfo()
Julia Version 0.3.0-rc1+82
Commit 876e0d3 (2014-07-18 22:02 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

Check for available `libcairo` before compiling from source

Would it be possible to check for a libcairo in the current load path before compiling from source? It'd be nice to not have to recompile Cairo when we don't need to.

This could be done by simply trying to link against libcairo, and if we fail, then compiling. Maybe. :)

Image rendering in Cairo could be faster

This is not a huge deal, but I thought I'd provide some record of performance data here.

After improving the speed of Winston's imagesc (which I used because I could test both Tk and Gtk backends, whereas ImageView is pretty tightly coupled to Tk), I compared image rendering times against chrome, using the script below. The image was just A = rand(Uint8, 2000, 2500). On my machine, the improved imagesc was approximately four-fold slower than chrome, even when gc was disabled and I set FILTER_NEAREST in Cairo's image(). I did a simpler comparison using

function rawimage(dat)
    p = FramedPlot()
    add(p, Image((0,1), (0,1), dat))
    Winston.display(p)
end

pre-calculating the Uint32 image. In that case, Tk/Cairo was about 2x slower than chrome.

I don't see anything in particular to be done here, so I'll close immediately, but it seemed relevant to report the results of this comparison.

<!DOCTYPE HTML>
<html>
  <head>
    <style>
      body {
        margin: 0px;
        padding: 0px;
      }
    </style>
  </head>
  <body>
    <canvas id="myCanvas" width="578" height="550"></canvas>
    <script>
      function loadImages(sources, callback) {
        var images = {};
        var loadedImages = 0;
        var numImages = 0;
        // get num of sources
        for(var src in sources) {
          numImages++;
        }
        for(var src in sources) {
          images[src] = new Image();
          images[src].onload = function() {
            if(++loadedImages >= numImages) {
              callback(images);
            }
          };
          images[src].src = sources[src];
        }
      }
      var canvas = document.getElementById('myCanvas');
      var context = canvas.getContext('2d');

      var sources = {
        testImage: 'file:///tmp/testimage5M.png'
      };

      loadImages(sources, function(images) {
    var start = new Date().getTime();
        context.drawImage(images.testImage, 0, 0);
        var end = new Date().getTime();
    var time = end - start;
    alert('Execution time: ' + time/1000 + 's');
      });

    </script>
  </body>
</html>

Trouble building pango on linux

I get this trying to build pango from source on julia.mit.edu

configure: Disabling cairo support
configure: error: *** Could not enable any backends.
*** Must have at least one backend to build Pango.
ERROR: failed process: Process(`/home/viral/.julia/Cairo/deps/src/pango-1.32.6/configure LDFLAGS=-L/home/viral/.julia/Cairo/deps/usr/lib CPPFLAGS=-I/home/viral/.julia/Cairo/deps/usr/include --with-included-modules=yes --prefix=/home/viral/.julia/Cairo/deps/usr`, ProcessExited(1)) [1]
 in pipeline_error at process.jl:388
 in run at process.jl:378
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:350
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:147
 in run at /home/viral/.julia/BinDeps/src/BinDeps.jl:376
 in include_from_node1 at loading.jl:76
 in anonymous at no file:206
 in cd at file.jl:26
 in runbuildscript at pkg.jl:203
at /home/viral/.julia/Cairo/deps/build.jl:79

dependency on Shlib_ext

BinDeps imports (well, tries to) Base.Sys.shlib_ext which seems to be missing.
Cairo/deps/build.lj uses shlib_ext (line 79ff).

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.