Skip to content

0.7.1.0 Fails to build on macOS M1 using GHC 9.2.1 #132

@arafangion

Description

@arafangion

Just reporting that language-javascript seems to fail on macOS using the M1 architecture (Arm64), and I'm not sure how to make it pass:

bash-3.2$ locale
LANG="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_CTYPE="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_ALL=
bash-3.2$ LC_ALL=en_AU.UTF-8 cabal install language-javascript
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):
 - language-javascript-0.7.1.0 (lib) (requires build)
Starting     language-javascript-0.7.1.0 (lib)
Building     language-javascript-0.7.1.0 (lib)

Failed to build language-javascript-0.7.1.0.
Build log (
/Users/johnchapman/.cabal/logs/ghc-9.2.1/lngg-jvscrpt-0.7.1.0-62cfd969.log ):
Configuring library for language-javascript-0.7.1.0..
Warning: Packages using 'cabal-version: >= 1.10' and before 'cabal-version:
3.4' must specify the 'default-language' field for each component (e.g.
Haskell98 or Haskell2010). If a component uses different languages in
different modules then list the other ones in the 'other-languages' field.
Preprocessing library for language-javascript-0.7.1.0..
happy: src/Language/JavaScript/Parser/Grammar7.y: hGetContents: invalid argument (invalid byte sequence)
cabal: Failed to build language-javascript-0.7.1.0. See the build log above
for details.

bash-3.2$

Activity

Daniel-Diaz

Daniel-Diaz commented on Apr 21, 2022

@Daniel-Diaz

I ran into this same issue. Doing export LANG=C.UTF-8 made it work (in ubuntu-20.04.4 LTS).

joeyh

joeyh commented on Mar 7, 2023

@joeyh

The sole unicode symbol in that file is ∉, which is used in a comment. Removing that character fixes the build on non-unicode locales.

joeyh

joeyh commented on Mar 7, 2023

@joeyh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @joeyh@Daniel-Diaz@arafangion

        Issue actions

          0.7.1.0 Fails to build on macOS M1 using GHC 9.2.1 · Issue #132 · erikd/language-javascript