-
Notifications
You must be signed in to change notification settings - Fork 417
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 error: read-only reference ‘value’ used as ‘asm’ output #2343
Comments
@marcalff : So, is this also a simple matter of calling the right overload? Or perhaps const-casting? Anyway, I would gladly try to build from a bugfix branch. |
First, please clarify which version of opentelemetry-cpp is used. Regarding the error seen, the content of https://github.com/google/benchmark/blob/main/include/benchmark/benchmark.h#L535-L541
This sounds like a bug in google benchmark itself: if the Now, this header files has a few ifdef, in particular with BENCHMARK_HAS_CXX11 and friends. Please clarify, and double check, which c++ options are used for this build (C++11/C++14/C++17/etc). |
I encountered this issue too. I'm using OpenSUSE Leap 15.4 with gcc 7.5.0. I cloned the I tried this twice, once setting -DCMAKE_CXX_STANDARD=17 and once -DCMAKE_CXX_STANDARD=14. I had the same issue without setting the C++ standard at all. I'd let you know the versions of |
@marcalff : Ah, yes, sorry. I followed the INSTALL.md instructions and used the main branch. See edit of initial comment. |
After investigations, it turns out that:
It seems this bug has been present for a long time, this is not a recent regression (opentelemetry-cpp changes to abandon C++11, or recent changes in benchmark). Failed to build with:
|
Filed upstream as: as this looks like a problem in the benchmark header files with the work around implemented for GCC. |
@marcalff : Can you suggest a workaround while an actual fix is in progress? For my purposes, I could skip benchmarking entirely. I just need it to work, working fast can be deferred. I'm also quite rusty with CMake so short, simple instructions would be greatly appreciated. |
An obvious work around is to skip benchmarks entirely, which requires no code change:
|
@marcalff : Thanks for that. Just remember that what's obvious for project developers is not always obvious to users, so it's a good thing to point this kind of stuff out when bugs are filed. |
Describe your environment
Steps to reproduce
What is the expected behavior?
Build should have concluded successfully
What is the actual behavior?
During build, got the error:
Additional context
N/A
The text was updated successfully, but these errors were encountered: