Skip to content

Haskell language server fails to build on aarch64-darwin #194367

@tom-hodgson

Description

@tom-hodgson

Steps To Reproduce

taking the most recent commit:

nix-shell -p '(import (fetchTarball "https://github.com/nixos/nixpkgs/archive/533ca3db3cc6a1fd0645d9e800fc836a0f31b290.tar.gz") {}).haskell-language-server'

Errors with

Preprocessing executable 'fourmolu' for fourmolu-0.8.2.0..
Building executable 'fourmolu' for fourmolu-0.8.2.0..
[1 of 2] Compiling Paths_fourmolu   ( dist/build/fourmolu/autogen/Paths_fourmolu.hs, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.o, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.dyn_o )
[2 of 2] Compiling Main             ( app/Main.hs, dist/build/fourmolu/fourmolu-tmp/Main.o, dist/build/fourmolu/fourmolu-tmp/Main.dyn_o )
Linking dist/build/fourmolu/fourmolu ...
/nix/store/sxvqpkwix4hq49qxkzghc5d3s14nhcy8-clang-wrapper-11.1.0/bin/ld: line 256: 77946 Segmentation fault: 11  /nix/store/mqvr6f5jnas9909hxpil06li4fwlnb1n-cctools-binutils-darwin-949.0.1/bin/ld ${extraBefore+"${extraBefore[@]}"} ${params+"${params[@]}"} ${extraAfter+"${extraAfter[@]}"}
clang-11: error: linker command failed with exit code 139 (use -v to see invocation)
`cc' failed in phase `Linker'. (Exit code: 139)
error: builder for '/nix/store/wyw1wckb3vqvqckhj8i0zrkyrzv4nwha-fourmolu-0.8.2.0.drv' failed with exit code 1;
       last 10 log lines:
       > [54 of 55] Compiling Ormolu.Utils.Fixity ( src/Ormolu/Utils/Fixity.hs, dist/build/Ormolu/Utils/Fixity.o, dist/build/Ormolu/Utils/Fixity.dyn_o )
       > [55 of 55] Compiling Ormolu           ( src/Ormolu.hs, dist/build/Ormolu.o, dist/build/Ormolu.dyn_o )
       > Preprocessing executable 'fourmolu' for fourmolu-0.8.2.0..
       > Building executable 'fourmolu' for fourmolu-0.8.2.0..
       > [1 of 2] Compiling Paths_fourmolu   ( dist/build/fourmolu/autogen/Paths_fourmolu.hs, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.o, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.dyn_o )
       > [2 of 2] Compiling Main             ( app/Main.hs, dist/build/fourmolu/fourmolu-tmp/Main.o, dist/build/fourmolu/fourmolu-tmp/Main.dyn_o )
       > Linking dist/build/fourmolu/fourmolu ...
       > /nix/store/sxvqpkwix4hq49qxkzghc5d3s14nhcy8-clang-wrapper-11.1.0/bin/ld: line 256: 77946 Segmentation fault: 11  /nix/store/mqvr6f5jnas9909hxpil06li4fwlnb1n-cctools-binutils-darwin-949.0.1/bin/ld ${extraBefore+"${extraBefore[@]}"} ${params+"${params[@]}"} ${extraAfter+"${extraAfter[@]}"}
       > clang-11: error: linker command failed with exit code 139 (use -v to see invocation)
       > `cc' failed in phase `Linker'. (Exit code: 139)
       For full logs, run 'nix log /nix/store/wyw1wckb3vqvqckhj8i0zrkyrzv4nwha-fourmolu-0.8.2.0.drv'.
error: 1 dependencies of derivation '/nix/store/i6h6dqngdbx45nzn379z6f28ljmjwp81-hls-fourmolu-plugin-1.1.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/jmn4xd7c6wrrrnfmyxr85mqjca8vz6w2-haskell-language-server-1.8.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/iyfkzzif48j8hx2xlphbzp4rf8x3hn2r-haskell-language-server-1.8.0.0.drv' failed to build

It looks similiar to #149692 but I think this (haskell language server) will affect a wider audience.

I'm not convinced its fourmolu (or ormolu) specific because both of these commands work fine for me:

nix-shell -p '(import (fetchTarball "https://github.com/nixos/nixpkgs/archive/533ca3db3cc6a1fd0645d9e800fc836a0f31b290.tar.gz") {}).haskellPackages.fourmolu'
nix-shell -p '(import (fetchTarball "https://github.com/nixos/nixpkgs/archive/533ca3db3cc6a1fd0645d9e800fc836a0f31b290.tar.gz") {}).haskellPackages.ormolu'

I've read that it may be possible to remove fourmolu from the list of plugins, but I've not been able to find how to do this.

Notify maintainers

@maralorn

Metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.5.0, macOS 12.4`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.7.0`
 - channels(tom): `""`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failureA package fails to build6.topic: haskellGeneral-purpose, statically typed, purely functional programming language

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions