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

Using ghc-vis with current tools #13

Open
shanemikel opened this issue May 29, 2016 · 7 comments
Open

Using ghc-vis with current tools #13

shanemikel opened this issue May 29, 2016 · 7 comments

Comments

@shanemikel
Copy link

I'm having a hell of a time (in a bad way) figuring how to get ghc-vis setup in a stack project.

@meditans
Copy link

Yeah, same here, it would be nice to have some updated instructions for stack!

After stack unpack ghc-vis; cd ghc-vis; stack init --solver; stack build I get the error:

svgcairo-0.13.1.0: configure
Progress: 1/2
--  While building package svgcairo-0.13.1.0 using:
      /home/carlo/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc --make -odir /tmp/stack19045/svgcairo-0.13.1.0/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup -hidir /tmp/stack19045/svgcairo-0.13.1.0/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup -i -i. -package=Cabal-1.22.5.0 -clear-package-db -global-package-db -package-db=/home/carlo/.stack/snapshots/x86_64-linux/lts-6.4/7.10.3/pkgdb /tmp/stack19045/svgcairo-0.13.1.0/Setup.hs -o /tmp/stack19045/svgcairo-0.13.1.0/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/setup
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/carlo/code/haskell/forks/ghc-vis-0.8/.stack-work/logs/svgcairo-0.13.1.0.log


    /tmp/stack19045/svgcairo-0.13.1.0/Setup.hs:5:8:
        Could not find module ‘Gtk2HsSetup’
        Use -v to see a list of the files searched for.

Why is this happening? I tried also to stack build gtk2hs-buildtools in the project folder, but I get the same result.

@FranklinChen
Copy link
Contributor

gtk2hs/svgcairo#3

Once this is fixed, I'll write something up on using ghc-vis in a Stack context.

@def-
Copy link
Owner

def- commented Jun 22, 2016

Thanks @FranklinChen, that would be great.

@FranklinChen
Copy link
Contributor

OK, I've finally managed to compile ghc-vis using Stack with LTS 8.6 on macOS for GHC 8.0.2. But when I try to use it, it seg faults for me. Can anyone try this out on macOS or Linux? Try out my fork's ghc-8 branch: https://github.com/FranklinChen/ghc-vis/tree/ghc-8

@def-
Copy link
Owner

def- commented Apr 5, 2017

Most likely ghc-heap-view has to be adapted to new data structures in recent GHC versions. There's a header in GHC that can be used for reference, but I don't remember the details.

@FranklinChen
Copy link
Contributor

No, ghc-heap-view is working fine. I found that the problem with the seg fault is purely a macOS problem, and I don't know how to fix it. However, it works fine on Linux, I finally verified.

@varosi
Copy link

varosi commented Nov 21, 2017

It's working on Windows, too. It's like:

stack exec -- pacman -S mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gtk3 mingw-w64-x86_64-gtk2 wget unzip 
stack exec -- echo 'export PATH=/c/graphviz/bin:$PATH' >> ~/.bashrc
stack install gtk2hs-buildtools glib cairo pango gtk
git clone https://github.com/def-/ghc-vis.git
stack install

Last clone could be rewritten directly as stack install ghc-vis if the Hackage version is updated to the latest. Including https://github.com/def-/ghc-vis/pull/18

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

5 participants