Closed aryairani closed 5 years ago
What did the -j 2
actually do? Could you run the install.hs
without it?
If -j 2
executes targets in parallel, this is an issue since concurrent stack
processes get in the way of each other.
Sorry, I shouldn't have used that in my bug report. Here's another try without it:
17:41 ~/haskell-ide-engine (master)$ stack clean
17:41 ~/haskell-ide-engine (master)$ ./install.hs build-all
# git (for submodules)
Synchronizing submodule url for 'submodules/HaRe'
Synchronizing submodule url for 'submodules/HaRe/submodules/cabal-helper'
Synchronizing submodule url for 'submodules/HaRe/submodules/ghc-mod'
Synchronizing submodule url for 'submodules/brittany'
Synchronizing submodule url for 'submodules/cabal-helper'
Synchronizing submodule url for 'submodules/floskell'
Synchronizing submodule url for 'submodules/ghc-mod'
# git (for submodules)
# stack (for cabal)
# stack (for cabal)
Copying from /Users/arya/.stack/snapshots/x86_64-osx/nightly-2018-12-15/8.6.2/bin/cabal to /Users/arya/.local/bin/cabal
Copied executables to /Users/arya/.local/bin:
- cabal
Warning: The cabal executable found on the PATH environment variable is /Users/arya/.stack/snapshots/x86_64-osx/nightly-2018-12-15/8.6.2/bin/cabal and not the version that was just installed. This
means that cabal calls on the command line will not use this version.
# cabal (for cabal)
Warning: The update command is a part of the legacy v1 style of cabal usage.
Please switch to using either the new project style and the new-update command
or the legacy v1-update alias as new-style projects will become the default in
the next version of cabal-install. Please file a bug if you cannot replicate a
working v1- use case with the new-style commands.
For more information, see: https://wiki.haskell.org/Cabal/NewBuild
Downloading the latest package list from hackage.haskell.org
To revert to previous state run:
cabal update --index-state='2019-04-19T12:43:56Z'
# cabal (for cabal)
Warning: The install command is a part of the legacy v1 style of cabal usage.
Please switch to using either the new project style and the new-install
command or the legacy v1-install alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.
For more information, see: https://wiki.haskell.org/Cabal/NewBuild
Resolving dependencies...
All the requested packages are already installed:
Cabal-2.4.1.0
Use --reinstall if you want to reinstall anyway.
# stack (for hie-8.2.1)
Copying from /Users/arya/haskell-ide-engine/.stack-work/install/x86_64-osx/nightly-2017-11-24/8.2.1/bin/happy to /Users/arya/.local/bin/happy
Copied executables to /Users/arya/.local/bin:
- happy
# stack (for hie-8.2.1)
haskell-ide-engine-0.8.0.0: build (lib + exe)
haskell-ide-engine-0.8.0.0: copy/register
Log files have been written to: /Users/arya/haskell-ide-engine/.stack-work/logs/
/Users/arya/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.0.0.2_ghc-8.2.1: startProcess: invalid argument (Bad file descriptor)
******************************************************************
Building failed, Try running `stack clean` and restart the build
If this does not work, open an issue at
https://github.com/haskell/haskell-ide-engine
******************************************************************
Error when running Shake build system:
at src/Development/Shake/Internal/Args.hs:81:69-79:
* Depends on: build-all
at /Users/arya/haskell-ide-engine/install.hs:78:25-53:
* Depends on: build
at /Users/arya/haskell-ide-engine/install.hs:77:25-69:
* Depends on: hie-8.2.1
* Raised the exception:
user error (Development.Shake.command_, system command failed
Command: stack --stack-yaml=stack-8.2.1.yaml build
Exit code: 1
Stderr:
haskell-ide-engine-0.8.0.0: build (lib + exe)
haskell-ide-engine-0.8.0.0: copy/register
Log files have been written to: /Users/arya/haskell-ide-engine/.stack-work/logs/
/Users/arya/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.0.0.2_ghc-8.2.1: startProcess: invalid argument (Bad file descriptor)
)
First, is your stack installation up to date? If you are not sure, just use stack upgrade
, then stack clean --full
and try again.
Second, is your stack installation working? E.g. there were some problems with a correct stack setup on macos.
Last, can you try to execute the command stack --stack-yaml=stack-8.2.1.yaml
in the project folder and paste the logs from /Users/arya/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.0.0.2_ghc-8.2.1
here?
My Stack version was 1.7.1. Now I've upgraded it to 1.9.3.
I believe my stack installation is working alright, I use it daily to build my work project. I wouldn't consider myself a Stack expect by any stretch, but I have been under the impression that things were running smoothly.
I'm running stack build --stack-yaml=stack-8.2.1.yaml
now and will paste the logs shortly. Thanks for your help!
That might be the issue. Please report back whether that fixes it! If it does, the pr #1168 tackles your common problem, which will be merged ASAP.
That does seem to have done the trick:
Configuring haskell-ide-engine-0.8.0.0...
Preprocessing library for haskell-ide-engine-0.8.0.0..
Building library for haskell-ide-engine-0.8.0.0..
Preprocessing executable 'hie-wrapper' for haskell-ide-engine-0.8.0.0..
Building executable 'hie-wrapper' for haskell-ide-engine-0.8.0.0..
Linking .stack-work/dist/x86_64-osx/Cabal-2.0.0.2/build/hie-wrapper/hie-wrapper ...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library 'hie-test-utils' for haskell-ide-engine-0.8.0.0..
Building library 'hie-test-utils' for haskell-ide-engine-0.8.0.0..
[1 of 1] Compiling TestUtils ( test/utils/TestUtils.hs, .stack-work/dist/x86_64-osx/Cabal-2.0.0.2/build/hie-test-utils/TestUtils.o )
Preprocessing executable 'hie' for haskell-ide-engine-0.8.0.0..
Building executable 'hie' for haskell-ide-engine-0.8.0.0..
Linking .stack-work/dist/x86_64-osx/Cabal-2.0.0.2/build/hie/hie ...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Installing library in /Users/arya/haskell-ide-engine/.stack-work/install/x86_64-osx/nightly-2017-11-24/8.2.1/lib/x86_64-osx-ghc-8.2.1/haskell-ide-engine-0.8.0.0-Xi9HeKcXnl8Cwz4wg2DlG
Installing executable hie-wrapper in /Users/arya/haskell-ide-engine/.stack-work/install/x86_64-osx/nightly-2017-11-24/8.2.1/bin
Installing internal library hie-test-utils in /Users/arya/haskell-ide-engine/.stack-work/install/x86_64-osx/nightly-2017-11-24/8.2.1/lib/x86_64-osx-ghc-8.2.1/haskell-ide-engine-0.8.0.0-5FwNYvkKV1cGsYf2hgFDCC-hie-test-utils
Installing executable hie in /Users/arya/haskell-ide-engine/.stack-work/install/x86_64-osx/nightly-2017-11-24/8.2.1/bin
Registering library for haskell-ide-engine-0.8.0.0..
Registering library 'hie-test-utils' for haskell-ide-engine-0.8.0.0..
-- End of log file: /Users/arya/haskell-ide-engine/.stack-work/logs/haskell-ide-engine-0.8.0.0.log
Log files have been written to: /Users/arya/haskell-ide-engine/.stack-work/logs/
18:05 ~/haskell-ide-engine (master)$
🎉
Fwiw, contrary to the warning early in the build, the cabal on my PATH does seem to be the same as the one installed from
/Users/arya/.stack/snapshots/x86_64-osx/nightly-2018-12-15/8.6.2/bin/cabal
, as perdiff
andwhich cabal
.Any ideas?
Thanks!