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

rust_v8 0.98.0,0.99.0 build failure #1541

Closed
chenrui333 opened this issue Jul 23, 2024 · 13 comments
Closed

rust_v8 0.98.0,0.99.0 build failure #1541

chenrui333 opened this issue Jul 23, 2024 · 13 comments

Comments

@chenrui333
Copy link

👋 while running deno 1.45.3 build, found some build failure as below:

    --- stderr
    thread 'main' panicked at /tmp/deno-20240723-18844-vtv80a/rusty_v8/build.rs:330:3:
    assertion failed: Command::new(gn()).arg(format!("--script-executable={}",
                                    python())).arg("args").arg(gn_out_dir).arg("--list").status().unwrap().success()
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/10058665735/job/27807237240?pr=178170
relates to Homebrew/homebrew-core#178170

@devsnek
Copy link
Member

devsnek commented Jul 24, 2024

Are you able to get the stdout/stderr from the command failure?

@chenrui333
Copy link
Author

still seeing the same error log in the 0.99.0 release build, how should I get the stdout/stderr logs?

    --- stderr
    thread 'main' panicked at /tmp/deno-20240727-18802-qz1dny/rusty_v8/build.rs:330:3:
    assertion failed: Command::new(gn()).arg(format!("--script-executable={}",
                                    python())).arg("args").arg(gn_out_dir).arg("--list").status().unwrap().success()
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  error: failed to compile `deno v1.45.4 (/tmp/deno-20240727-18802-qz1dny/deno/cli)`, intermediate artifacts can be found at `/tmp/deno-20240727-18802-qz1dny/deno/target`.
  To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

relates to Homebrew/homebrew-core#178635

@chenrui333 chenrui333 changed the title rust_v8 0.98.0 build failure rust_v8 0.98.0,0.99.0 build failure Jul 27, 2024
@devsnek
Copy link
Member

devsnek commented Jul 27, 2024

I think you can change this code:

assert!(Command::new(gn()).arg(format!("--script-executable={}", python())).arg("args").arg(gn_out_dir).arg("--list").status().unwrap().success());

to something like

let output = Command::new(gn()).arg(format!("--script-executable={}", python())).arg("args").arg(gn_out_dir).arg("--list").output().unwrap();
std::io::stderr().write_all(&output.stdout).unwrap();
std::io::stderr().write_all(&output.stderr).unwrap();
assert!(output.status.success());

If there's a way to reproduce the homebrew build locally I can also try to debug it at some point.

@chenrui333
Copy link
Author

@devsnek
Copy link
Member

devsnek commented Jul 27, 2024

@chenrui333 sorry i'm getting this

==> Pouring deno--1.45.4.x86_64_linux.bottle.tar.gz
cp: cannot create regular file '/home/linuxbrew/.linuxbrew/Cellar/deno/./1.45.2/bin/deno': Permission denied
cp: cannot create regular file '/home/linuxbrew/.linuxbrew/Cellar/deno/./1.45.2/bin/denort': Permission denied
Error: Failure while executing; `/usr/bin/env cp -pR /tmp/homebrew-unpack20240727-18829-1m5dz1/deno/. /home/linuxbrew/.linuxbrew/Cellar/deno` exited with 1. Here's the output:
cp: cannot create regular file '/home/linuxbrew/.linuxbrew/Cellar/deno/./1.45.2/bin/deno': Permission denied
cp: cannot create regular file '/home/linuxbrew/.linuxbrew/Cellar/deno/./1.45.2/bin/denort': Permission denied

@devsnek
Copy link
Member

devsnek commented Jul 29, 2024

Ok fixed the above, turns out the needed command is brew install --build-from-source ./deno.rb. I can reproduce the issue now. Would be helpful if brew didn't delete everything after the build failed...

@pedro-w
Copy link

pedro-w commented Jul 30, 2024

Would be helpful if brew didn't delete everything after the build failed...

Does --keep-tmp help? (https://docs.brew.sh/Manpage#commands)

@chenrui333
Copy link
Author

Would be helpful if brew didn't delete everything after the build failed...

I can actually dump out the docs from CI runner, is that good?

@devsnek
Copy link
Member

devsnek commented Aug 1, 2024

@chenrui333 --keep-tmp worked, but I can't reproduce this manually running build commands in the directory, only under brew install --build-from-source. So it seems like an issue with how brew is putting things together, but I don't know anything about brew, so a brew developer probably needs to take a look.

@devsnek
Copy link
Member

devsnek commented Aug 2, 2024

@chenrui333 can you try setting NO_PRINT_GN_ARGS=1 when building? I think that might fix it.

@chenrui333
Copy link
Author

yeah, totally.

@chenrui333
Copy link
Author

somehow it builds fine now 😓

@chenrui333
Copy link
Author

since I can no longer reproduce this issue, gonna close it now. Thanks!

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

No branches or pull requests

3 participants