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

Fix build with GHC 9.2 on i386 #486

Merged
merged 2 commits into from
Feb 16, 2022
Merged

Fix build with GHC 9.2 on i386 #486

merged 2 commits into from
Feb 16, 2022

Conversation

sjakobi
Copy link
Member

@sjakobi sjakobi commented Feb 15, 2022

Fixes #484.

@Bodigrim
Copy link
Contributor

Shall we fix other __GLASGOW_HASKELL__ {<,>=} 903 conditions as well?

@sjakobi
Copy link
Member Author

sjakobi commented Feb 16, 2022

Shall we fix other __GLASGOW_HASKELL__ {<,>=} 903 conditions as well?

Maybe. Changing all of them breaks the build with 9.2.1 though. I'll take another look soon.

@sjakobi sjakobi force-pushed the sjakobi/484-fix-bound branch from 99feffd to 9ef41c6 Compare February 16, 2022 15:00
@sjakobi
Copy link
Member Author

sjakobi commented Feb 16, 2022

Shall we fix other __GLASGOW_HASKELL__ {<,>=} 903 conditions as well?

Maybe. Changing all of them breaks the build with 9.2.1 though. I'll take another look soon.

Actually it looks like the other conditionals are correct: The corresponding change to base has not been backported to the ghc-9.2 branch. See https://gitlab.haskell.org/ghc/ghc/-/issues/20777.

@sjakobi sjakobi requested a review from Bodigrim February 16, 2022 15:09
@Bodigrim
Copy link
Contributor

I'm a bit at loss here.
GHC.IntWord64 used to provide uncheckedShiftL64#, uncheckedShiftRL64#, eqWord64#, plusWord64#, wordToWord64#, word64ToWord#. Now starting from GHC 9.2 / ghc-prim-0.8 there is no such module, so where are these functions coming from on i386?

@sjakobi
Copy link
Member Author

sjakobi commented Feb 16, 2022

@Bodigrim In GHC HEAD, you can find these functions in ghc-prim: https://ghc.gitlab.haskell.org/ghc/doc/libraries/ghc-prim-0.8.0/GHC-Prim.html#g:10

In GHC 9.2.1, I can't find haddocks for them, but I think that's simply because the haddocks are generated on a 64-bit machine and therefore these functions aren't generated at all: Word64 is a wrapper for Word# here, and Word64# doesn't exist.

Ultimately I don't know whether this will compile with 9.2 on i386. We'll find out once this is run on GHC's CI infrastructure. Shall we merge and make an MR for GHC to check?

@Bodigrim Bodigrim merged commit cb629e0 into master Feb 16, 2022
@Bodigrim
Copy link
Contributor

Merged, thanks. Could you please make a GHC MR to check?

@sjakobi sjakobi deleted the sjakobi/484-fix-bound branch February 16, 2022 20:06
sjakobi added a commit that referenced this pull request Feb 16, 2022
* Fix build with GHC 9.2 on i386

Fixes #484.

* Update Data/ByteString/Builder/RealFloat/Internal.hs

Co-authored-by: ˌbodʲɪˈɡrʲim <[email protected]>

Co-authored-by: ˌbodʲɪˈɡrʲim <[email protected]>
(cherry picked from commit cb629e0)
@sjakobi
Copy link
Member Author

sjakobi commented Feb 17, 2022

Could you please make a GHC MR to check?

Done: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7592.

@Bodigrim Bodigrim added this to the 0.11.3.0 milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not find module ‘GHC.IntWord64’ on GHC 9.2 + i386
2 participants