<?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: _mcount unresolved in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729431#M655538</link>
    <description>If you compile your shlib with -G, you must link your application with -G.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;aCC -b -mt -Wl,+b,/usr/lib:. -lCsup -lCsup_v2 -lstd_v2 -lc&lt;BR /&gt;&lt;BR /&gt;Linking shlibs with -mt is now ignored.&lt;BR /&gt;You shouldn't link your shlib with -lc, this should be on the executable.&lt;BR /&gt;You can't link with both these shlibs: -lCsup -lCsup_v2&lt;BR /&gt;Remove the first.</description>
    <pubDate>Wed, 22 Dec 2010 06:31:29 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2010-12-22T06:31:29Z</dc:date>
    <item>
      <title>_mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729430#M655537</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We are building a shared library on HP 11.11 with aCC compiler. When we try use the .sl in our binary we get the below error message:&lt;BR /&gt; &lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol: _mcount (code)  from ../../XYX.sl&lt;BR /&gt;/usr/lib/dld.sl: Call to __sigenable() failed&lt;BR /&gt;/usr/lib/dld.sl: Not owner&lt;BR /&gt;&lt;BR /&gt;This is the command we give to build the .sl:&lt;BR /&gt;aCC -b -mt -Wl,+s -Wl,+b,/usr/lib:. -lCsup -lCsup_v2 -lstd_v2 -lcaopenssl_crypto_stub -lcaopenssl_ssl_stub -lcapki_stub -lcurl -lpcre  -llgr -lmesgparsing -lrusl -lhash -lifp -lutls -lbreg -lloc -ldlib -lireccrypt -lpcreposix -lGMSG -lGDBG -lENCK -lGLOG -lEncRpc -lmisc -lhash -lSIGN -lc &lt;BR /&gt;&lt;BR /&gt;Please share your observations.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Bhanu</description>
      <pubDate>Wed, 22 Dec 2010 05:22:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729430#M655537</guid>
      <dc:creator>bhanu405</dc:creator>
      <dc:date>2010-12-22T05:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729431#M655538</link>
      <description>If you compile your shlib with -G, you must link your application with -G.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;aCC -b -mt -Wl,+b,/usr/lib:. -lCsup -lCsup_v2 -lstd_v2 -lc&lt;BR /&gt;&lt;BR /&gt;Linking shlibs with -mt is now ignored.&lt;BR /&gt;You shouldn't link your shlib with -lc, this should be on the executable.&lt;BR /&gt;You can't link with both these shlibs: -lCsup -lCsup_v2&lt;BR /&gt;Remove the first.</description>
      <pubDate>Wed, 22 Dec 2010 06:31:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729431#M655538</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-22T06:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729432#M655539</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Thanks for the quick response. I made the changes as you suggested but the problem still exists. The other thing is that we are not linking the shlib from our application but we are using dlopen to access its functions.&lt;BR /&gt;&lt;BR /&gt;This is how I compiled the shlib:&lt;BR /&gt;&lt;BR /&gt;aCC -G -b -Wl,+s -Wl,+b,/usr/lib:. -lCsup_v2 -lstd_v2 -lcaopenssl_crypto_stub -lcaopenssl_ssl_stub -lcapki_stub -lcurl -lpcre -llgr -lmesgparsing -lrusl -lhash -lifp -lutls -lbreg -lloc -ldlib -lcawinHP -lireccrypt -lpcre -lpcreposix -lGMSG -lGDBG -lENCK -lGLOG -lEncRpc -lmisc -lhash -lSIGN &lt;BR /&gt;&lt;BR /&gt;one more observation I made is that by using -lgprof32 option I am not getting the above errors but still the shlib fails to get loaded by the application.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Bhanu</description>
      <pubDate>Wed, 22 Dec 2010 07:10:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729432#M655539</guid>
      <dc:creator>bhanu405</dc:creator>
      <dc:date>2010-12-22T07:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729433#M655540</link>
      <description>&amp;gt;I made the changes as you suggested but the problem still exists.&lt;BR /&gt;&lt;BR /&gt;(You didn't remove -G from the compile line.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;This is how I compiled the shlib: aCC -G -b&lt;BR /&gt;&lt;BR /&gt;Any reason you are using -G?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;-lCsup_v2 -lstd_v2&lt;BR /&gt;&lt;BR /&gt;These are in the wrong order and they need to be last.  See:&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/14672/Help/distributing.htm#linking" target="_blank"&gt;http://docs.hp.com/en/14672/Help/distributing.htm#linking&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;one more observation I made is that by using -lgprof32 option I am not getting the above errors but still the shlib fails to get loaded by the application.&lt;BR /&gt;&lt;BR /&gt;What's the error?</description>
      <pubDate>Wed, 22 Dec 2010 08:27:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729433#M655540</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-22T08:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729434#M655541</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;I have recompiled the shlib with the below options:&lt;BR /&gt;&lt;BR /&gt;aCC -b -Wl,+s -Wl,+b,/usr/lib:. -lstd_v2 -lCsup_v2 -L"/usr/local/lib/" -o release.hpux/XYZ.sl &lt;ALL the="" .o="" files="" here=""&gt; -lcaopenssl_crypto_stub -lcaopenssl_ssl_stub -lcapki_stub -lcurl -lpcre -llgr -lmesgparsing -lrusl -lhash -lifp -lutls -lbreg -lloc -ldlib -lireccrypt -lpcreposix -lGMSG -lGDBG -lENCK -lGLOG -lEncRpc -lmisc -lhash -lSIGN&lt;BR /&gt;&lt;BR /&gt;and tried to dlopen with the below code :&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;    #include &lt;STDIO.H&gt;&lt;BR /&gt;    #include &lt;DLFCN.H&gt;&lt;BR /&gt;&lt;BR /&gt;    int main(int argc, char **argv) {&lt;BR /&gt;        void *handle;&lt;BR /&gt;        double (*cosine)(double);&lt;BR /&gt;        char *error;&lt;BR /&gt;&lt;BR /&gt;        handle = dlopen ("./XYZ.sl", RTLD_LAZY);&lt;BR /&gt;        if (!handle) {&lt;BR /&gt;            fputs (dlerror(), stderr);&lt;BR /&gt;            exit(1);&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;        /*func = dlsym(handle, "cos");&lt;BR /&gt;        if ((error = dlerror()) != NULL)  {&lt;BR /&gt;            fputs(error, stderr);&lt;BR /&gt;            exit(1);&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;        printf ("%f\n", (*cosine)(2.0));&lt;BR /&gt;        */&lt;BR /&gt;        dlclose(handle);&lt;BR /&gt;    } &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and I get the below error: &lt;BR /&gt;&lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol: _mcount (code)  from ./BABiSponsor11UX.sl&lt;BR /&gt;ABORT instruction (core dumped)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please share your observations:&lt;BR /&gt;Ths os and comapiler versions are:HP-UX bso-sdhp B.11.23 U 9000/800 and aCC: HP ANSI C++ B3910B A.03.90&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Bhanu&lt;/DLFCN.H&gt;&lt;/STDIO.H&gt;&lt;/STDLIB.H&gt;&lt;/ALL&gt;</description>
      <pubDate>Wed, 22 Dec 2010 11:21:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729434#M655541</guid>
      <dc:creator>bhanu405</dc:creator>
      <dc:date>2010-12-22T11:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729435#M655542</link>
      <description>&amp;gt;-lstd_v2 -lCsup_v2&lt;BR /&gt;&lt;BR /&gt;As I mentioned, these must be the very last aC++ shlibs on the link line.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;dld.sl: Unresolved symbol: _mcount (code) from ./BABiSponsor11UX.sl&lt;BR /&gt;&lt;BR /&gt;You need to rebuild this shlib without -G.  Or possibly add -lgprof to it.</description>
      <pubDate>Wed, 22 Dec 2010 11:37:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729435#M655542</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-22T11:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729436#M655543</link>
      <description>Yes, in my last post i rebuilt without the -G option only.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Dec 2010 11:47:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729436#M655543</guid>
      <dc:creator>bhanu405</dc:creator>
      <dc:date>2010-12-22T11:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729437#M655544</link>
      <description>&amp;gt;I rebuilt without the -G option only.&lt;BR /&gt;&lt;BR /&gt;Then what is your current problem/error?</description>
      <pubDate>Wed, 22 Dec 2010 12:10:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729437#M655544</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-22T12:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729438#M655545</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;I have tried it once more today , but no luck. I tried compiling the shlib with the below options :&lt;BR /&gt;&lt;BR /&gt;aCC -b -Wl,+s -Wl,+b,/usr/lib:.   -L"/usr/local/lib/" -o release.hpux/XYZ.sl -lcaopenssl_crypto_stub -lcaopenssl_ssl_stub -lcapki_stub -lcurl -lpcre -llgr -lmesgparsing -lrusl -lhash -lifp -lutls -lbreg -lloc -ldlib -lireccrypt -lpcreposix -lGMSG -lGDBG -lENCK -lGLOG -lEncRpc -lmisc -lhash -lSIGN -lstd_v2 -lCsup_v2 -lgprof32 -lpthread &lt;BR /&gt;&lt;BR /&gt;Changes i made:&lt;BR /&gt;1) added -lgprof32 and removed -G&lt;BR /&gt;2) added -lpthread as there was a "Can't dlopen() a library containing Thread Local Storage: /usr/lib/libpthread.1"  error&lt;BR /&gt;3) Removed -lCsup since -lCsup_v2 is present in the link line and placed "-lstd_v2 -lCsup_v2" at the end of the link line.&lt;BR /&gt;&lt;BR /&gt;Every time i try to load the shlib with the application, I get one consistent error i.e&lt;BR /&gt;&lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol: _mcount (code)  from ./XYZ.sl&lt;BR /&gt;ABORT instruction (core dumped)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please suggest your changes...&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Bhanu</description>
      <pubDate>Thu, 23 Dec 2010 11:18:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729438#M655545</guid>
      <dc:creator>bhanu405</dc:creator>
      <dc:date>2010-12-23T11:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729439#M655546</link>
      <description>&amp;gt;aCC -b -o XYZ.sl -lcaopenssl_crypto_stub -lcaopenssl_ssl_stub -lcapki_stub -lcurl -lpcre -llgr -lmesgparsing -lrusl -lhash -lifp -lutls -lbreg -lloc -ldlib -lireccrypt -lpcreposix -lGMSG -lGDBG -lENCK -lGLOG -lEncRpc -lmisc -lhash -lSIGN -lstd_v2 -lCsup_v2 -lgprof32 -lpthread&lt;BR /&gt;&lt;BR /&gt;You shouldn't add -lpthread to shlibs.&lt;BR /&gt;(Are you sure it isn't just -lgprof?)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;1) added -lgprof32 and removed -G&lt;BR /&gt;&lt;BR /&gt;Have you recompiled any archive or shlib that you previously compiled with -G?&lt;BR /&gt;You can find these with:&lt;BR /&gt;-Wl,-y_mcount&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2) added -lpthread as there was a "Can't dlopen() a library containing Thread Local Storage: /usr/lib/libpthread.1" error&lt;BR /&gt;&lt;BR /&gt;You need to add -lpthread to your executable, not your shlib.  In fact, why are you adding it at all?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I get one consistent error i.e&lt;BR /&gt;&amp;gt;Unresolved symbol: _mcount (code) from ./XYZ.sl&lt;BR /&gt;&lt;BR /&gt;You need to hunt down that object and recompile it.</description>
      <pubDate>Thu, 23 Dec 2010 11:38:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729439#M655546</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-23T11:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729440#M655547</link>
      <description>_mcount seems to be a function from lprof or gprof. pls let me know if there is any system library i am supposed to add to the link line.</description>
      <pubDate>Thu, 23 Dec 2010 12:02:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729440#M655547</guid>
      <dc:creator>bhanu405</dc:creator>
      <dc:date>2010-12-23T12:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: _mcount unresolved</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729441#M655548</link>
      <description>&amp;gt;_mcount seems to be a function from lprof or gprof.&lt;BR /&gt;&lt;BR /&gt;I assumed it was in -lgprof.&lt;BR /&gt;But better to remove ALL uses of -G and get your application working before you attempt to use -G.</description>
      <pubDate>Thu, 23 Dec 2010 12:36:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mcount-unresolved/m-p/4729441#M655548</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-12-23T12:36:03Z</dc:date>
    </item>
  </channel>
</rss>

