haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

`./install.hs build-all` fails #1182

Closed aryairani closed 5 years ago

aryairani commented 5 years ago
10:55 ~/haskell-ide-engine (master)$ stack clean
10:56 ~/haskell-ide-engine (master)$ ./install.hs build-all -j2
# 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.6.3)
# stack (for hie-8.4.4)
Copying from /Users/arya/.stack/snapshots/x86_64-osx/lts-12.26/8.4.4/bin/happy to /Users/arya/.local/bin/happy

Copied executables to /Users/arya/.local/bin:
- happy
# stack (for hie-8.4.4)
Copying from /Users/arya/.stack/snapshots/x86_64-osx/lts-13.10/8.6.3/bin/happy to /Users/arya/.local/bin/happy

Copied executables to /Users/arya/.local/bin:
- happy
# stack (for hie-8.6.3)
constrained-dynamic-0.1.0.0: configure
constrained-dynamic-0.1.0.0: configure
constrained-dynamic-0.1.0.0: build
HTTP-4000.3.12: configure
constrained-dynamic-0.1.0.0: build
cabal-plan-0.4.0.0: configure
HTTP-4000.3.12: build
haddock-library-1.6.0: configure
constrained-dynamic-0.1.0.0: copy/register
cabal-plan-0.4.0.0: build
haskell-lsp-types-0.8.2.0: configure
haddock-library-1.6.0: build                                                                   
constrained-dynamic-0.1.0.0: copy/register
haskell-src-exts-1.21.0: configure                                                             
haskell-lsp-types-0.8.2.0: build                                                                     haddock-api-2.21.0: configure                                                                        haskell-src-exts-1.21.0: build                                                                 
hslogger-1.2.12: configure                                                                     
hslogger-1.2.12: build                                                                         
haddock-api-2.21.0: build                                                                            haskell-src-exts-1.21.0: configure                                                                   haskell-src-exts-1.21.0: build                                                                       hslogger-1.2.12: copy/register                                                                 
lens-4.16.1: configure                                                                         
lens-4.16.1: build                                                                         
HTTP-4000.3.12: copy/register                                                              
old-time-1.1.0.3: configure                                                                  
old-time-1.1.0.3: build                                                                      
old-time-1.1.0.3: copy/register                                                              
cabal-plan-0.4.0.0: copy/register                                                                    optparse-applicative-0.14.3.0: configure                                                             monad-dijkstra-0.1.1.2: configure                                                                    optparse-applicative-0.14.3.0: build                                                                 monad-dijkstra-0.1.1.2: build                                                                        monad-dijkstra-0.1.1.2: copy/register                                                                monad-memo-0.4.1: configure                                                                          monad-memo-0.4.1: build                                                                              haddock-library-1.6.0: copy/register                                                                 haddock-api-2.20.0: configure                                                                        haddock-api-2.20.0: build                                                                            optparse-applicative-0.14.3.0: copy/register                                                         monad-memo-0.4.1: copy/register                                                                      optparse-simple-0.1.0: configure                                                                     multistate-0.8.0.1: configure                                                                        optparse-simple-0.1.0: build                                                                   
multistate-0.8.0.1: build                                                                            optparse-simple-0.1.0: copy/register                                                           
pem-0.2.4: configure                                                                           
pem-0.2.4: build                                                                   
pem-0.2.4: copy/register                                                           
pipes-4.3.9: configure                                                               
pipes-4.3.9: build                                                                   
pipes-4.3.9: copy/register                                                           
polyparse-1.12: configure                                                               
polyparse-1.12: build                                                                   
multistate-0.8.0.1: copy/register                                                                    butcher-1.3.2.1: configure                                                                           butcher-1.3.2.1: build                                                                               polyparse-1.12: copy/register                                                           
cpphs-1.20.8: configure                                                                 
cpphs-1.20.8: build                                                                    
haddock-api-2.21.0: copy/register                                                                    butcher-1.3.2.1: copy/register                                                                       optparse-simple-0.1.0: configure                                                                    optparse-simple-0.1.0: build                                                                         syz-0.2.0.0: configure                                                                               0
syz-0.2.0.0: build                                                                                   
optparse-simple-0.1.0: copy/register                                                                 
temporary-1.2.1.1: configure                                                                         
syz-0.2.0.0: copy/register                                                                       
temporary-1.2.1.1: build                                                                         
yaml-0.8.32: configure                                                                           
temporary-1.2.1.1: copy/register                                                                 
yaml-0.8.32: build                                                                               
cpphs-1.20.8: copy/register                                                            
apply-refact-0.6.0.0: configure                                                                      
pretty-show-1.9.5: configure                                                                
pretty-show-1.9.5: build                                                                    
apply-refact-0.6.0.0: build                                                                          
pretty-show-1.9.5: copy/register                                                            
primes-0.2.1.0: configure                                                                   
primes-0.2.1.0: build                                                                    
primes-0.2.1.0: copy/register                                                            
monoid-subclasses-0.4.6.1: configure                                                                
monoid-subclasses-0.4.6.1: build                                                                    
haddock-api-2.20.0: copy/register                                                                   
process-extras-0.7.4: configure                                                                      process-extras-0.7.4: build                                                                          process-extras-0.7.4: copy/register                                                                  psqueues-0.2.7.0: configure                                                                          psqueues-0.2.7.0: build                                                                           
yaml-0.8.32: copy/register                                                                           
brittany-0.11.0.0: configure (lib + exe)                                                             brittany-0.11.0.0: build (lib + exe)                                                                 apply-refact-0.6.0.0: copy/register                                                                  cabal-helper-0.9.0.0: configure (lib + exe)                                                          cabal-helper-0.9.0.0: build (lib + exe)                                                              lens-4.16.1: copy/register                                                                        
psqueues-0.2.7.0: copy/register                                                                   
refact-0.3.0.2: configure                                                                            
refact-0.3.0.2: build                                                                                
http2-1.6.4: configure                                                                          
http2-1.6.4: build                                                                              
refact-0.3.0.2: copy/register                                                                   
monad-dijkstra-0.1.1.2: configure                                                                    cabal-helper-0.9.0.0: copy/register                                                                  monad-dijkstra-0.1.1.2: build                                                                        monad-dijkstra-0.1.1.2: copy/register                                                                setenv-0.1.1.3: configure                                                                            setenv-0.1.1.3: build                                                                           
setenv-0.1.1.3: copy/register                                                                   
simple-sendfile-0.2.27: configure                                                                    brittany-0.11.0.0: copy/register                                                                     simple-sendfile-0.2.27: build                                                                        simple-sendfile-0.2.27: copy/register                                                                socks-0.5.6: configure                                                                               socks-0.5.6: build                                                                           
haskell-lsp-types-0.8.2.0: copy/register                                             
haskell-lsp-0.8.2.0: configure                                    
haskell-lsp-0.8.2.0: build                                  
monoid-subclasses-0.4.6.1: copy/register                                                     
sorted-list-0.2.1.0: configure                                                               
sorted-list-0.2.1.0: build                                                             
http2-1.6.4: copy/register                                                             
stm-delay-0.1.1.1: configure                                                                 
sorted-list-0.2.1.0: copy/register                                                           
stm-delay-0.1.1.1: build                                                                           
streaming-commons-0.2.1.0: configure                                                               
socks-0.5.6: copy/register                                                                         
stm-delay-0.1.1.1: copy/register                                                                    
streaming-commons-0.2.1.0: build                                                                     strict-0.3.2: configure                                                                              strict-0.3.2: build                                                                                  fold-debounce-0.2.0.8: configure                                                                     fold-debounce-0.2.0.8: build                                                                         strict-0.3.2: copy/register                                                                          syb-0.7: configure                                                                                   fold-debounce-0.2.0.8: copy/register                                                               
syb-0.7: build                                                                                     
tagsoup-0.14.7: configure                                                   
tagsoup-0.14.7: build                                                       
syb-0.7: copy/register                                                      
Strafunski-StrategyLib-5.0.1.0: configure                                                            Strafunski-StrategyLib-5.0.1.0: build                                                                streaming-commons-0.2.1.0: copy/register                                                             data-tree-print-0.1.0.2: configure                                                                   data-tree-print-0.1.0.2: build                                                                       data-tree-print-0.1.0.2: copy/register                                                               ghc-exactprint-0.5.8.2: configure                                                                    Strafunski-StrategyLib-5.0.1.0: copy/register                                                        ghc-exactprint-0.5.8.2: build                                                                        http-client-0.5.14: configure                                                                       
http-client-0.5.14: build                                                                           
tagsoup-0.14.7: copy/register                                                                       
syz-0.2.0.0: configure                                                                              
syz-0.2.0.0: build                                                                               
syz-0.2.0.0: copy/register                                                                       
tar-0.5.1.0: configure                                                                           
tar-0.5.1.0: build                                                                               
http-client-0.5.14: copy/register                                                                
temporary-1.2.1.1: configure                                                                     
temporary-1.2.1.1: build                                                                        
temporary-1.2.1.1: copy/register                                                                
tf-random-0.5: configure                                                                        
tf-random-0.5: build                                                                        
tar-0.5.1.0: copy/register                                                                  
hackage-security-0.5.3.0: configure                                                                  tf-random-0.5: copy/register                                                                         hackage-security-0.5.3.0: build                                                                      QuickCheck-2.11.3: configure                                                                         QuickCheck-2.11.3: build                                                                             haskell-lsp-0.8.2.0: copy/register                          
hackage-security-0.5.3.0: copy/register                                                              cabal-install-2.2.0.0: configure                                                                     QuickCheck-2.11.3: copy/register                                                                     cabal-install-2.2.0.0: build                                                                         quickcheck-io-0.2.0: configure                                                                       quickcheck-io-0.2.0: build                                                                           quickcheck-io-0.2.0: copy/register                                                                   hspec-core-2.5.5: configure                                                                          hspec-core-2.5.5: build                                                                              ghc-exactprint-0.5.8.2: copy/register                                                                apply-refact-0.5.0.0: configure                                                                      apply-refact-0.5.0.0: build                                                                          hspec-core-2.5.5: copy/register                                                                      hspec-2.5.5: configure                                                                               hspec-2.5.5: build                                                                                
hspec-2.5.5: copy/register                                                                        
time-locale-compat-0.1.1.5: configure                                                                time-locale-compat-0.1.1.5: build                                                                    time-locale-compat-0.1.1.5: copy/register                                                            typed-process-0.2.3.0: configure                                                                     haskell-src-exts-1.21.0: copy/register                                                               typed-process-0.2.3.0: build                                                                         uniplate-1.6.12: configure                                                                           uniplate-1.6.12: build                                                                              
typed-process-0.2.3.0: copy/register                                                                
unix-time-0.3.8: configure                                                                          
unix-time-0.3.8: build                                                                        
apply-refact-0.5.0.0: copy/register                                                           
unix-time-0.3.8: copy/register                                                                
unliftio-core-0.1.2.0: configure                                                               
haskell-src-exts-1.21.0: copy/register                      
uniplate-1.6.12: copy/register                                                                    
floskell-0.9.0: configure (lib + exe)  
unliftio-core-0.1.2.0: build                                                                      
fast-logger-2.4.11: configure                                                                     
unliftio-core-0.1.2.0: copy/register                                                                 fast-logger-2.4.11: build                                                                            haskell-src-exts-util-0.2.4: configure                                                               ghc-mod-core-5.9.0.0: configure (lib)                                                             
floskell-0.9.0: build (lib + exe)                                                                 
haskell-src-exts-util-0.2.4: build                                                                   resourcet-1.2.2: configure                                                                           ghc-mod-core-5.9.0.0: build (lib)                                                                 
hoogle-5.0.17.5: configure                                                                        
resourcet-1.2.2: build                                                                               fast-logger-2.4.11: copy/register                                                                    unsafe-0.0: configure                                                                                hoogle-5.0.17.5: build                                                                            
haskell-src-exts-util-0.2.4: configure                                                            
unsafe-0.0: build                                                                               
haskell-src-exts-util-0.2.4: copy/register                                                      
haskell-src-exts-util-0.2.4: build                                                                
utility-ht-0.0.14: configure                                                                    
unsafe-0.0: copy/register                                                             
ghc-mod-core-5.9.0.0: copy/register                                                               
HaRe-0.8.4.1: configure (lib + exe)                                                               
utility-ht-0.0.14: build                                                                   
floskell-0.9.0: copy/register                                                             
butcher-1.3.2.0: configure                                                                 
resourcet-1.2.2: copy/register                                                             
butcher-1.3.2.0: build                                                                      
uuid-types-1.0.3: configure                                                                 
hie-plugin-api-0.6.0.0: configure (lib)                                                           
uuid-types-1.0.3: build                                                                     
HaRe-0.8.4.1: build (lib + exe)                                                                   
haskell-src-exts-util-0.2.4: copy/register                                                        
hlint-2.1.15: configure                                                                           
hie-plugin-api-0.6.0.0: build (lib)                                                
hlint-2.1.15: build                                                                
utility-ht-0.0.14: copy/register                                                            
storable-record-0.0.4: configure                                                                
uuid-types-1.0.3: copy/register                                                                 
storable-record-0.0.4: build                                                                    
aeson-1.3.1.1: configure                                                                     
aeson-1.3.1.1: build                                                                         
storable-record-0.0.4: copy/register                                                         
storable-tuple-0.0.3.3: configure                                                             
storable-tuple-0.0.3.3: build                                                                 
storable-tuple-0.0.3.3: copy/register                                                         
vault-0.3.1.2: configure                                                                      
vault-0.3.1.2: build                                                                 
HaRe-0.8.4.1: copy/register                                                        
hsimport-0.8.8: configure                                                            
vault-0.3.1.2: copy/register                                                         
hsimport-0.8.8: build                                                                
vector-algorithms-0.7.0.4: configure                                                             
vector-algorithms-0.7.0.4: build                                                                 
butcher-1.3.2.0: copy/register                                                                   
wai-3.2.1.2: configure                                                                           
hie-plugin-api-0.6.0.0: copy/register                                                
wai-3.2.1.2: build                                                                           
wai-3.2.1.2: copy/register                                                                   
wai-logger-2.3.2: configure                                                                       
hsimport-0.8.8: copy/register                                                        
wai-logger-2.3.2: build                                                                           
wai-logger-2.3.2: copy/register                                                                   
word8-0.1.3: configure                                                                            
word8-0.1.3: build                                                                           
word8-0.1.3: copy/register                                                                   
warp-3.2.25: configure                                                                       
warp-3.2.25: build                                                                           
warp-3.2.25: copy/register                                                                   
x509-1.7.5: configure                                                                        
x509-1.7.5: build                                                                           
vector-algorithms-0.7.0.4: copy/register                                                    
mono-traversable-1.0.10.0: download                                                         
mono-traversable-1.0.10.0: configure                                                        
mono-traversable-1.0.10.0: build                                                            
hlint-2.1.15: copy/register                                  
ghc-mod-5.9.0.0: configure (lib + exe)          
ghc-mod-5.9.0.0: build (lib + exe)              
hoogle-5.0.17.5: copy/register                  
x509-1.7.5: copy/register                                                                   
x509-store-1.6.7: configure                                                                       
x509-store-1.6.7: build                                                                           
x509-store-1.6.7: copy/register                                                                   
x509-system-1.6.6: configure                                                                       
x509-system-1.6.6: build                                                                           
x509-system-1.6.6: copy/register                                                                   
x509-validation-1.6.11: configure                                                                    x509-validation-1.6.11: build                                                                        x509-validation-1.6.11: copy/register                                                                tls-1.4.1: configure                                                                                 tls-1.4.1: build                                                                           
ghc-mod-5.9.0.0: copy/register                  
Building all executables for `haskell-ide-engine' once. After a successful build of all of them, only specified executables will be rebuilt.
haskell-ide-engine-0.8.0.0: configure (lib + exe)
haskell-ide-engine-0.8.0.0: build (lib + exe)
mono-traversable-1.0.10.0: copy/register                                                   
conduit-1.3.1: configure                                                                   
conduit-1.3.1: build                                                           
tls-1.4.1: copy/register                                                       
connection-0.2.8: configure                                                           
conduit-1.3.1: copy/register                                                          
connection-0.2.8: build                                                                     
conduit-extra-1.3.0: configure                                                              
conduit-extra-1.3.0: build                                                                  
connection-0.2.8: copy/register                                                             
http-client-tls-0.3.5.3: configure                                                                 
http-client-tls-0.3.5.3: build                                                                     
http-client-tls-0.3.5.3: copy/register                                                             
tls-session-manager-0.0.0.2: configure                                                               tls-session-manager-0.0.0.2: build                                                                   conduit-extra-1.3.0: copy/register                                                                   tls-session-manager-0.0.0.2: copy/register                                                          xdg-basedir-0.2.2: configure                                                                         xdg-basedir-0.2.2: build                                                                             2
warp-tls-3.2.4.3: configure                                                               
xdg-basedir-0.2.2: copy/register                                                          
warp-tls-3.2.4.3: build                                                                   
dyre-0.8.12: configure                                                              
dyre-0.8.12: build                                                                  
warp-tls-3.2.4.3: copy/register                                                     
yi-rope-0.11: configure                                                             
yi-rope-0.11: build                                                             
dyre-0.8.12: copy/register                                                      
hsimport-0.8.8: configure                                                          
hsimport-0.8.8: build                                                              
aeson-1.3.1.1: copy/register                                                       
aeson-pretty-0.8.7: configure                                                           
aeson-pretty-0.8.7: build                                                               
yi-rope-0.11: copy/register                                                             
hsimport-0.8.8: copy/register                                                           
cabal-plan-0.4.0.0: configure                                                                 
aeson-pretty-0.8.7: copy/register                                                                   cabal-plan-0.4.0.0: build                                                                            haskell-lsp-types-0.8.2.0: configure                                                                 0
haskell-lsp-types-0.8.2.0: build                                                                     
floskell-0.9.0: configure (lib + exe)                                                                
floskell-0.9.0: build (lib + exe)                                                                    
cabal-plan-0.4.0.0: copy/register                                                                    
http-conduit-2.3.2: configure                                                                        
http-conduit-2.3.2: build                                                                            
http-conduit-2.3.2: copy/register                                                                    
hoogle-5.0.17.5: configure                                                                           
hoogle-5.0.17.5: build                                                                            
cabal-install-2.2.0.0: copy/register                                                              
cabal-helper-0.9.0.0: configure (lib + exe)                                                       
cabal-helper-0.9.0.0: build (lib + exe)                                                          
cabal-helper-0.9.0.0: copy/register                                                              
ghc-mod-core-5.9.0.0: configure (lib)                                                            
ghc-mod-core-5.9.0.0: build (lib)                                                                
floskell-0.9.0: copy/register                                                                    
yaml-0.8.32: configure                                                                           
yaml-0.8.32: build                                                                            
hoogle-5.0.17.5: copy/register                                                                
haskell-ide-engine-0.8.0.0: copy/register 
Completed 27 action(s).                   
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.4.0.1_ghc-8.6.3: 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
******************************************************************

******************************************************************
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
*******************************Progress 90/100: ghc-mod-core-5.9.0.0, haskell-lsp-types-0.8.2.0, yaml-0.8.32***********************************

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.6.3
* Raised the exception:
user error (Development.Shake.command_, system command failed
Command: stack --stack-yaml=stack-8.6.3.yaml build
Exit code: 1
Stderr:
constrained-dynamic-0.1.0.0: configure
constrained-dynamic-0.1.0.0: build
cabal-plan-0.4.0.0: configure
cabal-plan-0.4.0.0: build
haskell-lsp-types-0.8.2.0: configure
constrained-dynamic-0.1.0.0: copy/register
haskell-lsp-types-0.8.2.0: build                                                                     haddock-api-2.21.0: configure                                                                        haddock-api-2.21.0: build                                                                            haskell-src-exts-1.21.0: configure                                                                   haskell-src-exts-1.21.0: build                                                                       cabal-plan-0.4.0.0: copy/register                                                                    monad-dijkstra-0.1.1.2: configure                                                                    monad-dijkstra-0.1.1.2: build                                                                        monad-dijkstra-0.1.1.2: copy/register                                                                monad-memo-0.4.1: configure                                                                          monad-memo-0.4.1: build                                                                              monad-memo-0.4.1: copy/register                                                                      multistate-0.8.0.1: configure                                                                        multistate-0.8.0.1: build                                                                            multistate-0.8.0.1: copy/register                                                                    butcher-1.3.2.1: configure                                                                           butcher-1.3.2.1: build                                                                               haddock-api-2.21.0: copy/register                                                                    butcher-1.3.2.1: copy/register                                                                       optparse-simple-0.1.0: configure                                                                    optparse-simple-0.1.0: build                                                                         syz-0.2.0.0: configure                                                                               0
syz-0.2.0.0: build                                                                                   
optparse-simple-0.1.0: copy/register                                                                 
temporary-1.2.1.1: configure                                                                         
syz-0.2.0.0: copy/register                                                                       
temporary-1.2.1.1: build                                                                         
yaml-0.8.32: configure                                                                           
temporary-1.2.1.1: copy/register                                                                 
yaml-0.8.32: build                                                                               
apply-refact-0.6.0.0: configure                                                                      
apply-refact-0.6.0.0: build                                                                          
yaml-0.8.32: copy/register                                                                           
brittany-0.11.0.0: configure (lib + exe)                                                             brittany-0.11.0.0: build (lib + exe)                                                                 apply-refact-0.6.0.0: copy/register                                                                  cabal-helper-0.9.0.0: configure (lib + exe)                                                          cabal-helper-0.9.0.0: build (lib + exe)                                                              cabal-helper-0.9.0.0: copy/register                                                                  brittany-0.11.0.0: copy/register                                                                     haskell-lsp-types-0.8.2.0: copy/register                                             
haskell-lsp-0.8.2.0: configure                                    
haskell-lsp-0.8.2.0: build                                  
haskell-lsp-0.8.2.0: copy/register                          
haskell-src-exts-1.21.0: copy/register                      
floskell-0.9.0: configure (lib + exe)  
ghc-mod-core-5.9.0.0: configure (lib)                                                             
floskell-0.9.0: build (lib + exe)                                                                 
ghc-mod-core-5.9.0.0: build (lib)                                                                 
hoogle-5.0.17.5: configure                                                                        
hoogle-5.0.17.5: build                                                                            
haskell-src-exts-util-0.2.4: configure                                                            
haskell-src-exts-util-0.2.4: build                                                                
ghc-mod-core-5.9.0.0: copy/register                                                               
HaRe-0.8.4.1: configure (lib + exe)                                                               
floskell-0.9.0: copy/register                                                             
hie-plugin-api-0.6.0.0: configure (lib)                                                           
HaRe-0.8.4.1: build (lib + exe)                                                                   
haskell-src-exts-util-0.2.4: copy/register                                                        
hlint-2.1.15: configure                                                                           
hie-plugin-api-0.6.0.0: build (lib)                                                
hlint-2.1.15: build                                                                
HaRe-0.8.4.1: copy/register                                                        
hsimport-0.8.8: configure                                                            
hsimport-0.8.8: build                                                                
hie-plugin-api-0.6.0.0: copy/register                                                
hsimport-0.8.8: copy/register                                                        
hlint-2.1.15: copy/register                                  
ghc-mod-5.9.0.0: configure (lib + exe)          
ghc-mod-5.9.0.0: build (lib + exe)              
hoogle-5.0.17.5: copy/register                  
ghc-mod-5.9.0.0: copy/register                  
Building all executables for `haskell-ide-engine' once. After a successful build of all of them, only specified executables will be rebuilt.
haskell-ide-engine-0.8.0.0: configure (lib + exe)
haskell-ide-engine-0.8.0.0: build (lib + exe)
haskell-ide-engine-0.8.0.0: copy/register 
Completed 27 action(s).                   
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.4.0.1_ghc-8.6.3: startProcess: invalid argument (Bad file descriptor)
)

11:22 ~/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 per diff and which cabal.

Any ideas?

Thanks!

samuelpilz commented 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.

aryairani commented 5 years ago

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)
)
fendor commented 5 years ago

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?

aryairani commented 5 years ago

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!

fendor commented 5 years ago

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.

aryairani commented 5 years ago

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)$

🎉