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

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3248.0. "Inso-Electronic Publishing Solutions" by HYDRA::LNARAYAN () Fri Feb 28 1997 11:16

    Company Name :  Inso-Electronic Publishing Solutions
    Contact Name :  Richard T. Simpson
    Phone        :  401-421-9550
    Fax          :  1-401-421-9551
    Email        :  [email protected]
    Date/Time in :  28-FEB-1997 11:16:13
    Entered by   :  L. Narayan
    SPE center   :  MRO

    Category     :  UNIX
    OS Version   :  V4.0
    System H/W   :  Alpha


    Brief Description of Problem:
    -----------------------------

From:	SMTP%"[email protected]" 28-FEB-1997 09:53:38.63
To:	[email protected]
CC:	
Subj:	Some Questions on DEC OSF vs Digital Unix

Return-Path: [email protected]
Received: by asimov.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
	Fri, 28 Feb 1997 09:53:36 -0500
Received: from pobox1.pa.dec.com by fluid.mro.dec.com; (5.65v3.2/1.1.8.2/19Nov96-0448PM)
	id AA21524; Fri, 28 Feb 1997 09:53:44 -0500
Received: by pobox1.pa.dec.com; id AA21595; Fri, 28 Feb 97 06:53:46 -0800
Received: from kirk.ebt.com by mail2.digital.com (5.65 EXP 4/12/95 for V3.2/1.0/WV)
	id AA25936; Fri, 28 Feb 1997 06:43:25 -0800
Received: from kahn (kahn [198.112.118.55]) by ebt-inc.ebt.com (8.6.12/8.6.9) with SMTP id JAA18395; Fri, 28 Feb 1997 09:42:40 -0500
Message-Id: <3.0.32.19970228094020.005b0790@pop>
X-Sender: rts@pop
X-Mailer: Windows Eudora Pro Version 3.0 (32)
Date: Fri, 28 Feb 1997 09:44:10 -0500
To: [email protected]
From: Rich Simpson <[email protected]>
Subject: Some Questions on DEC OSF vs Digital Unix
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

We are in the process of determining whether we will develop the next
version of our product for Digital on DEC OSF/1 V3.x or on
Digital Unix 4.0. Since there are customers of our product who have
not yet upgraded to 4.0, there is a preference in stay with 3.x.
However, we have made some significant enhancements to our product
for this release which have caused problems with the development
tools on other platforms.

What I am interested in is what the significant differences are in the
development tools and associated OS support between 3.x and 4.0.
If there are limiations on 3.x that are addressed in 4.0, that will
push us toward using 4.0.

In particular, I am interested in the following areas:

C++ Exceptions: 
	Are exceptions supported on both releases and are there any
	significant limitations in either release?

	Are there differences in the way C++ exceptions
	are handled or supported between the two releases? 

	Is it necessary for all C++ shared libraries that are incorporated
	in an application to have exceptions enabled in order to be
	able to inter-operate or is it sufficient to have the
	top level exe of the application?

Templates:
	Are templates suported on both releases and are there significant
	differences in the support?

	Is the instantiation of templates in shared libraries supported
	in both releases?

C++ Static Initializers:
	We have had problems ensuring the order of static initializers
	in shared libraries for C++. Are there any significant differences
	between the releases.

Shared Libraries:
	We use a mix of shared libraries, some of which are automatically
	loaded at application startup, others of which are dynamically
	loaded during execution. Because of this, we tend to stress
	the capabilities of systems in the areas of synamic resolution
	of symbols for shared libraries. Are there any significant
	differences in this area between the releases?

Thanks for your help.


Richard T. Simpson                                        [email protected]
Inso-Electronic Publishing Solutions  Tel:1-401-421-9550   FAX: 1-401-421-9551
(formerly Electronic Book Technologies)
One Richmond Square                                   Providence, RI 02906 USA
T.RTitleUserPersonal
Name
DateLines
3248.1reply sentHYDRA::LNARAYANMon Mar 03 1997 11:31146
From:	HYDRA::LNARAYAN     "R Lakshminarayan, Software Partner Engg"  3-MAR-1997 11:30:34.26
To:	US4RMC::"[email protected]"
CC:	LNARAYAN
Subj:	your questions relating to C++ and Digital UNIX

Richard T. Simpson

Thanks for contacting Alpha developer support. The following writeup
has answers for for your questions. Please do not hesitate to contact us
if you need further help.

Thank You
Nari
-Alpha developer Support


Please be aware that the DEC C++ compiler product is sold and packaged
separately from the underlying Digital UNIX operating system.  Any questions
relating to language features provided by the compiler, rather than the runtime
libraries, are not affected by the version of UNIX in use.  The latest version
of DEC C++/Alpha/UNIX, V5.5, requires Digital UNIX V3.2 or later.

So, staying at UNIX V3.2 will not currently prevent you from using the latest
compiler.  However, this does not mean that all future releases of DEC C++ will
run on V3.2 - some day DEC C++ will probably require V4.0 or later.  (I don't
know when that might occur, however).


>C++ Exceptions: 
>	Are exceptions supported on both releases and are there any
>	significant limitations in either release?
>
>	Are there differences in the way C++ exceptions
>	are handled or supported between the two releases?


  Ada, C (SEH), C++, and the native exceptions facility (libexc) all work
  fine together (even before V4.0) because Ada, C, and C++ exceptions are
  layered on top of the native exceptions facility.  They can co-exist
  in the same program and catch each other's exceptions.  If an Ada or
  C exception propagates thru a C++ frame, the C++ runtime handler will
  make sure the proper destructors get called.

  DECthreads exceptions were a problem because they used their own
  home-grown mechanism.  However, as of V4.0, DECthreads exceptions
  now also uses libexc.

  However, there are some things you should keep in mind:

  1. You cannot use DECthreads exception mechanisms inside of an Ada
     function.  I doubt it will even compile.

  2. As of v4.0, DECthreads handlers can catch Ada, C, and C++
     exceptions, and vice-versa.

  3. You might want to avoid using DECthreads exceptions support in a
     function that also uses C or C++ exceptions support.  I think it
     is supposed to work, but it may still have problems.

     Note that C++ provides implicit exception handling to ensure
     that destructors get called.  Hence, you should be careful
     about using DECthreads exception support in C++.


>	Is it necessary for all C++ shared libraries that are incorporated
>	in an application to have exceptions enabled in order to be
>	able to inter-operate or is it sufficient to have the
>	top level exe of the application?

What does it mean for a shared library to "have exceptions enabled"?  Are you
referring to whether or not the code was compiled with the -nocleanup switch to
disable calls to destructors upon stack unwinding?

Packaging code in shared libraries has no interaction with -nocleanup: If you
want auto and temporary object destructors to execute when a stack frame unwinds
from an exception, the module containing the function must be compiled without
-nocleanup.  On the other hand, static and file-scope objects with destructors
are executed upon dlclose (or exit) regardless of whether or not -nocleanup was
used.


>Templates:
>	Are templates suported on both releases and are there significant
>	differences in the support?

Templates are supported by the compiler - I know of no differences in building
or runnning template programs between the UNIX V3.2 and V4.0 environments.


>	Is the instantiation of templates in shared libraries supported
>	in both releases?

Code generated by manual template instantiation can be loaded anywhere. 
Planning the maintenance of any libraries, shared (.so) or static (.a), which
contain automatically instantiated templates requires familiarity with the
"Using Templates" chapter (5) of _Using DEC C++ for Digital UNIX_ manual,
particularly �5.2.9 (Building Libraries and Applications). Please let me know
if you like to have a copy of the same.


>C++ Static Initializers:
>	We have had problems ensuring the order of static initializers
>	in shared libraries for C++. Are there any significant differences
>	between the releases.

The ld(1) linker in Digital UNIX V4.0 supports a "-reverse_init_order" linker
option which could possibly be of some assistance.  For workarounds, you may
consider the following

1.  Move the definitions of the relevant variables into a single module, and
    put the definitions in the correct order.
2.  Reverse the order of the linking for the relevant modules
        -or-
3.  Utilize the "nifty_counter" workaround described on pp. 20-21 of ARM �3.4 
    (Start and Termination) to render their code portable.


>Shared Libraries:
>	We use a mix of shared libraries, some of which are automatically
>	loaded at application startup, others of which are dynamically
>	loaded during execution. Because of this, we tend to stress
>	the capabilities of systems in the areas of synamic resolution
>	of symbols for shared libraries. Are there any significant
>	differences in this area between the releases?

I'm not aware of any differences between the base operating systems.  (Neither
am I aware of any outstanding bugs in dlopen(3)/dlsym(3), particularly with
respect to DEC C++).

Note, however that several bugs in dlclose(3) processing of destructors have
been fixed in support code shipped with the DEC C++ compiler in the past year.
The most important fix was first shipped with DEC C++/Alpha/UNIX V5.3,
this kit fixes the following problems:

        In V5.1-1, a throw from a switch statement incorrectly
        executed destructors for other case arms.

        With V5.1-1, incorrect code was generated in some cases
        when compiling with  "-O -xtaso_short -vptr_size_short".

        With V5.1-1, the compiler could not be invoked by a
        command other than cxx.
================================================================================