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

Conference turris::decc

Title:DECC
Notice:General DEC C discussions
Moderator:TLE::D_SMITHNTE
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2212
Total number of notes:11045

2071.0. "Multiple decc$shr.exe collision" by CPEEDY::PRINDLE () Mon Jan 27 1997 13:27

We are currently experiencing some problems in our build system with some
undefined references.  More specifically:

%LINK-W-NUDFSYMS, 3 undefined symbols:
%LINK-I-UDFSYM,         DECC$$GA___CTYPET
%LINK-I-UDFSYM,         DECC$$GL___CTYPEA
%LINK-I-UDFSYM,         DECC$$GL___ISCLOCALE

The problem is the system the builds are executed on is Alpha 6.2 but we want it
built as if it is on Alpha 6.1.  Can't run 6.1 but that is another story. So to
do this there is a 6.1 directory containing all the shareables found in
imagelib.olb along with some other stuff.  The logical sys$library is redefined
to be a search list first pointing to the 6.1 directory and then to the running
system.  We also run different version of the decc compiler by putting it
in separate directories and defining the necessary logicals.  In this case
we are using V5.2.  The problem is when the cc command is invoked it is using
the running version of the decc$shr.exe file which contains the symbols listed
above, verified with an anal/image command.  When linked the decc$shr image
from the 6.1 library is being used which does not contain the above symbols. Now
a simple define of decc$shr pointing to disk:[6.1 directory]decc$shr.exe
resolves part of the problem.  I would like to only define the logical for each
invocation of the C compiler.  I'm worried about potential problems with other
things that might be invoked during the build and not liking that decc$shr
image. The build consist of DCL, MMS, and CMS.  A simple redefinition of the
rule for invoking C to do a define/user decc$shr works good except when the
action line for a target is NOT defaulted to the builtin rule.  Is there any
thing I can do on the compile line to use the old version of decc$shr.exe.

Thanks in advance

Wayne
T.RTitleUserPersonal
Name
DateLines
2071.1$ CC/DEFINE=(__VMS_VER=60100000)HYDRA::NEWMANChuck Newman, 508/467-5499 (DTN 297), MRO1-3/F26Mon Jan 27 1997 13:320
2071.2already triedCPEEDY::PRINDLEMon Jan 27 1997 13:5110
We have defined the __VMS_VER macro but it does not help with the DECC$SHR
image. Only works with the .H files checking the running VMS version via
the __VMS_VER macro


thanks,

	Wayne

2071.3How To Back-Compile With DEC C...XDELTA::HOFFMANSteve, OpenVMS EngineeringMon Jan 27 1997 14:1028
    
    I was able to get all this to work through several steps -- they
    are mentioned elsewhere in this conference, but I'll repost a
    synopsis here:
    
    First, CC/DECC/DEFINE=__VMS_VERS... to the expected value, when
    compiling.  (This gets the correct header files...)
    
    Then DEFINE/USER DECC$SHR just before the compilation, using a
    version of the DECC$SHR from the target version of OpenVMS.
    
    The DECC$SHR requirement gets a little more interesting when the
    SQLPRE tool is in use, which is the reason I requested a compiler
    switch be added the specification of the target DECC$SHR image.
    I do have a creative (ugly?) way to issue the needed DEFINE/USER
    command just before SQLPRE invokes DEC C: where SQLPRE wants a
    "CC" symbol, specify the name of a command procedure.  (Here's
    the ugly part: since SQLPRE invokes the compiler symbol with some
    qualifiers, one must specify a bogus parameter on the invocation,
    and ignore it (reading P2 through P8 into the "real" CC command)
    inside the command procedure:
    
    	$ CC == "@command nla0:"
    
    The above gets DCL to accept qualifers as parameters, and not as
    qualifiers for the "@" operator.)  The procedure can invoke the
    DEFINE/USER just before the compilation.
    
2071.4are you sure all the stuff was compiled with 60100000?TAVENG::BORISBoris Gubenko, ISEMon Jan 27 1997 16:4638
%LINK-W-NUDFSYMS, 3 undefined symbols:
%LINK-I-UDFSYM,         DECC$$GA___CTYPET
%LINK-I-UDFSYM,         DECC$$GL___CTYPEA
%LINK-I-UDFSYM,         DECC$$GL___ISCLOCALE

  I wonder how these symbols became visible if all the stuff was compiled with
  /define=(__VMS_VER=60100000).

  The only header declaring these symbols is <ctype.h> and the declarations
  are protected with __VMS_VER >= 60200000 condition, as follows:

/******************************************************************************
**
**  OpenVMS V6.2 and later
**
******************************************************************************/
#if __VMS_VER >= 60200000

#   define __ctypet    (*decc$$ga___ctypet)
#   define __ctypea    (decc$$gl___ctypea)
#   define __isclocale (decc$$gl___isclocale)

  The only header making inclusion to <ctype.h> is <wctype.h> which is totally
  protected with __VMS_VER >= 60200000 (this header was introduced in
  OpenVMS V6.2). No header makes #include to <wctype.h>.

  I compiled the program below on OpenVMS V6.2 with DECC V5.2 with
  /define=(__VMS_VER=60100000) and the object file produced could be
  linked on OpenVMS V6.1 without any problem.

#include <ctype.h>
main() { int i = isprint('a'); }
  
  Could you verify, please, that the module(s) making inclusion to <ctype.h>
  or <wctype.h> are compiled with __VMS_VER=60100000 ?

  Boris
2071.5We missed some C++ codeCPEEDY::PRINDLEMon Jan 27 1997 17:3015
Boris,

Your right.  We missed some C++ code that did not have the /define=
on it.

Is there any problem with compiling against the 6.2 decc$shr and linking
against the 6.1 decc$shr.  The share should only have new stuff added which
we did bump heads with but was able to resolve with /preifx=except=getopt
it our case.

Thanks,

Wayne


2071.6compiling against 6.2 and linking against 6.1TAVENG::BORISBoris Gubenko, ISETue Jan 28 1997 04:5924
> Is there any problem with compiling against the 6.2 decc$shr and linking
> against the 6.1 decc$shr.

  Not that I know of if the correct definitions were picked up from the
  headers by the compiler.

>                            The share should only have new stuff added which
> we did bump heads with but was able to resolve with /preifx=except=getopt
> it our case.

  A lot of new DEC C RTL functions were introduced in OpenVMS V6.2 and all of
  them are listed in the DEC C RTL entries table. getopt() is an example. As
  far as I understand, your application contains an identifier named getopt,
  perhaps, a function. You should prevent prefixing of such names by the
  compiler using the /preifx=(all,except=(...,...)) qualifier as you did for
  the getopt.

  Note, that to be prefixed by the compiler, an identifier does not need to be
  a function. Any identifier with external linkage mentioned in the DEC C 
  RTL entries table gets prefixed. See note 1991 in this conference, for
  example, for more details.

  Boris