diagrams / diagrams-lib

Diagrams standard library
https://diagrams.github.io/
Other
138 stars 62 forks source link

Cannot Install with Cocoa #354

Closed saucetray closed 3 years ago

saucetray commented 3 years ago

This tries to install and cannot find Cocoa after trying to compile Diagrams.Parametric.Adjust.

Mac OS Big Sur


diagrams-lib        > [ 2 of 73] Compiling Diagrams.Attributes.Compile
ihaskell            > [ 6 of 25] Compiling IHaskell.Convert.LhsToIpynb [Optimisation flags changed]
diagrams-lib        > [ 3 of 73] Compiling Diagrams.CubicSpline.Internal
diagrams-lib        > [ 4 of 73] Compiling Diagrams.Names
diagrams-lib        > [ 5 of 73] Compiling Diagrams.Parametric
ihaskell            > [ 7 of 25] Compiling IHaskell.Convert.IpynbToLhs [Optimisation flags changed]
diagrams-lib        > [ 6 of 73] Compiling Diagrams.Parametric.Adjust
diagrams-lib        > <command line>: can't load framework: Cocoa (not found)
byorgey commented 3 years ago

This doesn't seem to be diagrams-specific. For example see https://gitlab.haskell.org/ghc/ghc/-/issues/18446 . I'll keep this ticket open for now in case there's something we can do to help mitigate this but ultimately this seems to be a GHC / Mac OS issue.

zac-garby commented 3 years ago

Out of interest, why does diagrams-lib need Cocoa? If it's not too deeply embedded in the library could it possibly be avoided entirely?

byorgey commented 3 years ago

diagrams-lib does not need Cocoa. I haven't the faintest idea why Cocoa is being loaded.

Edited to clarify: diagrams-lib does not intentionally or explicitly use Cocoa. I didn't even know what Cocoa was. It seems that there may be some reason that diagrams-lib implicitly depends on Cocoa on OS X, but I have no idea what it is.

byorgey commented 3 years ago

This workaround was just posted to Reddit. No idea if it will help in this case, but worth a shot perhaps:

https://www.reddit.com/r/haskell/comments/k9r2cy/workaround_for_haskell_woes_on_macos_11_big_sur/

saucetray commented 3 years ago

Ok. Well, since this is totally not your doing. I am closing. Thank you for your help!

1ywan commented 3 years ago

seems this problem has been soleved by ghc 8.4.10 or 9.0.1, but diagrams has not support these 2 ghc release yet, is there any plan?

byorgey commented 3 years ago

We definitely want to get diagrams updated, but with pandemic + teaching + new baby I have not had much time at all. But it's one of the next things on my list.