datalad / git-annex

A non-official clone of git-annex established for DataLad purposes. No PRs will be merged, but could be used to test perspective git-annex patches. Official git-annex repository: https://git.kitenet.net/index.cgi/git-annex.git/
17 stars 3 forks source link

Issues building git-annex on macOS #90

Closed jwodder closed 3 years ago

jwodder commented 3 years ago

Starting with the build for the 8.20211011 release a week ago, builds of git-annex on macos-latest have been failing with:

aws                              > configure
aws                              > /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3: /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3: cannot execute binary file

--  While building package aws-0.21.1 (scroll up to its section to see the error) using:
      /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3 [snip]
    Process exited with code: ExitFailure 126
make[1]: *** [git-annex] Error 1
make: *** [osxapp] Error 2

If I build git-annex locally on my MacBook, the build of the aws dependency succeeds, but it fails at the git-annex compilation proper due to a lack of Cocoa. If try to build aws-0.21.1 (the version that git-annex uses) on GitHub Actions, it fails with:

[22 of 81] Compiling Aws.DynamoDb.Core ( Aws/DynamoDb/Core.hs, dist/build/Aws/DynamoDb/Core.o, dist/build/Aws/DynamoDb/Core.dyn_o )

Aws/DynamoDb/Core.hs:1253:5: error:
    ‘fail’ is not a (visible) method of class ‘Monad’
     |
1253 |     fail msg = Parser $ \kf _ks -> kf msg
     |     ^^^^

git-annex had no change in the version of aws it uses in this last release, but the aws package itself had a metadata revision a couple hours before our initial build of 8.20211011.

cc @joeyh

joeyh commented 3 years ago

John T. Wodder II wrote:

Starting with the build for the 8.20211011 release a week ago, builds of git-annex on macos-latest have been failing with:

aws > configure aws > /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3: /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3: cannot execute binary file

-- While building package aws-0.21.1 (scroll up to its section to see the error) using: /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3 [snip] Process exited with code: ExitFailure 126 make[1]: [git-annex] Error 1 make: [osxapp] Error 2

git-annex had no change in the version of aws it uses in this last release, but the aws package itself had a metadata revision a couple hours before our initial build of 8.20211011.

The revision adds a dep on aeson <1.6, and the git-annex stack.yaml uses aeson 1.4.2.0, so I don't see how the revison could cause this. But I don't know what could cause this kind of build failure, it could even be that the revision uses a newer cabal file format than is supported by the old toolchain the autobuilder is using.

I've updated the stack configuration for the OSX build to use the previous revision.

If I build git-annex locally on my MacBook, the build of the aws dependency succeeds, but it fails at the git-annex compilation proper due to a lack of Cocoa. If try to build aws-0.21.1 (the version that git-annex uses) on GitHub Actions, it fails with:

[22 of 81] Compiling Aws.DynamoDb.Core ( Aws/DynamoDb/Core.hs, dist/build/Aws/DynamoDb/Core.o, dist/build/Aws/DynamoDb/Core.dyn_o )

Aws/DynamoDb/Core.hs:1253:5: error: ‘fail’ is not a (visible) method of class ‘Monad’ | 1253 | fail msg = Parser $ \kf _ks -> kf msg | ^^^^

This was fixed in aws-0.22, as part of its ghc 8.8 support (MonadFail).

The OSX build is using a stack.yaml pinned to an older ghc, 8.6.3. Last time we tried to upgrade, there were build failures, but that was on the old autobuilder. Seems worth a try to update it; I'll try that today.

-- see shy jo