<?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: Building shared library in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072236#M808889</link>
    <description>Shiva,&lt;BR /&gt;  You need to recompile files with +z or +Z option.  Shared libraries can be built only with Position Independent code.&lt;BR /&gt;&lt;BR /&gt;  Add +z to your compiler rule in makefile.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
    <pubDate>Tue, 16 Sep 2003 12:47:10 GMT</pubDate>
    <dc:creator>Umapathy S</dc:creator>
    <dc:date>2003-09-16T12:47:10Z</dc:date>
    <item>
      <title>Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072232#M808885</link>
      <description>hi ,&lt;BR /&gt;&lt;BR /&gt;when i am trying to build a shared library using the makefile which i have i get the error ld: Unsatisfied symbols:&lt;BR /&gt;   $global$ (data)&lt;BR /&gt;   localtime (code)&lt;BR /&gt;   close (code)&lt;BR /&gt;   memset (code)&lt;BR /&gt;   __pthread_attr_init_system (code)&lt;BR /&gt;   pthread_mutex_init (code)&lt;BR /&gt;   pthread_mutexattr_destroy (code)&lt;BR /&gt;   calloc (code)&lt;BR /&gt;   system (code)&lt;BR /&gt;   pthread_mutex_unlock (code)&lt;BR /&gt;   strftime (code)&lt;BR /&gt;   open (code)&lt;BR /&gt;   free (code)&lt;BR /&gt;   pthread_mutexattr_init (code)&lt;BR /&gt;   fcntl (code)&lt;BR /&gt;   malloc (code)&lt;BR /&gt;   vsprintf (code)&lt;BR /&gt;   SM_Trace (code)&lt;BR /&gt;   gettimeofday (code)&lt;BR /&gt;   write (code)&lt;BR /&gt;   __pthread_create_system (code)&lt;BR /&gt;   pthread_mutex_destroy (code)&lt;BR /&gt;   pthread_mutex_lock (code)&lt;BR /&gt;ld: No $UNWIND_END$ subspace has been defined (probably missing /usr/ccs/lib/crt0.o)&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;the MAKEFILE has got the Foll options&lt;BR /&gt;CC_CMD=gcc -c&lt;BR /&gt;LD_SHAREDCMD=ld&lt;BR /&gt;LINK_FLAGS=&lt;BR /&gt;COMMONFLAGS=&lt;BR /&gt;&lt;BR /&gt;it fails while builing the shared object though the .o files are built.&lt;BR /&gt;please help me&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;shiva</description>
      <pubDate>Tue, 16 Sep 2003 12:24:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072232#M808885</guid>
      <dc:creator>siba</dc:creator>
      <dc:date>2003-09-16T12:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072233#M808886</link>
      <description>LD_SHAREDCMD=ld -b&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Tue, 16 Sep 2003 12:28:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072233#M808886</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-09-16T12:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072234#M808887</link>
      <description>thanks for replying. then i give -b option i get &lt;BR /&gt;&lt;BR /&gt; ld -b  plugin_util.o unixdef.o -o libSM_Utils.so&lt;BR /&gt;ld: DP relative code in file unixdef.o - shared library must be position&lt;BR /&gt;    independent.  Use +z or +Z to recompile.&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;any clues</description>
      <pubDate>Tue, 16 Sep 2003 12:31:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072234#M808887</guid>
      <dc:creator>siba</dc:creator>
      <dc:date>2003-09-16T12:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072235#M808888</link>
      <description>Your code must be compiled with +Z option for PIC code (ANSI compiler , man cc)&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;JL</description>
      <pubDate>Tue, 16 Sep 2003 12:44:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072235#M808888</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2003-09-16T12:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072236#M808889</link>
      <description>Shiva,&lt;BR /&gt;  You need to recompile files with +z or +Z option.  Shared libraries can be built only with Position Independent code.&lt;BR /&gt;&lt;BR /&gt;  Add +z to your compiler rule in makefile.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
      <pubDate>Tue, 16 Sep 2003 12:47:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072236#M808889</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-09-16T12:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072237#M808890</link>
      <description>sorry guys... i dont think i got u correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;my make file has the following options&lt;BR /&gt;the MAKEFILE has got the Foll options &lt;BR /&gt;CC_CMD=gcc -c &lt;BR /&gt;LD_SHAREDCMD=ld &lt;BR /&gt;LINK_FLAGS= &lt;BR /&gt;COMMONFLAGS= &lt;BR /&gt;&lt;BR /&gt;libSM_Utils.so:$(OBJS)&lt;BR /&gt;                $(LD_SHAREDCMD) $(LINK_FLAGS) $(OBJS) -o libSM_Utils.so&lt;BR /&gt;&lt;BR /&gt;.c.o:&lt;BR /&gt;        $(CC_CMD) $(COMMONFLAGS) $(INCLUDE_FLAG) -c $&amp;lt;&lt;BR /&gt;&lt;BR /&gt;i tried giving +z in COMMONFLAGS i.e. COMMONFLAGS=+z but the same problem.&lt;BR /&gt;&lt;BR /&gt;any help would be of great help.</description>
      <pubDate>Tue, 16 Sep 2003 12:55:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072237#M808890</guid>
      <dc:creator>siba</dc:creator>
      <dc:date>2003-09-16T12:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072238#M808891</link>
      <description>Shiva,&lt;BR /&gt;  You are using gcc. So use -fPIC during compilation.&lt;BR /&gt; COMMONFLAGS= -fPIC.&lt;BR /&gt;   check man gcc for more details.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
      <pubDate>Tue, 16 Sep 2003 12:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072238#M808891</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-09-16T12:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072239#M808892</link>
      <description>thanks for the response umapathy but i am sorry umapathy i forgot to mention that i have already created an alias for gcc as gcc -fPIC.&lt;BR /&gt;&lt;BR /&gt;even if i give the -fPIC option in COMMONFLAGS it still gives me the same option.&lt;BR /&gt;&lt;BR /&gt;can i use +Z option anywhere so that i dont get the ld error</description>
      <pubDate>Tue, 16 Sep 2003 13:08:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072239#M808892</guid>
      <dc:creator>siba</dc:creator>
      <dc:date>2003-09-16T13:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072240#M808893</link>
      <description>thanks it works... actually the problem was i had created an alias of gcc as gcc -fPIC -fpic which was wrong.&lt;BR /&gt;thanks a lot umapathy</description>
      <pubDate>Tue, 16 Sep 2003 13:11:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072240#M808893</guid>
      <dc:creator>siba</dc:creator>
      <dc:date>2003-09-16T13:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072241#M808894</link>
      <description>the flags are +z for cc/aCC and -fpic for gcc. if the linker says you should use +Z, the gcc equivalent flag is -fPIC.</description>
      <pubDate>Tue, 16 Sep 2003 13:41:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072241#M808894</guid>
      <dc:creator>ranganath ramachandra</dc:creator>
      <dc:date>2003-09-16T13:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Building shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072242#M808895</link>
      <description>If you use gcc for compiling then you &lt;BR /&gt;have to use gcc for LINKING either.&lt;BR /&gt;Command line:&lt;BR /&gt;gcc -shared &lt;OBJECT files="" and="" library=""&gt; -o libxxx.sl&lt;/OBJECT&gt;</description>
      <pubDate>Thu, 18 Sep 2003 08:33:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/building-shared-library/m-p/3072242#M808895</guid>
      <dc:creator>Lev Assinovsky</dc:creator>
      <dc:date>2003-09-18T08:33:26Z</dc:date>
    </item>
  </channel>
</rss>

