izash
izash

Reputation: 61

installing threadscope for mac m1?

There seems to be literally 0 info online about this. I want to install threadscope for haskell Parallelization. the pre built binaries on https://github.com/haskell/ThreadScope/releases are for x86 (intel). I tried to build the source code too, and it doesnt work.

When i try the pre built binary:

ME@ME-MBP documents % ./threadscope.macOS-latest.ghc-9.2.2
dyld[3954]: Library not loaded: '/usr/local/opt/gtk+/lib/libgtk-quartz-2.0.0.dylib'
  Referenced from: '/Users/ME/Documents/threadscope.macOS-latest.ghc-9.2.2'
  Reason: tried: '/usr/local/opt/gtk+/lib/libgtk-quartz-2.0.0.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/usr/local/lib/libgtk-quartz-2.0.0.dylib' (no such file), '/usr/lib/libgtk-quartz-2.0.0.dylib' (no such file)
zsh: abort      ./threadscope.macOS-latest.ghc-9.2.2

When i build the source code myself (the final lines as i'm installing are):

[ 6 of 38] Compiling Events.TestEvents
[ 7 of 38] Compiling GUI.App
[ 8 of 38] Compiling GUI.ConcurrencyControl
[ 9 of 38] Compiling GUI.DataFiles
[10 of 38] Compiling GUI.GtkExtras
[11 of 38] Compiling GUI.EventsView
[12 of 38] Compiling GUI.MainWindow
<command line>: dlopen(/Users/ME/.stack/snapshots/x86_64-osx/894064171ba5044f814f0d855cf6a9996fb275c6016d0ad96e7110885834c41e/8.8.4/lib/x86_64-osx-ghc-8.8.4/libHScairo-0.13.8.1-CJN2bpyQimUKJQPgfKRXra-ghc8.8.4.dylib, 0x0005): symbol not found in flat namespace (_cairo_append_path)

--  While building package threadscope-0.2.14.1 (scroll up to its section to see the error) using:
      /Users/ME/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.0.1.0 build exe:threadscope --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

Upvotes: 2

Views: 649

Answers (3)

Mooizz
Mooizz

Reputation: 1

For anyone who is still having trouble installing this, I just tried and quickly succeeded using the nix installer on Mac. Nix is an independent package manager for Linux and Mac that precisely specifies and isolates all dependencies from the system and other packages, so it often resolves broken dependency issues.

The commands I ran:

To install the nix package manager:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install (You may have to restart your terminal now if it can't find the nix command.)

To install threadscope:

nix profile install nixpkgs#haskellPackages.threadscope To run threadscope:

threadscope

Upvotes: 0

Jiayu An
Jiayu An

Reputation: 1

If the previous method doesn't work, try

cabal update

cabal install gtk

cabal install threadscope

works for mac/linux/windows.

Upvotes: 0

izash
izash

Reputation: 61

Solved it - Use cabal to install with the source code:

this will build and install the binary:

cabal --project-file=cabal.project.osx v2-install

Don't use stack for this!!

Upvotes: 2

Related Questions