-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unable to compile v6.0.0 on windows #1334
Comments
For the GHC 8.6.5 error, compiling actually gets suck and times out on AppVeyor. On Windows Server it never finished(tried it like for 2 hours or smth, maybe it could take longer?). From the error, it seems it could be related to GHC optimization, an option could be to try compiling with |
Additional help to build on Windows can be found on https://github.com/PostgREST/postgrest/blob/master/appveyor.yml. |
As one data-point, I just tried an appveyor build myself with GHC 8.6.5, and it got stuck at the exact same spot as yours, so I suspect it's not simply a timeout. |
Adding |
@robx It gets stuck when building text-printer, I was thinking the next thing to try could be to build it isolated from postgrest. I actually opened an issue mvv/text-printer#1, but maybe our failure could be unrelated. |
@steve-chavez you could reproduce the build failure on windows server, right? Perhaps you could weigh on on the ghc bug report at https://gitlab.haskell.org/ghc/ghc/issues/16917? In particular, it would be good to know how the branches windows-reduced and windows-buffer-error of my reduced text-printer fork behave there. |
@robx Yes, also happened on Windows Server(no timeout). I've deleted the ec2 instance but I'll see about creating a new one and checking your branches. One thing though, with |
@steve-chavez Yes 0.5.0.1 appears to compile fine. Though note that the jose 0.8 update also causes trouble one Windows: frasertweedale/hs-jose#83 |
@robx Both hang.
For
|
@robx I can give you access to the windows server to help you with this, you could send me an email(mine in profile, pgp key at http://pgp.mit.edu/) and I'll share you the credentials. |
@steve-chavez thanks for testing! I'll skip digging further, but thanks for the offer of access to the machine |
So, if |
Now I get:
This is on a t2.medium, with 4gb RAM. |
I found this seaching for info on page file size and appveyor: https://github.com/input-output-hk/cardano-sl/blob/master/appveyor.yml |
After trying some more times the build finished succesfully, with this patch over the diff --git a/stack.yaml b/stack.yaml
index 8ded0bc..32b9979 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,18 +1,17 @@
# stack.yaml is used for circle-ci tests. Profiling build fails on circleci
# with GHC 8.6, so we build with 8.4 for now.
-resolver: lts-12.26
+resolver: lts-13.24
extra-deps:
- Ranged-sets-0.4.0
- configurator-pg-0.1.0.3
-- http-types-0.12.3
-- hasql-1.4
-- hasql-pool-0.5.1
-- hasql-transaction-0.7.2
-- text-builder-0.6.5.1
-- deferred-folds-0.9.10.1
-- primitive-0.6.4.0
+- text-printer-0.5.0.1
+- hasql-1.4@sha256:fcb1b0046c1e888b6c4cad53c972d23318dbc6ababa9ceb7d9cfd3b546732bcd
+- hasql-transaction-0.7.2@sha256:d6d8ceb0b32be75686fe31c4b5bc15c569a71023fc60394893508ea733e8714b
+- jose-0.7.0.0
+
ghc-options:
postgrest: -O2 -Werror -Wall -fwarn-identities -fno-warn-redundant-constraints
nix:
packages: [pcre, pkgconfig, postgresql, zlib] Already uploaded the binary to the releases page. |
We should enable appveyor builds for commits on master and PRs, to ensure new dependencies don't break windows releases. Otherwise is more pain to fix the problem after the fact. Thanks a lot for your help on this @robx. |
Yay! You're welcome. |
I actually tried lts-13.28 locally(linux/NixOS) and I get the same issue as in the Windows EC2, trying to compile QueryBuilder eats up all my RAM and I couldn't get it to finish. So, we should stick to GHC 8.4.4 for now. Problem is that ghc 8.4.4 still fails on Windows. |
Perhaps GHC 8.4.4 could succeed if we just pin a newer |
You could try using a lower optimization setting. |
Just to note that I commented on this rough issue here: https://gitlab.haskell.org/ghc/ghc/issues/16017#note_213721 |
I wasn't able to compile latest version on windows. This seems related to the GHC upgrade we had recently.
These errors are on AppVeyor, but I also hit the same errors when trying to compile on a Windows Server 2019 in an ec2 instance.
Any help would be greatly appreciated. Trying to build from source on Windows and reporting here would help.
The text was updated successfully, but these errors were encountered: