ghc-vis icon indicating copy to clipboard operation
ghc-vis copied to clipboard

What needs to be done to have ghc-vis running on newest GHC?

Open EncodePanda opened this issue 4 years ago • 12 comments

@def- what work do you think is needed to get this project up and running again?

EncodePanda avatar Nov 30 '21 11:11 EncodePanda

In other words, how can we help? :)

EncodePanda avatar Nov 30 '21 11:11 EncodePanda

Since we are working with GHC internals ghc-vis and ghc-heap-view are prone to breaking often. I'll try to upgrade the dependencies in ghc-heap-view and ghc-vis and check where it fails. This should help for ghc-heap-view: https://github.com/nomeata/ghc-heap-view/pull/36

def- avatar Nov 30 '21 11:11 def-

My Haskell foo is a bit rusty, is there an easy way to test cabal install . with the (unreleased) ghc-heap-view 0.6.3?

def- avatar Nov 30 '21 12:11 def-

Haskell-foo differs from Cabal-foo.

This should help: https://github.com/haskell-nix/hnix/commit/06b0fca9fd607eb2e995f003424e797a41ffa5b7#diff-b8ed06757045fac949c89f2139a862498ad2b6d1f82c61a31e7c91d6cf0eaa70

There hnix was patched so it would build cryptohash-sha512 dependency from particular git source.

Anton-Latukha avatar Nov 30 '21 12:11 Anton-Latukha

Now that ghc-heap-view is updated, I noticed one further dependency problem: https://github.com/gtk2hs/gtk2hs/issues/309

def- avatar Nov 30 '21 16:11 def-

also, https://github.com/gtk2hs/svgcairo/issues/14 ?

jwaldmann avatar Dec 04 '21 16:12 jwaldmann

Haven't gotten that far

def- avatar Dec 04 '21 21:12 def-

I have tried switching to gi-cairo instead of svgcairo. Now I'm running into the next problem:

Failed to build hashtables-1.3.1.
Build log (
/home/deen/.cabal/logs/ghc-9.0.2/hashtables-1.3.1-b18534b8e35d69179499dfbf94fca581c20ec0d1aec725813e429075202373a7.log
):
Configuring library for hashtables-1.3.1..
Preprocessing library for hashtables-1.3.1..
Building library for hashtables-1.3.1..
[ 1 of 12] Compiling Data.HashTable.Class ( src/Data/HashTable/Class.hs, dist/build/Data/HashTable/Class.o, dist/build/Data/HashTable/Class.dyn_o )

src/Data/HashTable/Class.hs:54:1: error:
    Could not find module ‘Data.Hashable’
    There are files missing in the ‘hashable-1.4.1.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
54 | import           Data.Hashable
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build hashtables-1.3.1 (which is required by ghc-vis-0.9.2).
See the build log above for details.

This seems to be an Arch Linux problem, I'm now trying with cabal build --ghc-options=-dynamic

def- avatar Nov 16 '22 10:11 def-

Failed to build haskell-gi-0.26.2. The failure occurred during the configure
step.
Build log (
/home/deen/.cabal/logs/ghc-9.0.2/haskell-gi-0.26.2-536188c901579b27a3ccfb812769db11726ed1d9d0076d1cae7e9cdf0e0f1a1f.log
):
[1 of 1] Compiling Main             ( /home/deen/git/ghc-vis/dist-newstyle/tmp/src-1938273/haskell-gi-0.26.2/dist/setup/setup.hs, /home/deen/git/ghc-vis/dist-newstyle/tmp/src-1938273/haskell-gi-0.26.2/dist/setup/Main.o )
Linking /home/deen/git/ghc-vis/dist-newstyle/tmp/src-1938273/haskell-gi-0.26.2/dist/setup/setup ...
Configuring haskell-gi-0.26.2...
setup: The pkg-config package 'gobject-introspection-1.0' version >=1.32 is
required but it could not be found.

cabal: Failed to build haskell-gi-0.26.2 (which is required by ghc-vis-0.9.2).
See the build log above for details.

Edit: Installed extra/gobject-introspection Edit2: gi-cairo doesn't seem to contain everything we require, so this doesn't work.

def- avatar Nov 16 '22 11:11 def-

Edit2: gi-cairo doesn't seem to contain everything we require, so this doesn't work.

What is missing? Does it make sense to create an issue there to accommodate our need?

slyfox3 avatar Nov 17 '22 03:11 slyfox3

I didn't see anything related to svgcairo

def- avatar Nov 17 '22 09:11 def-