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

problem building alacritty #153304

Closed
dbarrosop opened this issue Jan 3, 2022 · 10 comments
Closed

problem building alacritty #153304

dbarrosop opened this issue Jan 3, 2022 · 10 comments

Comments

@dbarrosop
Copy link
Contributor

Describe the bug

Since this morning alacritty fails to build with the following error:

...
test zerowidth ... ok(B
test vim_simple_edit ... ok(B
test history ... ok(B
test vim_large_window_scroll ... ok(B
test vim_24bitcolors_bce ... ok(B
test row_reset ... ok(B

test result: ok(B. 40 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s

   Doc-tests alacritty_config_derive

running 0 tests

test result: ok(B. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests alacritty_terminal

running 1 test
test src/term/mod.rs - term::test::mock_term (line 1885) ... FAILED(B

failures:

---- src/term/mod.rs - term::test::mock_term (line 1885) stdout ----
Couldn't compile the test.

failures:
    src/term/mod.rs - term::test::mock_term (line 1885)

test result: FAILED(B. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.12s

error: test failed, to rerun pass '--doc'
error: builder for '/nix/store/yjzmbna9yga17j3nxw22kkc75i65kq8k-alacritty-0.9.0.drv' failed with exit code 101

Steps To Reproduce

Just run

nix-env -f '<nixpkgs>' -iA alacritty

Expected behavior

Alacritty should build succesfully.

Screenshots

N/A

Additional context

N/A

Notify maintainers

@Br1ght0ne @Mic92 @Ma27

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix-shell -p nix-info --run "nix-info -m"

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
these 2 paths will be fetched (0.34 MiB download, 2.06 MiB unpacked):
  /nix/store/7jxjm2ghxmyswmbz9l69nzq1q09n7v5h-bash-interactive-5.1-p12-doc
  /nix/store/mwbn53zx1q26vn62741icrc8yp2lsfrs-bash-interactive-5.1-p12-dev
copying path '/nix/store/7jxjm2ghxmyswmbz9l69nzq1q09n7v5h-bash-interactive-5.1-p12-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/mwbn53zx1q26vn62741icrc8yp2lsfrs-bash-interactive-5.1-p12-dev' from 'https://cache.nixos.org'...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.2.0, macOS 12.1`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.5.1`
 - channels(dbarroso): `"darwin, home-manager, nixpkgs-22.05pre343039.61d24cba728"`
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
 - nixpkgs: `/Users/dbarroso/.nix-defexpr/channels/nixpkgs`
@cideM
Copy link
Contributor

cideM commented Jan 3, 2022

Seems specific to MacOS. I can reproduce this on my M1 machine, not on NixOS. Not sure if it's even specific to aarch64-darwin as opposed to x86_64-darwin.

Update:
I can install it if I take alacritty from

{
      pkgsCompat = import unstable {
        system = "x86_64-darwin";
      };
}

so it appears to be specific to aarch64

@azuwis
Copy link
Contributor

azuwis commented Jan 3, 2022

It also failed on aarch64-linux https://hydra.nixos.org/build/162176062/nixlog/1/tail

@hexagonal-sun
Copy link
Contributor

The list of commits that caused the breakage is here. I see that rustc was updated, maybe a compiler regression? I'm currently bisecting to see which commit caused the issue.

@hexagonal-sun
Copy link
Contributor

Bisect finished. Looks like this is a compiler regression:

f56f3f7dccb39d31bee9c8f6abb4b225a2b6cd9b is the first bad commit
commit f56f3f7dccb39d31bee9c8f6abb4b225a2b6cd9b
Author: Alyssa Ross <hi@alyssa.is>
Date:   Thu Dec 2 20:35:42 2021 +0000

    rustc: 1.56.1 -> 1.57.0

@alyssais Any ideas on what may be causing the issue?

@sneedcat
Copy link
Contributor

sneedcat commented Jan 3, 2022

Bisect finished. Looks like this is a compiler regression:

f56f3f7dccb39d31bee9c8f6abb4b225a2b6cd9b is the first bad commit
commit f56f3f7dccb39d31bee9c8f6abb4b225a2b6cd9b
Author: Alyssa Ross <hi@alyssa.is>
Date:   Thu Dec 2 20:35:42 2021 +0000

    rustc: 1.56.1 -> 1.57.0

@alyssais Any ideas on what may be causing the issue?

It's probably this regression rust-lang/rust#91671 .

@veprbl veprbl added 6.topic: darwin Running or building packages on Darwin 6.topic: rust and removed 6.topic: darwin Running or building packages on Darwin labels Jan 4, 2022
@pnkfelix
Copy link

pnkfelix commented Jan 4, 2022

So far, the main takeaway from my investigation in rust-lang/rust#91671 is that the thing that 1.57.0 did that injected this problem is that it started passing along the LTO (link-time optimzation) flags down into rustdoc generated code. We did not use to do this. But now that we have started, it has started exposing LTO-related issues that were masked before.

I would be curious to know if your problem here is indeed LTO-related. Do you know if link-time optimization is enabled in this alacritty build?

@sneedcat
Copy link
Contributor

sneedcat commented Jan 5, 2022

So far, the main takeaway from my investigation in rust-lang/rust#91671 is that the thing that 1.57.0 did that injected this problem is that it started passing along the LTO (link-time optimzation) flags down into rustdoc generated code. We did not use to do this. But now that we have started, it has started exposing LTO-related issues that were masked before.

I would be curious to know if your problem here is indeed LTO-related. Do you know if link-time optimization is enabled in this alacritty build?

I checked the v0.9.0 branch of alacritty and it is built with lto for release. If you cargo test alacritty without LTO in release, the tests don't fail, so the bug is related to LTO on aarch64.

@lilyball
Copy link
Member

lilyball commented Jan 7, 2022

I'm getting this problem with skim. Like alacritty, skim has lto = true in its release profile. Commenting that out allows skim to compile.

@breuerfelix
Copy link

is there any workaround instead of using the intel version? i would like to update my system again :D

@azuwis
Copy link
Contributor

azuwis commented Jan 17, 2022

is there any workaround instead of using the intel version? i would like to update my system again :D

You can use overlays to disable check:

# overlays.nix
[
  (self: super: {
    alacritty = super.alacritty.overrideAttrs (
      o: rec {
        doCheck = false;
      }
    );
  })
]

@Mic92 Mic92 closed this as completed in 5947b9e Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants