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

ghcjs-dom-jsffi needs to be explicitly built before building library #87

Open
brandonchinn178 opened this issue Sep 21, 2018 · 0 comments

Comments

@brandonchinn178
Copy link

I'm building a project with stack, and I put ghcjs-dom-jsffi into the extra-deps section. When building stack build --only-dependencies in CI, it was failing with an error like:

    [  1 of 598] Compiling GHCJS.DOM.Types  ( src/GHCJS/DOM/Types.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0_ghcjs/build/GHCJS/DOM/Types.js_o )
    [  2 of 598] Compiling GHCJS.DOM.JSFFI.RTCPeerConnectionError ( src/GHCJS/DOM/JSFFI/RTCPeerConnectionError.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0_ghcjs/build/GHCJS/DOM/JSFFI/RTCPeerConnectionError.js_o )
    [  3 of 598] Compiling GHCJS.DOM.JSFFI.Generated.Enums ( src/GHCJS/DOM/JSFFI/Generated/Enums.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0_ghcjs/build/GHCJS/DOM/JSFFI/Generated/Enums.js_o )
    Cabal-simple_mPHDZzAJ_1.24.2.0_ghcjs-0.2.1.9008011_ghc-8.0.2:
    '/root/.stack/programs/x86_64-linux/ghcjs-0.2.1.9008011_ghc-8.0.2/bin/ghcjs-pkg'
    exited with an error:
    ghcjs-dom-jsffi-0.9.2.0: Warning: haddock-interfaces:
    /tmp/stack69671/ghcjs-dom-jsffi-0.9.2.0/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0_ghcjs/doc/html/ghcjs-dom-jsffi/ghcjs-dom-jsffi.haddock
    doesn't exist or isn't a file
    ghcjs-dom-jsffi-0.9.2.0: Warning: haddock-html:
    /tmp/stack69671/ghcjs-dom-jsffi-0.9.2.0/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0_ghcjs/doc/html/ghcjs-dom-jsffi
    doesn't exist or isn't a directory
    ghcjs-dom-jsffi-0.9.2.0: cannot find any of
    ["GHCJS/DOM.hi","GHCJS/DOM.p_hi","GHCJS/DOM.dyn_hi","GHCJS/DOM.js_hi","GHCJS/DOM.js_p_hi"]
    (use --force to override)

with that cannot find any of [...] error for every module in ghcjs-dom-jsffi. The way I had to mitigate this was to explicitly build stack build ghcjs-dom-jsffi before running stack build --only-dependencies.

I've attached a minimal example script that should be run on a CentOS machine (attached as .txt so github won't complain). Without changes, it should error with the above message. Uncomment line 45 in order to fix the error.

test-ghcjs-dom-jsffi.txt

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

1 participant