Arnaud Bailly | 3 Mar 21:22 2013
Picon

Trouble installing and using Chart/cairo on windows 7

Hello,
I am trying to install timeplot and splot on a windows 7 host, using Haskell platform 2012.2.0.0, and I have troubles installing HSChart.

First difficulties were installing cairo, which requires Gtk+ libraries and headers. I installed those using a Gtk+-bundle, first in c:\Program Files\. I had to move to d:\soft (eg. a directory without spaces) to be able to install cairo.

Then I tried to install Chart and at first failed with a cryptic 'Exit Failure 1' error from cabal. I succeeded when I redirected cabal output to a file, eg: cabal install > out 2<&1 whereas a plain 'cabal install' failed.

Then I managed to install splot and timeplot. I then tried to use Chart to draw a simple chart, following http://hackage.haskell.org/packages/archive/Chart/0.16/doc/html/Graphics-Rendering-Chart-Simple.html and it hang forever with a CPU at 100%.

Suggestions are more than welcomed.

Regards,
Arnaud

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Brent Yorgey | 3 Mar 21:30 2013

Re: Trouble installing and using Chart/cairo on windows 7

On Sun, Mar 03, 2013 at 09:22:15PM +0100, Arnaud Bailly wrote:
> Hello,
> I am trying to install timeplot and splot on a windows 7 host, using
> Haskell platform 2012.2.0.0, and I have troubles installing HSChart.
> 
> First difficulties were installing cairo, which requires Gtk+ libraries and
> headers. I installed those using a Gtk+-bundle, first in c:\Program Files\.
> I had to move to d:\soft (eg. a directory without spaces) to be able to
> install cairo.
> 
> Then I tried to install Chart and at first failed with a cryptic 'Exit
> Failure 1' error from cabal. I succeeded when I redirected cabal output to
> a file, eg: cabal install > out 2<&1 whereas a plain 'cabal install' failed.
> 
> Then I managed to install splot and timeplot. I then tried to use Chart to
> draw a simple chart, following
> http://hackage.haskell.org/packages/archive/Chart/0.16/doc/html/Graphics-Rendering-Chart-Simple.htmland
> it hang forever with a CPU at 100%.

No idea if it's related, but hanging forever with the CPU at 100%
reminds me of this:

  http://code.google.com/p/diagrams/issues/detail?id=71

Unfortunately, GTK + cairo are notoriously difficult to install on
OSX and Windows.

-Brent
Arnaud Bailly | 4 Mar 21:41 2013
Picon

Re: Trouble installing and using Chart/cairo on windows 7

Thanks for the pointer. While googling and stackoverflowing I came across this as a potential issue but did not check.
It appears my ghc is 32 bits and I suspect the gtk+ lib are 64 bits.

I will check this and report on what I find.


Regards,
Arnaud

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Tim Docker | 4 Mar 01:26 2013
Picon

Re: Trouble installing and using Chart/cairo on windows 7

On 04/03/13 07:22, Arnaud Bailly wrote:
> Then I managed to install splot and timeplot. I then tried to use 
> Chart to draw a simple chart, following 
>
http://hackage.haskell.org/packages/archive/Chart/0.16/doc/html/Graphics-Rendering-Chart-Simple.html 
> and it hang forever with a CPU at 100%.

As the author of the Chart library, I'm sorry to say "I don't know". 
Chart is developed under linux, and I do occasional testing under osx, 
but I don't use windows at all. Chart is a pure haskell library sitting 
over cairo, so it is most likely a cairo problem rather than a chart 
one, but I realise this doesn't help you.

Do the examples that come with the haskell binding to cairo work for you?

Windows and gtk continues to be problematic for many users. I'd love to 
see an alternative backend for the chart library, but I would need a 
graphics API that installs easily under windows, osx and linux, and 
provides good access to fonts and font metrics. Any suggestions?

Tim
Brent Yorgey | 4 Mar 01:58 2013

Re: Trouble installing and using Chart/cairo on windows 7

On Mon, Mar 04, 2013 at 11:26:23AM +1100, Tim Docker wrote:
> On 04/03/13 07:22, Arnaud Bailly wrote:
> >Then I managed to install splot and timeplot. I then tried to use
> >Chart to draw a simple chart, following http://hackage.haskell.org/packages/archive/Chart/0.16/doc/html/Graphics-Rendering-Chart-Simple.html
> >and it hang forever with a CPU at 100%.
> 
> As the author of the Chart library, I'm sorry to say "I don't know".
> Chart is developed under linux, and I do occasional testing under
> osx, but I don't use windows at all. Chart is a pure haskell library
> sitting over cairo, so it is most likely a cairo problem rather than
> a chart one, but I realise this doesn't help you.
> 
> Do the examples that come with the haskell binding to cairo work for you?
> 
> Windows and gtk continues to be problematic for many users. I'd love
> to see an alternative backend for the chart library, but I would need
> a graphics API that installs easily under windows, osx and linux, and
> provides good access to fonts and font metrics. Any suggestions?

Good access to fonts and font metrics is the kicker.  Otherwise I'd
say to switch to using diagrams as a backend, hence getting a whole
bunch of actual backends for free.  I would love to see development of
some good Haskell font packages -- maybe it would even make a good
GSoC project?  Unfortunately I don't know enough about it to even know
what would be involved, or how much work it would be.

-Brent
briand | 4 Mar 02:38 2013

Re: Trouble installing and using Chart/cairo on windows 7

On Sun, 3 Mar 2013 19:58:37 -0500
Brent Yorgey <byorgey <at> seas.upenn.edu> wrote:

> 
> Good access to fonts and font metrics is the kicker.  Otherwise I'd
> say to switch to using diagrams as a backend, hence getting a whole
> bunch of actual backends for free.  I would love to see development of
> some good Haskell font packages -- maybe it would even make a good
> GSoC project?  Unfortunately I don't know enough about it to even know
> what would be involved, or how much work it would be.
> 

I assume that to use diagram the font package would have to be a vector font system, or could bit-mapped fonts
be used ?
Brent Yorgey | 4 Mar 23:27 2013

Re: Trouble installing and using Chart/cairo on windows 7

On Sun, Mar 03, 2013 at 05:38:02PM -0800, briand <at> aracnet.com wrote:
> On Sun, 3 Mar 2013 19:58:37 -0500
> Brent Yorgey <byorgey <at> seas.upenn.edu> wrote:
> 
> > 
> > Good access to fonts and font metrics is the kicker.  Otherwise I'd
> > say to switch to using diagrams as a backend, hence getting a whole
> > bunch of actual backends for free.  I would love to see development of
> > some good Haskell font packages -- maybe it would even make a good
> > GSoC project?  Unfortunately I don't know enough about it to even know
> > what would be involved, or how much work it would be.
> > 
> 
> I assume that to use diagram the font package would have to be a vector font system, or could bit-mapped
fonts be used ?

A vector font system would be ideal, as then you could go crazy
turning glyphs into paths and doing whatever the heck you want with
them using the diagrams framework.  However, bit-mapped fonts could be
used too (as long as there is a backend to support them), it would
just be less useful.

-Brent

Gmane