Skip to content

Remove spam from output of cargo_build_scripts #572

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

Closed
wchargin opened this issue Feb 2, 2021 · 2 comments
Closed

Remove spam from output of cargo_build_scripts #572

wchargin opened this issue Feb 2, 2021 · 2 comments

Comments

@wchargin
Copy link
Contributor

wchargin commented Feb 2, 2021

I’m transitively building openssl-sys via rules_rust with build
files generated by cargo-raze. Building the crate generates a bunch of
log spam:

$ bazel build @raze__openssl_sys__0_9_60//:openssl_sys 
INFO: Analyzed target @raze__openssl_sys__0_9_60//:openssl_sys (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
INFO: From CargoBuildScriptRun external/raze__openssl_sys__0_9_60/openssl_sys_build_script.out_dir:
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
OPENSSL_LIB_DIR unset
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
OPENSSL_INCLUDE_DIR unset
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
OPENSSL_DIR unset
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = Some("/usr/bin/gcc")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "/usr/bin/gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/usr/include" "-Wall" "-Wextra" "-E" "build/expando.c"
exit code: 0
Target @raze__openssl_sys__0_9_60//:openssl_sys up-to-date:
  bazel-bin/external/raze__openssl_sys__0_9_60/libopenssl_sys--957200765.rlib
INFO: Elapsed time: 0.427s, Critical Path: 0.16s
INFO: 2 processes: 1 internal, 1 linux-sandbox.
INFO: Build completed successfully, 2 total actions

Best I can tell, these are from openssl-sys’s build script itself:

When running with normal Cargo, there’s no such spam, so I think that
our cargo_build_script_runner should suppress these lines.

edit: I’m at rules_rust-afee872f08ed67b53caab2e1d2fefd501dce81f4.

@UebelAndre
Copy link
Collaborator

I believe this was fixed in 8c388e1

@wchargin
Copy link
Contributor Author

wchargin commented Feb 2, 2021

@UebelAndre: Great; thanks for the fix and for letting me know!

(I can’t actually test it because we’ll have to upgrade past the
workspace name change from #499, which is annoying and will take some
effort. But I’m assuming that it will work, so thanks!)

@wchargin wchargin closed this as completed Feb 2, 2021
wchargin added a commit to tensorflow/tensorboard that referenced this issue Feb 4, 2021
Summary:
We upgrade to latest `rules_rust` mainly for bazelbuild/rules_rust#572.
This requires upgrading `cargo-raze` to the newly released v0.9.2, plus
a herd of interdependent changes:

  - update to `rules_rust` latest
  - rename `@io_bazel_rules_rust` to `@rules_rust`
  - update Prost `protoc` wiring (not sure exactly why the old one
    doesn’t work anymore, but the new one is nicer, anyway)
  - update doc server to remove arch name, which also makes it work when
    compiled with `-c opt`

Test Plan:
Build changes only, so that `bazel test` passes and a `--load_fast`
smoke screen looks good suffices for correctness.

To see that the `openssl-sys` build spam is gone:

```
rm -rf bazel-out/k8-opt/bin/external/raze__openssl_sys__0_9_60  # ignore EACCES
bazel build @raze__openssl_sys__0_9_60//:openssl_sys
```

wchargin-branch: rules-rust-20210203
wchargin-source: 05097a937b3ac58b873e3df69c89ddb887104a19
wchargin added a commit to tensorflow/tensorboard that referenced this issue Feb 9, 2021
Summary:
We upgrade to latest `rules_rust` mainly for bazelbuild/rules_rust#572.
This requires upgrading `cargo-raze` to the newly released v0.9.2, plus
a herd of interdependent changes:

  - update to `rules_rust` latest
  - rename `@io_bazel_rules_rust` to `@rules_rust`
  - update Prost `protoc` wiring (not sure exactly why the old one
    doesn’t work anymore, but the new one is nicer, anyway)
  - update doc server to remove arch name, which also makes it work when
    compiled with `-c opt`

Test Plan:
Build changes only, so that `bazel test` passes and a `--load_fast`
smoke screen looks good suffices for correctness.

To see that the `openssl-sys` build spam is gone:

```
rm -rf bazel-out/k8-opt/bin/external/raze__openssl_sys__0_9_60  # ignore EACCES
bazel build @raze__openssl_sys__0_9_60//:openssl_sys
```

To test the doc server:

```
bazel run //tensorboard/data/server:rustboard_core_doc_server
```

…and navigate to the listed port.

wchargin-branch: rules-rust-20210203
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

2 participants