Article 127077 of comp.os.vms: Path: nntpd.lkg.dec.com!btgmax.zko.dec.com!whitman From: whitman@btgmax.zko.dec.com (Sandra Whitman) Newsgroups: comp.os.vms Subject: Re: VMS 6.2/SYS_ERRLIST patch? Date: 15 Aug 1995 14:53:40 GMT Organization: Digital Equipment Corporation Lines: 199 Distribution: world Message-ID: <40qcdk$ba5@nntpd.lkg.dec.com> References: <40d53b$kdo@ics.com> Reply-To: whitman@tle.enet.dec.com NNTP-Posting-Host: btgmax.zko.dec.com X-Newsreader: mxrn 6.18-9 In article <40d53b$kdo@ics.com>, john%ics.com (John Zawada) writes: |>I'm trying to obtain the SYS_ERRLIST patch for VMS 6.2. Apparently |>it was removed from starlet in VMS 6.2. Does anyone know where |>I can get it? Is there a FTP site that has this? |> |>John |> |> -< Stars article with workaround >- -------------------------------------------------------------------------------- [DEC C] %LINK-I-UDFSYM, SYS_ERRLIST %LINK-I-UDFSYM, SYS_NERR Any party granted access to the following copyrighted information (protected under Federal Copyright Laws), pursuant to a duly executed Digital Service Agreement may, under the terms of such agreement copy all or selected portions of this information for internal use and distribution only. No other copying or distribution for any other purpose is authorized. Copyright (c) Digital Equipment Corporation 1995. All rights reserved. PRODUCT: DEC C for OpenVMS Alpha OP/SYS: OpenVMS Alpha Version(s) 6.2 COMPONENT: STARLET SOURCE: Digital Equipment Corporation SYMPTOM: Re-linking some C objects after upgrading to OpenVMS Alpha V6.2, results in linker warnings similar to the following: %LINK-W-NUDFSYMS, 2 undefined symbols: %LINK-I-UDFSYM, SYS_ERRLIST %LINK-I-UDFSYM, SYS_NERR %LINK-W-USEUNDEF, undefined symbol SYS_NERR referenced in psect $LINK$ offset %X000000A0 in SNLER FOO file device:[directory]filename.type;version %LINK-W-USEUNDEF, undefined symbol SYS_ERRLIST referenced in psect $LINK$ offset %X000000A8 in module SNLER file device:[directory]filename.type;version DIGITAL RESPONSE: Engineering is aware of this issue. An ECO is currently being prepared to correct the problem. Until the ECO is completed, Digital is providing C and MACRO sources in this article that will resolve this problem. WORKAROUND: Use one of the following workarounds: o Recompile the module using DEC C for OpenVMS ALPHA V4.1 or later, if possible. o Modify your link to include SYS$LIBRARY:DECC$SYS_ERRLIST.OBJ. o Insert DECC$SYS_ERRLIST.OBJ into SYS$LIBRARY:STARLET.OLB. This article includes the source code in both C and MACRO to build DECC$SYS_ERRLIST.OBJ. Once this module is built it should be placed into SYS$LIBRARY and may be inserted into SYS$LIBRARY:STARLET.OLB, if you wish. ANALYSIS: Prior to OpenVMS Alpha V6.2 the symbols SYS_NERR and SYS_ERRLIST were available in SYS$LIBRARY:STARLET.OLB. DEC C RTL entries in starlet should be prefixed by DECC$. Since this was not the case for SYS_NERR and SYS_ERRLIST, they were causing "name pollution" in STARLET and were removed in OpenVMS ALPHA V6.2. Compiling with DEC C V4.1 or later on OpenVMS ALPHA V6.2 systems will generate references to DECC$GL_SYS_NERR and DECC$GA_SYS_ERRLIST which will be resolved via the DEC C RTL. Compiling with a version of DEC C prior to V4.1 on OpenVMS Alpha V6.2 systems will not generate the prefixed references. This will cause the link to fail. If you cannot recompile your programs on OpenVMS ALPHA V6.2 with DEC C V4.1 or later, engineering has provided a workaround which consists of a source program (which can be written in either C or MACRO called DECC$SYS_ERRLIST.C or DECC$SYS_ERRLIST.MAR respectively) and a command file (DECC$SYS_ERRLIST.COM). The source program (DECC$SYS_ERRLIST.C or DECC$SYS_ERRLIST.MAR) is used to resolve references to SYS_NERR and SYS_ERRLIST. The source needs to be either compiled or assembled (depending on your choice of language) into DECC$SYS_ERRLIST.OBJ and then moved to SYS$LIBRARY. DECC$SYS_ERRLIST.COM is provided to insert DECC$SYS_ERRLIST.OBJ back into STARLET if you chose to do this. It will cause name pollution, which may not be an issue for your environment. DECC$SYS_ERRLIST.COM should be moved to SYS$LIBRARY. The sources for DECC$SYS_ERRLIST.C, DECC$SYS_ERRLIST.MAR, DECC$SYS_ERRLIST.COM are listed here along with the steps for using them. 1. Create either DECC$SYS_ERRLIST.C or DECC$SYS_ERRLIST.MAR. Note: It is not necessary to have the DEC C compiler installed on your system to be able to link or run DEC C programs. For sites that do not have the DEC C compiler, use the MACRO code in step 1.B to resolve these undefined symbols. 1.A Creating DECC$SYS_ERRLIST.C $ create DECC$SYS_ERRLIST.C # pragma extern_model save # pragma extern_model relaxed_refdef char *sys_errlist[] = {"",0}; int sys_nerr = 0; # pragma extern_model restore Compile DECC$SYS_ERRLIST.C. $ cc DECC$SYS_ERRLIST 1.B Creating DECC$SYS_ERRLIST.MAR $ create DECC$SYS_ERRLIST.MAR .PSECT $LITERAL$, PIC, CON, REL, LCL, SHR, NOEXE, RD, NOWRT ZERO: .ASCII <0> .PSECT SYS_ERRLIST, NOPIC, OVR, REL, GBL,NOSHR, NOEXE, RD, WRT SYS_ERRLIST:: .ADDRESS ZERO .long 0 .PSECT SYS_NERR, NOPIC, OVR, REL, GBL,NOSHR, NOEXE, RD, WRT SYS_NERR:: .LONG 0 .end Assemble the MACRO code. $MACRO decc$sys_errlist 2. Move DECC$SYS_ERRLIST.OBJ to SYS$LIBRARY 3. Create DECC$SYS_ERRLIST.COM $! $! Copyright 1995 by Digital Equipment Corporation. All rights reserved. $! $! DECC$SYS_ERRLIST.COM $! $! This command procedure inserts the module SYS$LIBRARY:DECC$SYS_ERRLIST.OBJ $! into the SYS$LIBRARY:STARLET.OLB object library. This module defines two $! symbols named SYS_ERRLIST and SYS_NERR which may be needed to resolve $! undefined symbols in your LINK command. $! $! If a LINK command results in one or both of these symbols being undefined, $! then we recommend that you take one of the following corrective actions: $! $! o Recompile the module using DEC C for OpenVMS ALPHA V4.1 or later, or $! o Modify your link to include SYS$LIBRARY:DECC$SYS_ERRLIST.OBJ, or $! o Have the system manager invoke this command procedure $! $! Invoking this command procedure will make these two symbols automatically $! available to the LINKER via STARLET. $! $! These symbols were removed from STARLET beginning in OpenVMS Alpha V6.2. $! Only symbols prefixed with the facility specific prefix should be found $! in STARLET. This avoids the possibility of two separate facilities $! defining the same symbol. $! $! The reason we are supplying this object file and command procedure is $! that versions of the DEC C compiler prior running on pre-OpenVMS ALPHA V6.2 $! systems could generate references to these unprefixed symbols. SYS_NERR $! and SYS_ERRLIST will be prefixed as of OpenVMS V6.2. $! $ $ LIBRARY SYS$LIBRARY:STARLET.OLB SYS$LIBRARY:DECC$SYS_ERRLIST.OBJ $ 4. Move DECC$SYS_ERRLIST.COM to SYS$LIBRARY 5. To resolve references to SYS_NERR or SYS_ERRLIST link with SYS$LIBRARY: DECC$SYS_ERRLIST.OBJ directly. Or invoke SYS$LIBRARY:DECC$SYS_ERRLIST.COM to insert this object module into SYS$LIBRARY:STARLET.OLB -- Sandra Whitman, ZK2-3/N30 Whitman@tle.enet.dec.com Digital Equipment Corporation decwrl!tle!whitman 110 Spit Brook Rd, Nashua, NH 03062