[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference lassie::ucx

Title:DEC TCP/IP Services for OpenVMS
Notice:Note 2-SSB Kits, 3-FT Kits, 4-Patch Info, 7-QAR System
Moderator:ucxaxp.ucx.lkg.dec.com::TIBBERT
Created:Thu Nov 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5568
Total number of notes:21492

5278.0. "UCX$ACCESS_SHR in non-UCX environment." by OSEC::LUNN ([email protected]) Tue Feb 25 1997 11:50

Our customer has an application which they require on VMS (Various v6)
platforms (ALPHA and VAX) using three different IP stacks (UCX,
Multinet and PathWay.) We are compiling and linking the image on the
VAX/VMS system with the UCX stack. The link includes an options file
containing the line

SYS$LIBRARY:UCX$IPC_SHR.EXE /SHARE

When the image which we create is executed on the MultiNet and PathWay
nodes it complains that it cannot find UCX$ACCESS_SHR. Supplying a 
copy of the image in SYS$LIBRARY: fixes the problem. Do I need to
supply this image as part of my installation procedure or is there
something wrong with the way we're doing this? Will the same problem
occur when we compile and link this on Alpha?

I couldn't find any information on how to do this in the online
(bookreader) docs. Am I missing a volume?

Thanks for any help,

Dave Lunn.
T.RTitleUserPersonal
Name
DateLines
5278.1Try dynamic instead of static linkingTLE::D_SMITHDuane Smith -- DEC C RTLWed Feb 26 1997 09:5033
    Since no one chimed in here, I'll give it a shot.  Your application is
    linking against SYS$LIBRARY:UCX$IPC_SHR.EXE, which in turn is linked
    against several shareable images, one being UCX$ACCESS_SHR.  The image
    activation list recorded in your image contains the transitive closure
    of all images involved, including UCX$ACCESS_SHR.
    
    Take the following example:
    
      $ TYPE TEST.C
      #include <stdio.h>
      main () {
        printf ("Hollow world\n");
      }
      $
      $ CC TEST
      $ LINK TEST, SYS$INPUT/OPT
      SYS$SHARE:UCX$IPC_SHR.EXE/SHARE
      $ 
      $ ANALYZE/IMAGE/OUTPUT=TEST.ANALYZE TEST.EXE
    
    If you look at the result of the ANALYZE/IMAGE, you will see a
    reference to UCX$ACCESS_SHR in the list.
    
    To resolve this problem (and perhaps future problems such as this), I
    would use LIB$FIND_IMAGE_SYMBOL to dynamically link against
    UCX$IPC_SHR.EXE instead of the static link.  In this way, you are 
    deferring the activation of UCX$IPC_SHR and in the case of UCX, the
    activation of UCX$ACCESS_SHR.  If Multinet does not have this secondary
    shareable image, then it will not be activated.
    
    Duane Smith
    OpenVMS DEC C RTL Project Leader
    
5278.2LASSIE::GEMIGNANIWed Feb 26 1997 13:4012
    
    Keep in mind that your application is bound to use the UCX databases
    (i.e. hosts, etc) when you link with IPC_SHR.  It is calling ACCESS_SHR
    to be able to provide access to UCX databases.
    
    I suspect that the other vendors supply a replacement UCX$IPC_SHR so
    that you can get to their databases.  Either that, or you link without
    UCX$IPC_SHR.
    
    The problem with .-1 is that you are calling certain UCX$ routines to
    provide network access, i.e. gethostbyname() and so on.  You are going
    to need some way to get those routines.
5278.3TLE::D_SMITHDuane Smith -- DEC C RTLWed Feb 26 1997 15:355
    Actually, I would prefer to see the customer make calls to the DEC C
    Runtime Library...  We do dynamic linking and work fine with other
    vendors stacks...
    
    Duane
5278.4LASSIE::GEMIGNANIWed Feb 26 1997 18:142
    Oooh.  Then why's he linking with IPC_SHR?
    
5278.5Light dawns...OSEC::LUNN[email protected]Thu Feb 27 1997 05:3510
Thanks for the responses. As you suggest, there's no need to link
against UCX$IPC_SHR at all in this case - using the standard C routines
makes everything work just fine on all three platforms.

Just out of interest, why *would* you link against UCX$IPC_SHR?

Thanks again for the insight,

Dave.
5278.6left over from a VAXC build environment maybe?HNDYMN::MCCARTHYA Quinn Martin ProductionThu Feb 27 1997 09:188
In the past, many linker options files "grew" from using VAXC.  There should
have been a rule that any linker options file was thrown out when moving to
DECC.

I'm not saying that is what happened in this case, its just something I have 
seen in many public domain examples.

bjm