HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
437 stars 77 forks source link

Install via Cabal failing #235

Open stymo opened 4 years ago

stymo commented 4 years ago

Hi, I've been trying to install threepenny and get the following error. I'm on a mac running GHC 8.0.2 and cabal 1.24.0.2.

This seems to be related to this issue, which is actually the stack tracker even though that issue was with cabal. Also may be related to #148, although installing threepenny-gui-0.8.3.0 gives me the same error, at least installed through cabal, which I need to do. Any guidance would be greatly appreciated!

Configuring threepenny-gui-0.8.2.4...
Building threepenny-gui-0.8.2.4...
Preprocessing library threepenny-gui-0.8.2.4...
[ 1 of 29] Compiling Reactive.Threepenny.Types ( src/Reactive/Threepenny/Types.hs, dist/dist-sandbox-704af560/build/Reactive/Threepenny/Types.o )
...
[10 of 29] Compiling Foreign.JavaScript.Resources ( src/Foreign/JavaScript/Resources.hs, dist/dist-sandbox-704af560/build/Foreign/JavaScript/Resources.o )

/var/folders/n2/7nl8m9y16l960nwsz38l8n6w0000gp/T/ghc70120_0/ghc_41.hscpp:419:7: error:
    • Exception when trying to run compile-time code:
        Could not find .cabal file for path: /private/var/folders/n2/7nl8m9y16l960nwsz38l8n6w0000gp/T/ghc70120_0/ghc_41.hscpp
CallStack (from HasCallStack):
  error, called at /var/folders/n2/7nl8m9y16l960nwsz38l8n6w0000gp/T/ghc66069_0/ghc_1.hscpp:547:24 in file-embed-0.0.11-Ig9ax8TOwYZBvviSvETwrO:Data.FileEmbed
      Code: include "js/lib/jquery.js"
    • In the untyped splice: $(include "js/lib/jquery.js")
sjakobi commented 4 years ago

cabal-1.24 is fairly old. Can you retry with cabal-3.0?

stymo commented 4 years ago

Thanks for the quick reply! I'm actually stuck with cabal-1.24 for now. I know that threepenny can be installed on a similar environment using 1.24.x.x, though, since other developers in my organization have been able to install it. That's why I'm pretty stumped tbh: other folks have not been able to reproduce this on similar systems, but none of us have been able to track down exactly what is going wrong.

sjakobi commented 4 years ago

I know that threepenny can be installed on a similar environment using 1.24.x.x, though, since other developers in my organization have been able to install it.

Do they use use Mac too?

I've also not been able to reproduce the issue with the same versions on Linux. :/

stymo commented 4 years ago

Yes. Other people have been able to build with these exact versions on both Mac and Linux.

sjakobi commented 4 years ago

How come you're stuck with cabal-1.24 BTW?

You shouldn't need admin rights or something like that to install a more recent version.

stymo commented 4 years ago

I gave this a try with Cabal-3.0.0.0 and still get the same error, both trying to install globally and in my project's sandbox via v1-install.

Do you know if there could be anything environment-specific throwing off the way file-embed or Template Haskell is working, since the error seems to failing to load the embedded JS resource?

sjakobi commented 4 years ago

I gave this a try with Cabal-3.0.0.0 and still get the same error

Strange!

Do you know if there could be anything environment-specific throwing off the way file-embed or Template Haskell is working, since the error seems to failing to load the embedded JS resource?

Sorry, I'm not sure. Would you mind asking on the issue tracker for file-embed? Its maintainer is quite the expert in low-level build system details, so I hope that he can help.

HeinrichApfelmus commented 4 years ago

@stymo Any news on this? What did file-embed do?