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-Ren... it hang forever with a CPU at 100%. Suggestions are more than welcomed. Regards, Arnaud

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-Ren... 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

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

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-Ren... 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

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-Ren... 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

On Sun, 3 Mar 2013 19:58:37 -0500
Brent Yorgey
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 ?

On Sun, Mar 03, 2013 at 05:38:02PM -0800, briand@aracnet.com wrote:
On Sun, 3 Mar 2013 19:58:37 -0500 Brent Yorgey
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
participants (4)
-
Arnaud Bailly
-
Brent Yorgey
-
briand@aracnet.com
-
Tim Docker