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

tonic-health fails to build when RUSTFLAGS="-Cpanic=abort" #496

Closed
BenChand opened this issue Nov 20, 2020 · 2 comments
Closed

tonic-health fails to build when RUSTFLAGS="-Cpanic=abort" #496

BenChand opened this issue Nov 20, 2020 · 2 comments

Comments

@BenChand
Copy link

Bug Report

Version

tonic-health v0.2.0
└── tonic-build v0.3.1

Platform

Linux ben-XPS-13-9380 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Crates

tonic-health="0.2"

Description

  1. Clone this repository

  2. export RUSTFLAGS="-Cpanic=abort"

  3. cd tonic-health

  4. cargo build

Cargo build fails and results in the following error:

error: failed to run custom build command for `tonic-health v0.2.0 (/home/ben/tonic/tonic-health)`

Caused by:
  process didn't exit successfully: `/home/ben/tonic/target/debug/build/tonic-health-667a60089c432488/build-script-build` (signal: 6, SIGABRT: process abort signal)

The requirement for using the -Cpanic=abort flag is for code coverage. See https://github.com/mozilla/grcov. To get the correct coverage level, we need to compile our project with this flag, but tonic-health prevents this.

@AndiDog
Copy link

AndiDog commented Jan 8, 2021

How did you solve it? I'm seeing this with tonic-build 0.3.1 with prost 0.6.1 and my build.rs aborts. Usage of -Cpanic=abort is also for grcov. I tried running cargo build first and then overriding the flags while running the tests via grcov, but that doesn't work.

@BenChand
Copy link
Author

@AndiDog I didn't manage to solve it, I moved to the rust nightly feature for code coverage:

rust-lang/rust#34701

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