question

Upvotes
Accepted
9 4 5 6

RTO C++ SDK Upgrade issue

We were using C++ SDK 2.0.1.L2.Linux(EMA) these years. In order to switch to auth V2, we plan to upgrade to SDK 2.1.2.L1.linux first and then switch to auth V2.

Here is what I changed,

1. Replace old Ema source files with new files in Real-Time-SDK-2.1.2.L1.linux/setup/RTSDK-2.1.2.L1.linux.rrg/Cpp-C/Ema/Src/


2. Replace old libema.a file with new file in Real-Time-SDK-2.1.2.L1.linux/setup/RTSDK-2.1.2.L1.linux.rrg/Cpp-C/Ema/Libs/RHEL8_64_GCC831/Optimized/libema.a

3. Replace old librssl.so and librsslVA.so with new version from Real-Time-SDK-2.1.2.L1.linux/setup/RTSDK-2.1.2.L1.linux.rrg/Cpp-C/Eta/Libs/RHEL8_64_GCC831/Optimized/Shared/

4. Add header files and cpp files from ETA, Real-Time-SDK-2.1.2.L1.linux/setup/RTSDK-2.1.2.L1.linux.rrg/Cpp-C/Eta/Include and Real-Time-SDK-2.1.2.L1.linux/setup/RTSDK-2.1.2.L1.linux.rrg/Cpp-C/Eta/Impl


When I did all four steps and tried to complie the old program, there are a lot of errors. The main issue is the error in rtratomic.h, but I do not know which step goes wrong.



Do you know why this happened and how to fix the issue?

#technologyema-apic++refinitiv-realtime-sdklinux
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @Xueying

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Upvote
Accepted
79.2k 251 52 74

@Xueying

According to the output file, the cmake also built the EMA library.

[  0%] Building CXX object CMakeFiles/MDS2.dir/include/ema/Rdm/Impl/DataDictionary.cpp.o
In file included from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Rdm/Impl/DataDictionaryImpl.h:21:0,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Rdm/Impl/DataDictionary.cpp:11:
/home/ait/uat/US/MDS/git/ait/MDS2/include/eta/Impl/Util/Include/rtr/rtratomic.h:324:2: error: #error "RTR_ATOMIC operations are not implemented on this platform."
 #error "RTR_ATOMIC operations are not implemented on this platform."
  ^
In file included from /home/ait/uat/US/MDS/git/ait/MDS2/include/eta/Include/Util/rtr/rsslTypes.h:19:0,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/eta/Include/Codec/rtr/rsslState.h:16,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Access/Impl/Utilities.h:24,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Access/Impl/EmaList.h:13,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Access/Impl/ItemInfo.h:14,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Access/Impl/ClientSession.h:14,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Access/Impl/ExceptionTranslator.h:14,
                 from /home/ait/uat/US/MDS/git/ait/MDS2/include/ema/Rdm/Impl/DataDictionary.cpp:10:
/home/ait/uat/US/MDS/git/ait/MDS2/include/eta/Include/Util/rtr/os.h:150:22: error: ‘RTR_I64’ does not name a type
 #define RTR_LONGLONG RTR_I64
                      ^

If you run the application on the supported platform, you can link to the pre-built libraries that are available in the package. There is no need to rebuild the EMA and ETA libraries.

I created a simple cmake file to build the Cons113 example.

It looks like this:

project(Examples)
cmake_minimum_required(VERSION 3.0)
add_executable(Consumer113 Consumer.cpp Consumer.h)
target_include_directories(Consumer113 PUBLIC
        /opt/refinitiv/Real-Time-SDK/Cpp-C/Ema/Src/Include
        /opt/refinitiv/Real-Time-SDK/Cpp-C/Ema/Src
        /opt/refinitiv/Real-Time-SDK/Cpp-C/Ema/Src/Rdm/Include
        )
target_link_libraries(Consumer113 PUBLIC
        rt
        dl
        /opt/refinitiv/Real-Time-SDK/Cpp-C/Ema/Libs/OL7_64_GCC485/Optimized/Shared/libema.so
        )

It uses the target_include_directories command to add the include paths and uses the target_include_directories command to add the required libraries.

The created executable file can run properly on the machine.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Jirapongse

You are right. There is no need to rebuild EMA and ETA cpp files. I only need libema.so, librssl.so, librsslVA.so and some EMA header files. It now works fine. Thank you very much!

Upvotes
79.2k 251 52 74

@Xueying

Thank you for reaching out to us.

I never use the copying or replacing files method to upgrade the API.

Typically, to upgrade the API, I modify a Makefile by changing the include and library paths to the new version of the API.

You may try to build the examples in the SDK to make sure that the examples can be built properly on the machine.

How did you build the example (make or cmake)?


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Jirapongse

When we built our program last time in 2021, we modified a lot from the original SDK. In order to make our program clean and organized by our own structure, we dropped some folders and files we do not need. Therefore, the structure is not the same as the original SDK. It will take much time and efforts to build from scratch, so I try to simply replace the old libs and include files with new ones from new SDK version.

We use cmake the build our program.

CMakeLists.txt

@Xueying

Can you share the output of cmake and errors?

I will try to verify the problem.

However, you may need to contact the API support team directly to verify this issue.

@Jirapongse

Thank you for help checking. The error message did not give much information about the problem, so we do not know what caused the issue. If you can help verify the possible issue, we can try to fix that at next step.

make_output.txt

make-output.txt (163.6 KiB)
@Xueying

Moreover, please verify the operating system and compiler used to build the application. The supported operating systems and compilers are in the API Compatibility Matrix.


@Jirapongse

We have been using Red Hat Enterprise Linux 7.3 and gcc version 4.8.5, which are still supported from the compatibility matrix.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.