We have a large application with multiple dependencies. The environment is:
- Ubuntu 16.04 LTS
- Intel® Core™ i7-7700HQ CPU @ 2.80GHz × 8
When we linked to astra_core.so, a segfault appeared at the very start of execution. Backtracking indicated the issue happened inside astra_core.so, and linked to the logging process.
After further investigation, it seemed the issue is easylogging++, which very likely was used in astra_core.so. Following that line, I managed to reproduce a minimal example using easylogging++, which is here attached. The two files easylogging++.cc and easylogging++.h come directly from https://github.com/muflihun/easyloggingpp (tag v9.96.4).
The example is a small variation of the sample ColorReaderEventCPP with an option to link against easylogging++. If you build as follows:
then it should be exactly the same as ColorReaderEventCPP and everything should work well. Please note, ASTRA_ROOT needs to be defined with the astra sdk folder.
However, if you now build as follows:
cmake -DTEST_EASYLOGGING=ON ..
Then a segfault will appear.
This is an important issue, as it seems astra_core is blocking end user applications from using similar logging strategies, and for us is a blocking point, as we are linking against other 3rd party libraries which are also closed, and using similar logging strategies.