Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No file saved when running example #205

Open
mentoc3000 opened this issue Apr 17, 2019 · 5 comments
Open

No file saved when running example #205

mentoc3000 opened this issue Apr 17, 2019 · 5 comments

Comments

@mentoc3000
Copy link

I am trying to get setup with Chart but am unable to get the examples working using Stack. I am running Windows 10 and have done the following things to install Cairo:

  • Downloaded and installed MSYS2(x86_64-20180531)
  • Downloaded and installed GTK using pacman in MSYS2 shell
  • In powershell ran stack exec -- pacman -Syy
  • In powershell ran stack exec -- pacman -S mingw-w64-x86_64-pkg-config mingw-w64-x86_64-glib2 mingw-w64-x86_64-cairo mingw-w64-x86_64-pango mingw-w64-x86_64-gtk3

My stack.yaml file looks like this, pulling in the extra dependencies that aren't on Stackage:

resolver: lts-13.17

packages:
- .

extra-deps:
- Chart-1.9.1
- Chart-cairo-1.9.1
- cairo-0.13.6.0
- gtk2hs-buildtools-0.13.5.0
- gtk-0.15.2

I have included Chart and Chart-cairo in the package.yaml dependencies.

When using the code in Example 1 (Easy version) stack builds without complaint. I can run the executable, which runs without error, but the PNG file is never produced.

@bravit
Copy link
Collaborator

bravit commented Apr 19, 2019

Did you check the folder where the executable file is located? On my machine I've got PNG file in the .stack-work\install\fd0322d0\bin subfolder of the folder with the project.

@mentoc3000
Copy link
Author

I did, it wasn't there. Even when running that executable it did not appear.

@mentoc3000
Copy link
Author

I was able to get this example to run using the Diagrams backend instead of Cairo, building an svg.

@bravit
Copy link
Collaborator

bravit commented Apr 26, 2019

Hi @mentoc3000, I'll reopen this issue. I want to keep it open for a while as a reminder that we do have issues with the cairo backend on Windows. Thanks for reporting!

@bravit bravit reopened this Apr 26, 2019
@brioglade
Copy link

Can I use haskell-chart in win10 that I got the following error?
I had installed the package Chart with "cabal install Chart".

PS C:\Users\chang\Documents\ghciplot> ghci R.hs
GHCi, version 8.10.2: https://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( R.hs, interpreted )

R.hs:1:1: error:
Could not find module ‘Graphics.Rendering.Chart.Easy’
Use -v (or :set -v in ghci) to see a list of the files searched for.
|
1 | import Graphics.Rendering.Chart.Easy
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

R.hs:2:1: error:
Could not find module ‘Graphics.Rendering.Chart.Backend.Cairo’
Use -v (or :set -v in ghci) to see a list of the files searched for.
|
2 | import Graphics.Rendering.Chart.Backend.Cairo
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed, no modules loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants