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

[build] zellij 0.16.0 failed to build on linux #702

Closed
chenrui333 opened this issue Sep 7, 2021 · 11 comments · Fixed by #711
Closed

[build] zellij 0.16.0 failed to build on linux #702

chenrui333 opened this issue Sep 7, 2021 · 11 comments · Fixed by #711
Labels
build Issues related to the build process. suspected bug

Comments

@chenrui333
Copy link

Trying to upgrade zellij into 0.16.0, but run into some build as below:

   Compiling wasmer-engine-jit v1.0.2
   Compiling wasmer-engine-native v1.0.2
   Compiling zellij-utils v0.16.0 (/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/zellij-utils)
   Compiling wasmer v1.0.2
   Compiling zellij-client v0.16.0 (/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/zellij-client)
   Compiling wasmer-wasi v1.0.2
   Compiling zellij-server v0.16.0 (/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/zellij-server)
   Compiling zellij v0.16.0 (/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0)
error: failed to compile `zellij v0.16.0 (/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0)`, intermediate artifacts can be found at `/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target`

Caused by:
  could not compile `zellij`

Caused by:
  process didn't exit successfully: `rustc --crate-name zellij --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C metadata=61aa91a37d8bf267 -C extra-filename=-61aa91a37d8bf267 --out-dir /tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/deps -L dependency=/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/deps --extern log=/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/deps/liblog-9f072af6124bd48f.rlib --extern names=/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/deps/libnames-e58a3356042da359.rlib --extern zellij_client=/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/deps/libzellij_client-05b9cd540c15b793.rlib --extern zellij_server=/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/deps/libzellij_server-12cea61b1844aa52.rlib --extern zellij_utils=/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/deps/libzellij_utils-af5658a3ed15e377.rlib -L native=/tmp/zellij-20210907-10407-5tb47h/zellij-0.16.0/target/release/build/wasmer-vm-0fdfdb96b93c6693/out` (signal: 9, SIGKILL: kill)

full error log for linux build is in here, https://github.com/Homebrew/homebrew-core/runs/3475297710

@imsnif
Copy link
Member

imsnif commented Sep 7, 2021

@chenrui333 - looks like the bash completions failed to generate for some reason...
https://github.com/Homebrew/homebrew-core/runs/3475297710#step:7:483

Could this be a CI issue? Do they generate normally for you offline? I'm not sure why they're run in the CI, actually... but maybe I'm not understanding something.

@a-kenji
Copy link
Contributor

a-kenji commented Sep 7, 2021

I have no idea what is going on in homebrew, one first guess would be that

Utils.safe_popen_read(bin/"zellij", "setup", "--generate-completion", "bash")
    (bash_completion/"zellij").write bash_output

would need to be

Utils.safe_popen_read("#{bin}/zellij", "setup", "--generate-completion", "bash")
    (bash_completion/"zellij").write bash_output

Just like in the test section later, but that probably is not the case - since it worked earlier.

Is it possible for you to not redirect the output of the install and instead print it out?

@chenrui333
Copy link
Author

"#{bin}/zellij" is the same thing as bin/"zellij", different code style.

it worked in the zellij 0.15.0 (I can run a full regression rebuild to see how it goes with the previous release)

@a-kenji a-kenji added the build Issues related to the build process. label Sep 8, 2021
@a-kenji
Copy link
Contributor

a-kenji commented Sep 8, 2021

Ah, good to know!
I think maybe it would be good to see the output of the failed command?

@a-kenji
Copy link
Contributor

a-kenji commented Sep 8, 2021

I investigated a bit further and looked at other automated build systems.
From the nix repo, a quote from @0x4A6F:

Seems like the command now needs to open a terminal for this to succeed:

Executing cargoInstallHook
failed to open terminal:
failed to open terminal:
ENOTTYENOTTY: Not a typewriter
: Not a typewriter
failed to open terminal:
ENOTTY: Not a typewriter
Finished cargoInstallHook

For reference: NixOS/nixpkgs#136281

@a-kenji
Copy link
Contributor

a-kenji commented Sep 8, 2021

@chenrui333
Is there a way to test this locally on my machine?

@chenrui333
Copy link
Author

@a-kenji there are two ways to test locally.

docker approach

  • docker pull linuxbrew/brew
  • run image
  • brew edit zellij, and update the two lines as below
  • brew install -s zellij

if you use linux

  • install Linuxbrew
  • brew edit zellij, and update the two lines as below
  • brew install -s zellij
-  url "https://github.com/zellij-org/zellij/archive/v0.15.0.tar.gz"
-  sha256 "e8f3f190d75b89050ca7a85114ddb80aa8f03af66376452bbd5ed5c412a94e76"
+  url "https://github.com/zellij-org/zellij/archive/v0.16.0.tar.gz"
+  sha256 "beb0915ed92f32d88d26c896a57b6f30475e0f4cfec21abbc0d4cddabeaa0c09"

let me know if that works

@tlinford
Copy link
Contributor

Managed to reproduce the problem @a-kenji found with the nix build with:

true | zellij setup --check 2>&1 | cat
failed to open terminal:
ENOTTY: Not a typewriter

The problem seems to be with setting up termios before handling commands that don't need it, the linked pr solved it for me:

true | ./target/debug/zellij setup --check 2>&1 | cat
[Version]: "0.17.0"
[CONFIG DIR]: Not Found
...
[DOCUMENTATION]: zellij.dev/documentation/

@a-kenji
Copy link
Contributor

a-kenji commented Sep 12, 2021

Awesome and thanks @tlinford!
I suspect that this will also fix the brew issue.
Also thanks @chenrui333 for the instructions!
Next time there is an issue to fix I might know how to debug it then.

@a-kenji
Copy link
Contributor

a-kenji commented Sep 15, 2021

@chenrui333
The now released version 0.17.0 has the fix, and I think that it will work as expected now.

@chenrui333
Copy link
Author

Thanks @a-kenji !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to the build process. suspected bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants