Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghc-8.2 branch: stack build error #636

Open
alexanderkjeldaas opened this issue Mar 29, 2018 · 12 comments
Open

ghc-8.2 branch: stack build error #636

alexanderkjeldaas opened this issue Mar 29, 2018 · 12 comments

Comments

@alexanderkjeldaas
Copy link
Contributor

I'm not sure what this is, but it seems like an error:

$ stack build
haddock-api-ghcjs-2.18.1: unregistering
haddock-library-ghcjs-1.4.4: unregistering
haddock-library-ghcjs-1.4.4: build (lib)
haddock-library-ghcjs-1.4.4: copy/register
haddock-api-ghcjs-2.18.1: configure (lib)
haddock-api-ghcjs-2.18.1: build (lib)
haddock-api-ghcjs-2.18.1: copy/register
ghcjs-8.2.0.1: configure (lib + exe)
ghcjs-8.2.0.1: build (lib + exe)
ghcjs-8.2.0.1: copy/register
Completed 3 action(s).
Log files have been written to: /home/cibuild/ghcjs/ghcjs/.stack-work/logs/
/home/cibuild/ghcjs/ghcjs/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/setup/setup: streamingProcess: invalid argument (Bad file descriptor)
@alexanderkjeldaas
Copy link
Contributor Author

Also reported here: https://qiita.com/mod_poppo/items/bbd8dd23fe65753c566a

@luite
Copy link
Member

luite commented Mar 31, 2018

hmm I haven't seen this before, do you have more log files?

@alexanderkjeldaas
Copy link
Contributor Author

alexanderkjeldaas commented Mar 31, 2018 via email

@luite
Copy link
Member

luite commented Apr 2, 2018

merged, did that fix it?

@minoki
Copy link

minoki commented Apr 11, 2018

I'm the one who wrote the article mentioned above (https://qiita.com/mod_poppo/items/bbd8dd23fe65753c566a). I tried to build with the latest ghc-8.2 branch (c810fef) and there was no streamingProcess: invalid argument (Bad file descriptor) error during stack build.

(Now I get the same error as #637 during ghcjs-boot)

@luite
Copy link
Member

luite commented Apr 18, 2018

that should also be fixed now

@sigrlami
Copy link

On Linux getting following error

Progress: 4/51
--  While building custom Setup.hs for package ghc-api-ghcjs-8.2.2 using:
      /home/sigrlami/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0 build lib:ghc-api-ghcjs --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/sigrlami/work/projects-hs/ghcjs/.stack-work/logs/ghc-api-ghcjs-8.2.2.log

    Preprocessing library for ghc-api-ghcjs-8.2.2..
    Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2: can't find source for Config in
    autogen, compiler/backpack, compiler/basicTypes, compiler/cmm,
    compiler/codeGen, compiler/coreSyn, compiler/deSugar, compiler/ghci,
    compiler/hsSyn, compiler/iface, compiler/llvmGen, compiler/main,
    compiler/nativeGen, compiler/parser, compiler/prelude, compiler/profiling,
    compiler/rename, compiler/simplCore, compiler/simplStg, compiler/specialise,
    compiler/stgSyn, compiler/stranal, compiler/typecheck, compiler/types,
    compiler/utils, compiler/vectorise,
    .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/autogen,
    .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/global-autogen

I assume ghc-api-ghcjs configured improperly

@sigrlami
Copy link

sigrlami commented Apr 28, 2018

@luite building GHC with ./boot && ./configure && make preliminary in ghc dir and then stack build worked. I understand pipeline is a bit in a flux, but rebuilding also ghc for single package seems as unpleasant hack. Is there a way to understand which files really needed and attach them exactly to package?

@luite
Copy link
Member

luite commented Apr 29, 2018

Yeah it's not a great situation.

Perhaps I should add these files to the utils/pkg-input tree. Then only someone upgrading the ghc submodule would need to do a build to regenerate these artifacts (and it's probably only actually needed for major upgrades)

I'll give it a bit more thought... I think that utils/pkg-input could get some attention to make upgrades easier and less error-prone (I found updating the files for 8.4 a bit inconvenient, but fortunately it didn't take that much time overall)

@alexanderkjeldaas
Copy link
Contributor Author

The main thing that's needed IMO is a Dockerfile that can build ghcjs from a pristine source, where the first line is:
RUN git clone ...ghcjs.git

The rest are optimizations for various workflows.

@luite
Copy link
Member

luite commented May 6, 2018

@alexanderkjeldaas I've updated the Dockerfile to do a full build. Building the ghc source tree first is not needed anymore. Ideas or suggestions for the docker build welcome.

@danse
Copy link
Contributor

danse commented Jul 16, 2018

for the record, i stumbled upon streamingProcess: invalid argument (Bad file descriptor) (the error reported in the first message here) using stack in a completely different context, and i landed here searching for the error on Github. I believe that it's a rare error condition for stack that hasn't been analysed yet, maybe something related to terminating a stack command in a specific moment. I fixed removing .stack-work and starting over

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants