librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

v2.33.1 does not compile with -DBUILDEASYLOGGINGPP=OFF

Open andreaszwengINS opened this issue 6 years ago • 9 comments


Required Info
Operating System & Version Linux (Linux Mint 19.3)
SDK Version 2.33.1
Language C++

Issue Description

Since 2.33.1, we cannot compile without easyloggingpp anymore. The reason is simple: In src/log.h, there is a new struct log_message in lines 11-17 defined within the preprocessor directive #if BUILD_EASYLOGGINGPP. In src/rs.cpp this struct is then used in lines 1122-1207 outside this directive, resulting in compiler errors. Our quick fix was to wrap this part in the same preprocessor directive which compiles successfully. We did not investigate further if this causes any side effects, but so far everything works as expected.

Thank you, Kind Regards, Andreas

andreaszwengINS avatar Mar 10 '20 13:03 andreaszwengINS

Thanks so much for your report and details of your workaround!

I considered how best to label this discussion for the attention of the RealSense team. easyloggingpp is already a part of the SDK via its 'third-party' folder, so 'feature request' is not appropriate as it already exists. On the basis that easyloggingpp is an existing part of the SDK that worked before and now does not work for you without manual code changes according to your report, I will label it as "bug". I hope that this approach works for you.

MartyG-RealSense avatar Mar 10 '20 13:03 MartyG-RealSense

Sure, I just forgot the label - thanks!

andreaszwengINS avatar Mar 10 '20 14:03 andreaszwengINS

So if I wanna use easyloggingpp with the rs lib at the same time, is there any workaround now? The easyloggingpp is really useful and convenient.

7oud avatar Jun 30 '20 14:06 7oud

@7oud The listed Known Issue in the SDK release notes regarding problems using easyloggingpp is named to be with the 2.33.1 SDK version specifically. I don't know if anyone has tested easyloggingpp with newer SDK versions to see whether the problem was isolated to just that one SDK version.

MartyG-RealSense avatar Jun 30 '20 15:06 MartyG-RealSense

@MartyG-RealSense In the latest v2.35.2 release note, #6009 is still in the known issues

7oud avatar Jun 30 '20 15:06 7oud

It looks like the "pull" to clear up issues so that the updated code can be merged into the SDK is still an ongoing project.

https://github.com/IntelRealSense/librealsense/pull/6304

MartyG-RealSense avatar Jun 30 '20 15:06 MartyG-RealSense

Hi @maloel Just posting to highlight that pull https://github.com/IntelRealSense/librealsense/pull/6304 has a conflict with realsense-viewer.cpp that needs resolving. Thanks!

MartyG-RealSense avatar Aug 21 '20 14:08 MartyG-RealSense

Posting to keep this discussion open.

MartyG-RealSense avatar Sep 03 '20 08:09 MartyG-RealSense

It looks as though the pull fix https://github.com/IntelRealSense/librealsense/pull/6304 by @maloel was merged into the SDK 17 days ago at the time of writing this. I will therefore close this case as the issue has been addressed by the pull.

MartyG-RealSense avatar Sep 13 '20 07:09 MartyG-RealSense