<?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: GNV ar in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660230#M32943</link>
    <description>Ciju,&lt;BR /&gt;&lt;BR /&gt;  Since I can't see your LINK command I can only guess...&lt;BR /&gt;&lt;BR /&gt;  If you LINK against multiple libraries, remember that they're processed strictly left to right. Each library is scanned multiple times, until there is a pass through the library which doesn't resolve any new symbols. Consider:&lt;BR /&gt;&lt;BR /&gt; $ LINK PROG,LIB1/LIB,LIB2/LIB&lt;BR /&gt;&lt;BR /&gt;  Now, suppose LIB1 contains symbol Z which is not referenced from PROG, but IS referenced from routine A in LIB2, which is referenced from PROG. The linker will search LIB1 and resolve anything it can find. It will then resolve A from LIB2 and discover it needs Z. However, since we've finished with LIB1, it won't be searched again. &lt;BR /&gt;&lt;BR /&gt;  So, we fail to find a symbol that is present in the link list.&lt;BR /&gt;&lt;BR /&gt;  If we were to combine all the modules in a single library, all symbols would be resolved correctly because Z is still visible at the time the linker realises it's referenced.&lt;BR /&gt;&lt;BR /&gt;  In general libraries should be ordered from "high level" to "low level", left to right. If it's not possible to break a circularity, specifying the same library twice might help. For example:&lt;BR /&gt;&lt;BR /&gt; $ LINK PROG,LIB1/LIB,LIB2/LIB,LIB1/LIB&lt;BR /&gt;&lt;BR /&gt;or, if you know what symbols are required, include them explicitly:&lt;BR /&gt;&lt;BR /&gt; $ LINK PROG,LIB1/LIB/INCLUDE=Z,LIB2/LIB&lt;BR /&gt;</description>
    <pubDate>Mon, 31 Oct 2005 22:07:20 GMT</pubDate>
    <dc:creator>John Gillings</dc:creator>
    <dc:date>2005-10-31T22:07:20Z</dc:date>
    <item>
      <title>GNV ar</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660226#M32939</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;bash$ uname -a&lt;BR /&gt;OpenVMS VMS 0 V8.2 AlphaServer_ES40 Alpha&lt;BR /&gt;&lt;BR /&gt;bash$ cc --version&lt;BR /&gt;GNV Nov 24 2004 10:09:12&lt;BR /&gt;Compaq C V6.5-001 on OpenVMS Alpha V8.2&lt;BR /&gt;&lt;BR /&gt;I am porting a U*X library to OpenVMS and see the following problem with the GNV "ar". When trying to link  my test program I get the following:&lt;BR /&gt;&lt;BR /&gt;%LINK-I-UDFSYM,         int ACE_ARGV::add(const char *)&lt;BR /&gt;%LINK-I-UDFSYM,         ACE_ARGV::ACE_ARGV(int)&lt;BR /&gt;%LINK-I-UDFSYM,         ACE_ARGV::~ACE_ARGV()&lt;BR /&gt;&lt;BR /&gt;These are symbols which ar should have put in my library. However "lib /name/list" shows otherwise. The library pulls in stuff from over 150+ object files. I created a dummy library using just the file which contains the above symbols&lt;BR /&gt;&lt;BR /&gt;% echo .obj/ARGV.o | xargs ar c libACE2.a&lt;BR /&gt;&lt;BR /&gt;and sure enough "lib /name/list" lists them. Now my question is whats the difference between archiving one object file vs. 150+ object files. Is 'ar' doing anything special that results in the ARGV.o symbols being chopped out.&lt;BR /&gt;&lt;BR /&gt;I am sorry for the rather windy description. Ping me back if more info is needed. My problem is that I don't understand the GNV ar and the underlying OpenVMS LIBRARY utilities enough to postulate why some symbols in some scenarios are being wipped out.&lt;BR /&gt;&lt;BR /&gt;Appreciate any help...&lt;BR /&gt;&lt;BR /&gt;Ciju</description>
      <pubDate>Fri, 28 Oct 2005 12:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660226#M32939</guid>
      <dc:creator>ciju john</dc:creator>
      <dc:date>2005-10-28T12:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: GNV ar</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660227#M32940</link>
      <description>Ciju,&lt;BR /&gt;&lt;BR /&gt;I am not much familiar with GNV. As I have read  GNV ar is only a wraper around the VMS LIBRARY command. Are there any errors signaled by ar?&lt;BR /&gt;&lt;BR /&gt;I suggest you to build the library with all 150+ object files and leave out ARGV.o. Then try to insert the ARGV.o from the DCL prompt:&lt;BR /&gt;&lt;BR /&gt;$ LIBRARY/INSERT/OBJECT LIBACE2.a ARGV.o&lt;BR /&gt;&lt;BR /&gt;and see if this command reports any error or warning like %LIBRAR-W-DUPMODULE or %LIBRAR-E-DUPGLOBAL.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Fri, 28 Oct 2005 13:39:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660227#M32940</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2005-10-28T13:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: GNV ar</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660228#M32941</link>
      <description>Are you offering any clues as to the "ar"&lt;BR /&gt;command(s) used?&lt;BR /&gt;&lt;BR /&gt;If you do a LIBR /LIST on the library, what's&lt;BR /&gt;special about the missing modules/symbols,&lt;BR /&gt;compared with the stuff which made it into the&lt;BR /&gt;library?&lt;BR /&gt;&lt;BR /&gt;If there was a single long "ar" command, it's&lt;BR /&gt;conceivable that it became a too-long LIBR&lt;BR /&gt;command, and that the items at the end got&lt;BR /&gt;lost.  (But I've never tried any of this, so&lt;BR /&gt;what do I know?)</description>
      <pubDate>Fri, 28 Oct 2005 14:35:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660228#M32941</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2005-10-28T14:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: GNV ar</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660229#M32942</link>
      <description>Ciju,&lt;BR /&gt;&lt;BR /&gt;Afaik, ar program is used to insert/replace the objects into the object lib (OLB). These OLB (150+objects files) will be linked while creating images. The above error may be because your ar program misses to add these obj files (member) into your object lib as part of GNV-make processing.&lt;BR /&gt;&lt;BR /&gt;GNV-make will search for any changes (new versions) with all the sources, header files, obj's  and exe's used inside the makefiles. If there is any change with any source, GNV make look for a "compile rule", so &lt;BR /&gt;1. we have to add a "compile rule". and &lt;BR /&gt;2. next we have to add another "ar rule" to create/replace this (three) new objects to your object library.&lt;BR /&gt;&lt;BR /&gt;I guess your GNV-make build procedure missing three "ar" rules inside your makefile procedures. Try adding this ar rule and create the new image and run. let see.&lt;BR /&gt;&lt;BR /&gt;Archunan</description>
      <pubDate>Fri, 28 Oct 2005 18:36:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660229#M32942</guid>
      <dc:creator>Arch_Muthiah</dc:creator>
      <dc:date>2005-10-28T18:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: GNV ar</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660230#M32943</link>
      <description>Ciju,&lt;BR /&gt;&lt;BR /&gt;  Since I can't see your LINK command I can only guess...&lt;BR /&gt;&lt;BR /&gt;  If you LINK against multiple libraries, remember that they're processed strictly left to right. Each library is scanned multiple times, until there is a pass through the library which doesn't resolve any new symbols. Consider:&lt;BR /&gt;&lt;BR /&gt; $ LINK PROG,LIB1/LIB,LIB2/LIB&lt;BR /&gt;&lt;BR /&gt;  Now, suppose LIB1 contains symbol Z which is not referenced from PROG, but IS referenced from routine A in LIB2, which is referenced from PROG. The linker will search LIB1 and resolve anything it can find. It will then resolve A from LIB2 and discover it needs Z. However, since we've finished with LIB1, it won't be searched again. &lt;BR /&gt;&lt;BR /&gt;  So, we fail to find a symbol that is present in the link list.&lt;BR /&gt;&lt;BR /&gt;  If we were to combine all the modules in a single library, all symbols would be resolved correctly because Z is still visible at the time the linker realises it's referenced.&lt;BR /&gt;&lt;BR /&gt;  In general libraries should be ordered from "high level" to "low level", left to right. If it's not possible to break a circularity, specifying the same library twice might help. For example:&lt;BR /&gt;&lt;BR /&gt; $ LINK PROG,LIB1/LIB,LIB2/LIB,LIB1/LIB&lt;BR /&gt;&lt;BR /&gt;or, if you know what symbols are required, include them explicitly:&lt;BR /&gt;&lt;BR /&gt; $ LINK PROG,LIB1/LIB/INCLUDE=Z,LIB2/LIB&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2005 22:07:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gnv-ar/m-p/3660230#M32943</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2005-10-31T22:07:20Z</dc:date>
    </item>
  </channel>
</rss>

