File rsutils.patch of Package librealsense
diff -dura librealsense-2.56.1.orig/src/gl/rs-gl.cpp librealsense-2.56.1/src/gl/rs-gl.cpp
--- librealsense-2.56.1.orig/src/gl/rs-gl.cpp 2025-04-29 14:11:11.847142365 +0100
+++ librealsense-2.56.1/src/gl/rs-gl.cpp 2025-04-29 15:51:01.244552437 +0100
@@ -270,7 +270,7 @@
#ifdef BUILD_EASYLOGGINGPP
#ifdef SHARED_LIBS
-INITIALIZE_EASYLOGGINGPP
+//INITIALIZE_EASYLOGGINGPP
#endif
char log_gl_name[] = LIBREALSENSE_ELPP_ID;
static logger_type<log_gl_name> logger_gl;
diff -dura librealsense-2.56.1.orig/src/log.cpp librealsense-2.56.1/src/log.cpp
--- librealsense-2.56.1.orig/src/log.cpp 2025-04-29 14:11:11.866004703 +0100
+++ librealsense-2.56.1/src/log.cpp 2025-04-29 15:40:51.281084280 +0100
@@ -5,7 +5,7 @@
#ifdef BUILD_EASYLOGGINGPP
-INITIALIZE_EASYLOGGINGPP
+//INITIALIZE_EASYLOGGINGPP
namespace librealsense
{
diff -dura librealsense-2.56.1.orig/third-party/rsutils/CMakeLists.txt librealsense-2.56.1/third-party/rsutils/CMakeLists.txt
--- librealsense-2.56.1.orig/third-party/rsutils/CMakeLists.txt 2025-04-29 14:11:11.935715921 +0100
+++ librealsense-2.56.1/third-party/rsutils/CMakeLists.txt 2025-04-29 15:18:46.401797311 +0100
@@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 3.8.0) # source_group(TREE)
project( rsutils )
-add_library( ${PROJECT_NAME} STATIC "" )
+add_library( ${PROJECT_NAME} SHARED "" )
# We cannot directly interface with nlohmann_json (doesn't work on bionic)
#target_link_libraries( ${PROJECT_NAME} PUBLIC nlohmann_json )
target_compile_features( ${PROJECT_NAME} PUBLIC cxx_std_14 )
@@ -47,7 +47,7 @@
PRIVATE "${REPO_ROOT}/third-party/easyloggingpp/src/easylogging++.cc" )
# We want to disable any default ELPP log-file!
target_compile_definitions( ${PROJECT_NAME}
- PUBLIC ELPP_NO_DEFAULT_LOG_FILE )
+ PUBLIC ELPP_NO_DEFAULT_LOG_FILE AUTO_INITIALIZE_EASYLOGGINGPP )
endif()
target_sources( ${PROJECT_NAME} PRIVATE ${UTILITIES_SOURCE_FILES} )
source_group(