Why applications compiled with DTS wont load libstdc++ and libgcc_s libraries for DTS?

Solution In Progress - Updated -

Issue

  • We have developed some c++ dynamic libraries and compiled under Red Hat Developer Toolset 4 using "scl enable devtoolset-4" command with gcc 5.3.1 version.
  • These libraries are used by a java application which dynamically loads them on startup. The problem is that, when the java process starts, we look the process memory mappings in "/proc/pid/smaps" and find out that the old gcc and stdlib library versions are loaded. We tried to use the command "source scl_source enable devtoolset-4" before starting the java process, but result is the same.
  • Could you please suggest any solution? The target is: library should be compiled under 5.x version of c++ and appropriate libraries should be loaded during the java application load. Here is some output from the smaps:
cat /proc/32322/smaps | grep gcc 
385cc00000-385cc16000 r-xp 00000000 fd:00 7602652                        /lib64/libgcc_s-4.4.7-20120601.so.1
385cc16000-385ce15000 ---p 00016000 fd:00 7602652                        /lib64/libgcc_s-4.4.7-20120601.so.1
385ce15000-385ce16000 rw-p 00015000 fd:00 7602652                        /lib64/libgcc_s-4.4.7-20120601.so.1
cat /proc/32322/smaps |grep libstdc
385d400000-385d4e8000 r-xp 00000000 fd:00 8922338                        /usr/lib64/libstdc++.so.6.0.13
385d4e8000-385d6e8000 ---p 000e8000 fd:00 8922338                        /usr/lib64/libstdc++.so.6.0.13
385d6e8000-385d6ef000 r--p 000e8000 fd:00 8922338                        /usr/lib64/libstdc++.so.6.0.13
385d6ef000-385d6f1000 rw-p 000ef000 fd:00 8922338                        /usr/lib64/libstdc++.so.6.0.13

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content