Closed shtanko-sv closed 9 months ago
ETAC(and EMAC++) dynamically loads the CURL library, so the ETA and EMA libraries themselves do not have an explicit dependency on CURL. The RTSDKC libraries use dlopen() on Linux and LoadLibrary() on Windows to dynamically load the library.
If the application is expecting to use the system installed CURL, to avoid this DLL Hell scenario, please make sure that libcurl.so/libcurl.dll libraries are not in: the local directory, in other locations in the PATH before the system library location, and(for Linux) not in the LD_LIBRARY_PATH directory.
In addition, if a specific library on the system is required by your application, the libcurl library can be specified using the RsslInitializeExOpts.jitOpts.libcurlName configuration for rsslInitializeEx() for the ETAC Transport and ETAC Value Added Reactor. For EMAC++, this can be specified using OmmConsumerConfig.libcurlName(), OmmNiProviderConfig.libcurlName(), and OmmIProviderConfig.libcurlName().
Thanks for the answer, but the issue is the curl headers actually: https://github.com/Refinitiv/Real-Time-SDK/blob/25ea0a7e272cf01494f559da1866e751c015121d/Cpp-C/Eta/Impl/Transport/rsslImpl.c#L26C1-L26C1
The RTSDK CMake is setup to use the CMake downloaded CURL headers for static #defined values, so unless the version of CURL is very, very old, there shouldn't be any issues with the headers. Does the system have curl-devel installed or the headers in an accessible location for CMake's CURL find_package script?
How are you building RTSDK? If this is an in-line build(where the RTSDK cmake is added directly with addDirectory), then this should be able to be handled by running the CURL find_package prior to calling addDirectory() in the cmake script. This will stop RTSDK from loading the library and will force the build to use the specifed CURL header locations.
So we have CURL downloaded and built manually and as we already use curl directly we want that RTSDK use the same version. We use standard FindCURL.cmake on our end. To build RTSDK we use CURL_ROOT
and curl_USE_INSTALLED
cmake variables. RTSDK detects it correctly, but CURL cmake imported targets are not used actually. As a workaround we just use CMAKE_C_FLAGS directly with -I
flag.
It uses CURL, but doesn't link this imported library. It causes the issue if we use system-installed CURL, but not in standard path.