Failed to compile a sanity check
Hi - After months of successful deploys Heroku is complaining about a sanity check. In past deploys stack used a sandboxed ghc but here it seems stack is looking for and not finding a specific ghc. Does this error look familiar? I can provide more info as needed. Thank you for your help!
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Haskell app detected
remote: -----> 2020-07-28_15:37:56 Starting...
remote: -----> 2020-07-28_15:37:56 Exporting config vars
remote: -----> 2020-07-28_15:37:56 Restoring 6.0.0a files from cache
remote: -----> 2020-07-28_15:37:56 Restoring stack-2.3.1
remote: -----> 2020-07-28_15:37:56 Substituting stack vars
remote: -----> 2020-07-28_15:37:56 Restoring .stack-work
remote: -----> 2020-07-28_15:37:59 Running stack
remote: The GHC located at /tmp/codon/tmp/cache/.stack/programs/x86_64-linux/ghc-8.8.3/bin/ghc-8.8.3 failed to compile a sanity check. Please see:
remote:
remote: http://docs.haskellstack.org/en/stable/install_and_upgrade/
remote:
remote: for more information. Exception was:
remote: Received ExitFailure 127 when running
remote: Raw command: /tmp/codon/tmp/cache/.stack/programs/x86_64-linux/ghc-8.8.3/bin/ghc-8.8.3 /tmp/stack-sanity-check-29d325f04e9a0571/Main.hs -no-user-package-db
remote: Run from: /tmp/stack-sanity-check-29d325f04e9a0571/
remote: Standard error:
remote:
remote: /tmp/codon/tmp/cache/.stack/programs/x86_64-linux/ghc-8.8.3/bin/ghc-8.8.3: 9: exec: /app/tmp/cache/.stack/programs/x86_64-linux/ghc-8.8.3/lib/ghc-8.8.3/bin/ghc: not found
remote:
remote: ! Push rejected, failed to compile Haskell app.
same here
Hello, I'm also encountering this issue.
I suspected that reverting to 2.1.3 (i.e. undoing https://github.com/mfine/heroku-buildpack-stack/commit/cc8d329a844dfbe855f04aa3df7a22d1836ef5ee) would help since the buildpack was working fine for me prior to that stack version update (to 2.3.1).
Unfortunately, that did not resolve the issue.
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Haskell app detected
remote: -----> 2020-08-19_22:31:24 Starting...
remote: -----> 2020-08-19_22:31:24 Exporting config vars
remote: -----> 2020-08-19_22:31:25 Restoring 6.0.0a files from cache
remote: -----> 2020-08-19_22:31:25 Restoring stack-2.1.3
remote: -----> 2020-08-19_22:31:27 Substituting stack vars
remote: -----> 2020-08-19_22:31:27 Restoring .stack-work
remote: -----> 2020-08-19_22:31:30 Running stack
remote: The GHC located at /tmp/codon/tmp/cache/.stack/programs/x86_64-linux/ghc-8.6.5/bin/ghc-8.6.5 failed to compile a sanity check. Please see:
remote:
remote: http://docs.haskellstack.org/en/stable/install_and_upgrade/
remote:
remote: for more information. Exception was:
remote: Received ExitFailure 127 when running
remote: Raw command: /tmp/codon/tmp/cache/.stack/programs/x86_64-linux/ghc-8.6.5/bin/ghc-8.6.5 /tmp/stack-sanity-check119/Main.hs -no-user-package-db
remote: Run from: /tmp/stack-sanity-check119/
remote: Standard error:
remote:
remote: /tmp/codon/tmp/cache/.stack/programs/x86_64-linux/ghc-8.6.5/bin/ghc-8.6.5: 9: exec: /app/tmp/cache/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/bin/ghc: not found
remote:
remote: ! Push rejected, failed to compile Haskell app.
In past deploys stack used a sandboxed ghc but here it seems stack is looking for and not finding a specific ghc
I also noticed this; however mine is looking for ghc-8.6.5 (which is tied to the resolver: lts-14.7 I'm using in my stack.yaml), while yours is looking for ghc-8.8.3.
Try clearing your build caches to see if the clears stuff up: link.
Excellent! Thank you @mfine, clearing my build cache per the instructions in the link completely resolved the issue.