<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: c++ static global classes not constructed in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674047#M102792</link>
    <description>First, I don't never, ever use no gcc on HP-UX so I am speaking from ignorance but ...&lt;BR /&gt;&lt;BR /&gt;Compare the settings of the LD_PRELOAD environment variable on "good" and "bad" systems.&lt;BR /&gt;&lt;BR /&gt;Ditto with "locale -a".&lt;BR /&gt;&lt;BR /&gt;Ditto with patches especially those related to linker tools and ld.</description>
    <pubDate>Thu, 17 Nov 2005 12:04:07 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2005-11-17T12:04:07Z</dc:date>
    <item>
      <title>c++ static global classes not constructed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674046#M102791</link>
      <description>I'm trying to internationalize our product for HP-UX 11i.  I have everything building and working on some 11i systems, but others segfault when attempting to dereference a pointer to a static global c++ class instance.  When I add a printf to the constructor of this class, I see it printed out on the systems where everything works, but not on the systems where it doesn't work.  So it seems that the global class instance isn't being constructed on some systems.  &lt;BR /&gt;&lt;BR /&gt;I'm using GCC 4.0.2&lt;BR /&gt;libstdc++ is linked statically.&lt;BR /&gt;Here is my link command:&lt;BR /&gt;/usr/local/4.0.2/bin/gcc -o mcommon.o build_enhance.o load.o -lesmu -lesmsdk -lboost_regex -ldce -Wl,+n /usr/local/lib/libiconv.a /usr/lib/libdld.sl -lnsl -lsec -Wl,-a,archive_shared -lc -lm --L../../build/release/lib/hpux-hppa-11 -s -L/lib/hpux-hppa-11 -lstdc++&lt;BR /&gt;&lt;BR /&gt;The global class instance in question is created in libesmsdk.a, which is an archive library created earlier in the build processes.&lt;BR /&gt;&lt;BR /&gt;Any help is greatly appreciated!&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Nov 2005 11:47:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674046#M102791</guid>
      <dc:creator>Ryan Owen</dc:creator>
      <dc:date>2005-11-17T11:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: c++ static global classes not constructed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674047#M102792</link>
      <description>First, I don't never, ever use no gcc on HP-UX so I am speaking from ignorance but ...&lt;BR /&gt;&lt;BR /&gt;Compare the settings of the LD_PRELOAD environment variable on "good" and "bad" systems.&lt;BR /&gt;&lt;BR /&gt;Ditto with "locale -a".&lt;BR /&gt;&lt;BR /&gt;Ditto with patches especially those related to linker tools and ld.</description>
      <pubDate>Thu, 17 Nov 2005 12:04:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674047#M102792</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-11-17T12:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: c++ static global classes not constructed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674048#M102793</link>
      <description>The dynamic linker needs to be at a certain patch level. Compare the output of "what /usr/ccs/bin/ld" on machines where it works and where it does not work.</description>
      <pubDate>Fri, 18 Nov 2005 03:43:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674048#M102793</guid>
      <dc:creator>Harri Pasanen_1</dc:creator>
      <dc:date>2005-11-18T03:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: c++ static global classes not constructed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674049#M102794</link>
      <description>I've found that patch PHSS_30968 is what makes the difference.  What still doesn't make sense to me is that the objects that are not being constructed exist in statically linked libraries, not dynamic ones - so why would a patch to the dynamic linker make the difference??</description>
      <pubDate>Fri, 18 Nov 2005 10:42:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674049#M102794</guid>
      <dc:creator>Ryan Owen</dc:creator>
      <dc:date>2005-11-18T10:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: c++ static global classes not constructed</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674050#M102795</link>
      <description>Because something has to invoke these constructors. There is probably a difference in the run-time startup routines.&lt;BR /&gt;You should also note that PHSS_33033 supercedes your patch and is marked "Critical" so it's probably a good idea to update to it.</description>
      <pubDate>Fri, 18 Nov 2005 10:51:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-static-global-classes-not-constructed/m-p/3674050#M102795</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-11-18T10:51:57Z</dc:date>
    </item>
  </channel>
</rss>

