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

s390x issues #421

Closed
Bodigrim opened this issue Sep 11, 2021 · 0 comments · Fixed by #419
Closed

s390x issues #421

Bodigrim opened this issue Sep 11, 2021 · 0 comments · Fixed by #419
Milestone

Comments

@Bodigrim
Copy link
Contributor

Bodigrim commented Sep 11, 2021

I've been experimenting with GHC on s390x platform (IBM mainframes). There are two issues with bytestring:

  1. GHC.ByteOrder was broken somewhere between GHC 8.4 and 8.10 and returned LittleEndian unconditionally. See https://gitlab.haskell.org/ghc/ghc/-/issues/20338 and https://gitlab.haskell.org/ghc/ghc/-/issues/18445, and also Improve uniform ShortByteString random#116 (comment).
    This issue breaks bytestring tests for Builder. The simplest solution is to switch on WORDS_BIGENDIAN ourselves.

  2. fromFilePath >>= toFilePath test is problematic: it assumes that getFileSystemEncoding is either UTF-8, or UTF-16, or other Unicode-capable encoding. This is not true by default on s390x machine, where filenames are ASCII. We need to generate an ASCII-only input in such case. Also filed as https://gitlab.haskell.org/ghc/ghc/-/issues/20344

@Bodigrim Bodigrim linked a pull request Sep 11, 2021 that will close this issue
Bodigrim added a commit that referenced this issue Sep 11, 2021
* Fix detection of endianness in test suite (#421)

* Work around when getFileSystemEncoding is ASCII (#421)
Bodigrim added a commit to Bodigrim/bytestring that referenced this issue Sep 12, 2021
* Fix detection of endianness in test suite (haskell#421)

* Work around when getFileSystemEncoding is ASCII (haskell#421)
@Bodigrim Bodigrim added this to the 0.11.2.0 milestone Nov 3, 2021
noughtmare pushed a commit to noughtmare/bytestring that referenced this issue Dec 12, 2021
* Fix detection of endianness in test suite (haskell#421)

* Work around when getFileSystemEncoding is ASCII (haskell#421)
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 a pull request may close this issue.

1 participant