Open gcharnock opened 9 years ago
Did you install ghcjs-react with cabal install --ghcjs
?
No. I'm pretty inexperienced with ghcjs and how it interacts with cabal. Particularly when there's a client and server part. I was actually hoping I could use this project as an example of what the best practices would be for having a client and a server managed by the same cabal file.
Okay, I ran cabal install --ghcjs
in the directory with the project checked out. So to recap, the commands I have executed are as follows:
git clone https://github.com/fpco/stackage-view.git
cd stackage-view/
cabal sandbox init
cabal install
cabal install --ghcjs
Cabal installed a large number of packages but errored on ide-backend:
cabal: Error: some packages failed to install:
ide-backend-0.9.0.7 failed during the building phase. The exception was:
ExitFailure 1
shake-0.15.1 failed during the building phase. The exception was:
ExitFailure 1
stackage-view-0.0.1 depends on ide-backend-0.9.0.7 which failed to install.
I couldn't find a log file for ide-backend in .cabal-sandbox/logs
but there was a Cabal-ide-backend-1.23.0.0.log
. The build of this package seemed to have succeeded. The tail of the file was.
[80 of 81] Compiling Distribution.Simple.Test ( Distribution/Simple/Test.hs, dist/dist-sandbox-c8d8085a/build/Distribution/Simple/Test.js_o )
[81 of 81] Compiling Distribution.Simple ( Distribution/Simple.hs, dist/dist-sandbox-c8d8085a/build/Distribution/Simple.js_o )
In-place registering Cabal-ide-backend-1.23.0.0...
Creating package registration file:
/tmp/pkgConf-Cabal-ide-backend-1.23.01143408282188213258.0
Installing library in
/home/gareth2/src/stackage-view/.cabal-sandbox/lib/x86_64-linux-ghcjs-0.1.0-ghc7_8_4/Cabal-ide-backend-1.23.0.0
Registering Cabal-ide-backend-1.23.0.0...
I then tried: cabal install --ghcjs ide-backend-0.9.0.7
IdeSession/RPC/Client.hs:271:37:
Couldn't match type ‘Int’ with ‘System.Posix.Types.CPid’
Expected type: System.Posix.Types.ProcessID
Actual type: System.Process.Internals.PHANDLE
In the second argument of ‘signalProcess’, namely ‘pID’
In a stmt of a 'do' block: signalProcess sigKILL pID
cabal: Error: some packages failed to install:
ide-backend-0.9.0.7 failed during the building phase. The exception was:
ExitFailure 1
Wait, you mentioned ghcjs-react. Need more sleep. When I try that I get:
cabal install --ghcjs ghcjs-react
cabal: There is no package named 'ghcjs-react'.
You may need to run 'cabal update' to get the latest list of available
packages.
I'm assuming it's not on hackage? Trying to find it with google.
Okay, I gave it another go with a fresh sandbox.
mkdir stackage-view-sandbox
cd stackage-view-sandbox
git clone https://github.com/fpco/ghcjs-react.git
cd ghcjs-react/
cabal install --ghcjs
cd ..
git clone https://github.com/fpco/stackage-view.git
cd stackage-view
cabal install --ghcjs
At this point the build failed with the following error: cabal: The following packages are likely to be broken by the reinstalls: http-client-0.4.11.1 conduit-1.2.4 classy-prelude-0.11.1.1 basic-prelude-0.3.13 Use --force-reinstalls if you want to install anyway.
cd .. #go back to the root of the sandbox
cabal install --force-reinstalls --ghcjs ghcjs-react/ stackage-view/
This started but eventually errors with the same ide-backend problem.
cabal: Error: some packages failed to install:
ide-backend-0.9.0.7 failed during the building phase. The exception was:
ExitFailure 1
shake-0.15.1 failed during the building phase. The exception was:
ExitFailure 1
stackage-view-0.0.1 depends on shake-0.15.1 which failed to install.
Stackage View doesn't seem to build for me. I tried the usual:
The commit hash I was using was 55c30e0f0bc90d4e5210859c7a6a82c9b2d2e38a, which was the latest at the time of posting.
Cabal builds the dependencies without difficulty but when it reaches Stackage View itself it fails with the following output:
Here are the version of things I'm using: