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

Build failure with ghc 8.10.3 and 8.10.4 #1083

Closed
carlocab opened this issue Feb 17, 2021 · 4 comments
Closed

Build failure with ghc 8.10.3 and 8.10.4 #1083

carlocab opened this issue Feb 17, 2021 · 4 comments
Labels
build system Related to Cryptol's build system

Comments

@carlocab
Copy link

I'm updating Homebrew's version of ghc from 8.10.3 to 8.10.4 here: Homebrew/homebrew-core#70817

Homebrew CI tests all packages that depend on ghc, and this revealed a build failure for cryptol (on macOS 10.14, 10.15, and 11.2), with the following message:

src/Cryptol/Backend/FloatHelpers.hs:194:40: error:
    • Couldn't match expected type ‘Word’ with actual type ‘Int’
    • In the first argument of ‘precBits’, namely ‘(p' + 1)’
      In the first argument of ‘(<>)’, namely ‘precBits (p' + 1)’
      In the second argument of ‘(<>)’, namely
        ‘precBits (p' + 1) <> allowSubnormal’
    |
194 |   opts       = expBits e' <> precBits (p' + 1) <> allowSubnormal
    |                                        ^^^^^^

Upon testing, it seems I get this same build error with 8.10.3 as well, though I'm not sure what's changed since then. Assistance on this would be appreciated.

Build logs available at https://github.com/Homebrew/homebrew-core/actions/runs/571177255 (ignore the 11-arm failure, since ghc does not build on Apple M1)

On 11.2, the crpytol build starts at https://github.com/Homebrew/homebrew-core/runs/1909553886?check_suite_focus=true#step:7:166

@yav
Copy link
Member

yav commented Feb 17, 2021

This is probably because cryptol didn't have an upper bound on its dependency of libBF and libBF had an update which is not compatible with the previous one. To make it work you'd need to use libBF-0.5.1

I'll leave this open because we still don't have an upper bound on libBF and we should add one to avoid this sort of thing in the future.

@carlocab
Copy link
Author

carlocab commented Feb 17, 2021

Thanks; that does seem to work: https://github.com/Homebrew/homebrew-core/actions/runs/575623369

At least, it worked on macOS 10.14. Still waiting on 10.15 and 11.2.

I noticed that the libBF dependency is declared differently on master:

libBF >= 0.6 && < 0.7,

I take it pinning this dependency should no longer be needed in the next version?

@robdockins
Copy link
Contributor

Correct, the next release should no longer require pinning to libBF=0.5.1

@robdockins robdockins added the build system Related to Cryptol's build system label Mar 3, 2021
@robdockins
Copy link
Contributor

I believe the new release should have resolved this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Related to Cryptol's build system
Projects
None yet
Development

No branches or pull requests

3 participants