Please describe the problem.
git-annex cannot build with GHC 8.2.1
What steps will reproduce the problem?
cabal install --jobs=8 --max-backjumps=100000 --only-dependencies --flags=s3\ webapp
What version of git-annex are you using? On what operating system?
Tested with 6.20170520 and HEAD at a983877279d5157d4e7a8c2397d9e541e3c41fa6
Please provide any additional information below.
Discovered during https://github.com/Homebrew/homebrew-core/pull/15934
==> cabal install --jobs=8 --max-backjumps=100000 --only-dependencies --flags=s3 webapp
clang: warning: -Wl,-headerpad_max_install_names: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/opt/gettext/lib'
clang: warning: argument unused during compilation: '-L/usr/local/opt/libffi/lib'
clang: warning: argument unused during compilation: '-L/usr/local/opt/readline/lib'
clang: warning: argument unused during compilation: '-L/usr/local/opt/sqlite/lib'
clang: warning: argument unused during compilation: '-L/usr/local/opt/openssl/lib'
clang: warning: argument unused during compilation: '-L/usr/local/opt/icu4c/lib'
clang: warning: argument unused during compilation: '-L/usr/local/lib'
clang: warning: argument unused during compilation: '-L/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries'
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: git-annex-6.20170520 (user goal)
trying: base-4.10.0.0/installed-4.1... (dependency of git-annex-6.20170520)
next goal: sandi (dependency of git-annex-6.20170520)
rejecting: sandi-0.4.0 (conflict: base==4.10.0.0/installed-4.1..., sandi =>
base>=4.7 && <4.10)
rejecting: sandi-0.3.6, sandi-0.3.5 (conflict:
base==4.10.0.0/installed-4.1..., sandi => base>=4.7 && <4.9)
rejecting: sandi-0.3.4 (conflict: base==4.10.0.0/installed-4.1..., sandi =>
base==4.8.*)
rejecting: sandi-0.3.3, sandi-0.3.2, sandi-0.3.1 (conflict:
base==4.10.0.0/installed-4.1..., sandi => base==4.7.*)
rejecting: sandi-0.3.0.1 (conflict: base==4.10.0.0/installed-4.1..., sandi =>
base==4.6.* || ==4.7.*)
rejecting: sandi-0.3.0 (conflict: base==4.10.0.0/installed-4.1..., sandi =>
base==4.7.*)
rejecting: sandi-0.2.3, sandi-0.2.2.1, sandi-0.2.2, sandi-0.2.1 (conflict:
base==4.10.0.0/installed-4.1..., sandi => base>=4.5 && <4.7)
rejecting: sandi-0.2, sandi-0.1.1, sandi-0.1 (conflict:
base==4.10.0.0/installed-4.1..., sandi => base==4.6.*)
Dependency tree exhaustively searched.
Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Yes
I don't see any git-annex failure to build here. Cabal is failing to install sandi, a dependency. That package needs to have its dependency on base updated to allow building with the new ghc. Quite likely simply adjusting the dependency version will work.
Hi Joey,
Yes, I can work around that particular failure by tweaking constraints.
In particular, --allow-newer="sandi:base" --allow-newer="aws:time"
I also first need to "cabal install Cabal<1.25" because git-annex seems to have a compatibility problem with Cabal-2.0.0.2. The error with Cabal-2.0.0.2 is
But, once I've installed the lower version of Cabal, and tweaked the constraints for sandi and for aws, git-annex does build successfully.
However, at that point a more serious issue comes up when I run "git annex test" and here is the full log: https://gist.github.com/ilovezfs/d430f589d87d7f7237591cd51b2b94cb
Here is a snippet:
The cabal bug is https://github.com/haskell/cabal/issues/4655, and it seems like it would require extensive changes to git-annex's source code to work around this cabal behavior.
I managed to build git-annex with GHC 8.2.1 on Linux by removing a bunch of Win32/OSX modules from the cabal file and another small fix. However, there are two test failures when running git-annex test. Do you think it's related to the GHC version?
All other tests are working, though.
Versions:
The changes to build: https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/git-annex&id=e75ed0bdf9748df000aa584e0ebff3b7d56b76d6
Thanks for working on this!
It's entirely possible that the quickcheck tests happen to generate better test data under the new ghc, and have found an actual bug. I doubt that it's related to your changes.
I do need git-annex to remain buildable on OSX and Windows. What basically needs to be done is, instead of sed-ing those files out of the cabal file, make the cabal file say "if os(windows)" to conditionally include the modules that only work on one OS.
I've updated the cabal file, it should build now. Although unfortunately the breaking changes to cabal are such that it might still fail to build with some OS's and some combinations of build flags, where it used to build before. I only tested on Linux with stack (modified for resolver: nightly-2017-08-17)
As to the quickcheck failures, I think that's the same problem I already fixed in da8e84efe997fcbfcf489bc4fa9cc835ed131d3a.
Thanks! 6.20170818 does build with Cabal 2.0.0. However, I'm still seeing the too many open files error. The log is here: https://gist.github.com/ilovezfs/5dabc76086ba4b028b1eae7f301a5219