-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Jammy compilation fix with log macro changes #12959
Conversation
Just for the record, this is this compiler error (I did a lot of simplifying to shorten and make it more readable):
|
|
||
namespace rsutils { | ||
|
||
|
||
extern std::string const g_librealsense_elpp_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHat is this? comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g_ ?
Not self explained..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the string representation of LIBREALSENSE_ELPP_ID
. Internal, not for general use, and simply a performance optimization.
{ \ | ||
std::ostringstream os__; \ | ||
os__ << __VA_ARGS__; \ | ||
el::base::Writer( el::Level::LEVEL, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::NormalLog ) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IS this the same code as implemented in CLOG
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, except the construct() call is simpler and more efficient.
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 )
wheresettings
is ajson
object. And the error complains of incomplete typeDataWriterQos
... What's even more confusing is that replacing withostringstream() << settings
no longer causes the error.So that's the direction of this PR:
ostringstream
and only then sending to ELPP