Jammy compilation fix with log macro changes - #12959
Merged
Merged
Conversation
Contributor
Author
|
Just for the record, this is this compiler error (I did a lot of simplifying to shorten and make it more readable): |
Nir-Az
reviewed
May 26, 2024
Nir-Az
reviewed
May 26, 2024
Nir-Az
reviewed
May 26, 2024
| namespace rsutils { | ||
|
|
||
|
|
||
| extern std::string const g_librealsense_elpp_id; |
Contributor
Author
There was a problem hiding this comment.
It's the string representation of LIBREALSENSE_ELPP_ID. Internal, not for general use, and simply a performance optimization.
Nir-Az
reviewed
May 26, 2024
Nir-Az
reviewed
May 26, 2024
| { \ | ||
| std::ostringstream os__; \ | ||
| os__ << __VA_ARGS__; \ | ||
| el::base::Writer( el::Level::LEVEL, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::NormalLog ) \ |
Collaborator
There was a problem hiding this comment.
IS this the same code as implemented in CLOG?
Contributor
Author
There was a problem hiding this comment.
Yes, except the construct() call is simpler and more efficient.
Nir-Az
approved these changes
May 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recent PR #12924 introduced issues with compilations in U22 Jammy. This was not caught in GHA (only happens with DDS):
The error itself does not make sense. The offending code is
LOG_DEBUG( settings )wheresettingsis ajsonobject. And the error complains of incomplete typeDataWriterQos... What's even more confusing is that replacing withostringstream() << settingsno longer causes the error.So that's the direction of this PR:
ostringstreamand only then sending to ELPP