Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Mixing 64 bit and 32 bit applications
@ 1996-06-19  4:00 Bill Kemp
  1996-06-24  4:00 ` Craig Neth
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Kemp @ 1996-06-19  4:00 UTC (permalink / raw)



We are attempting to build an application that uses:

1) A C++ Class Library
2) An ORB
3) An OODB

The C++ Library is a 64 bit application.
The ORB is a 64 bit application.
The OODB is a 32 bit application.

Compiling and linking with the OODB .so requires the -xtaso_short
compiler flag and the -taso ld flag.  The application will compile and
link successfully, however, it seems that using these flags when linking
against the 64 bit .so files for the C++ Library and ORB library is the
reason we are experiencing runtime SEGV's.

Is this the square peg/round hole problem?  Can we not compile
-xtaso_short and link -taso and expect to be able to run when linked
against a 64 bit .so?  Is this a situation where all of the 32 bit code
must be in the address space of one process and the 64 bit code must be
in the address space of another process?  I know it probably is, but has
anybody worked around this successfully?

-- 
The views/opinions expressed are my own and do not 
necessarily reflect the views of MCI Telecomminications, Inc.

Bill Kemp
MCI Telecommunication Fast Product Development
Colorado Springs, CO
(719)535-4171



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Mixing 64 bit and 32 bit applications
  1996-06-19  4:00 Mixing 64 bit and 32 bit applications Bill Kemp
@ 1996-06-24  4:00 ` Craig Neth
  1996-06-25  4:00   ` Bill Kemp
  0 siblings, 1 reply; 3+ messages in thread
From: Craig Neth @ 1996-06-24  4:00 UTC (permalink / raw)



Bill Kemp wrote:

> We are attempting to build an application that uses:
[... stuff deleted ...]
> The C++ Library is a 64 bit application.
> The ORB is a 64 bit application.
> The OODB is a 32 bit application.
> 
> Compiling and linking with the OODB .so requires the -xtaso_short
> compiler flag and the -taso ld flag.  The application will compile and
> link successfully, however, it seems that using these flags when linking
> against the 64 bit .so files for the C++ Library and ORB library is the
> reason we are experiencing runtime SEGV's.
> 
> Is this the square peg/round hole problem?  Can we not compile
> -xtaso_short and link -taso and expect to be able to run when linked
> against a 64 bit .so?  Is this a situation where all of the 32 bit code
> must be in the address space of one process and the 64 bit code must be
> in the address space of another process?  I know it probably is, but has
> anybody worked around this successfully?

When you say 'application', I assume you actually mean .so, right?

This can be made to work.  Indeed, any -xtaso (or -xtaso_short) application
that links against libc is using a 64 bit library - there is no 32 bit libc.

What's more likely to be happening is that you are passing 32 bit pointers to
api's (in libc, or in the ORB, or ???) that expect 64 bit pointers. 

How are you 'protecting' the header files of the 64 bit api's?   The system
header files describe the system interfaces, but those interfaces are all 64 bits.
When you use -xtaso_short to compile your application you change the size of a
pointer but the library doesn't change what it expects.    What needs to be done 
is to 'protect' the system interfaces from this change in pointer size by use of 
some pragmas.

The Digital C++ kit documents in the release notes one procedure that can be 
used to provide long pointer 'protection' to the header files.    The Digital 
UNIX programmers guide documents another.   If you haven't done one of these
(or inserted the pragmas yourself) that this is almost certainly the problem.

Craig
Digital UNIX Development Environment group

--------------------------------------------------------------------------------
Craig Neth                         ! neth@zk3.dec.com
Digital Equipment Corporation      ! 
110 Spit Brook Road ZKO3-3/Y25     !
Nashua, NH 03062                   ! Opinions expressed herein are my own.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Mixing 64 bit and 32 bit applications
  1996-06-24  4:00 ` Craig Neth
@ 1996-06-25  4:00   ` Bill Kemp
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Kemp @ 1996-06-25  4:00 UTC (permalink / raw)



Craig Neth wrote:
> 
> How are you 'protecting' the header files of the 64 bit api's?   The system
> header files describe the system interfaces, but those interfaces are all 64 bits.
> When you use -xtaso_short to compile your application you change the size of a
> pointer but the library doesn't change what it expects.    What needs to be done
> is to 'protect' the system interfaces from this change in pointer size by use of
> some pragmas.
> 

That is really where the rub is.  We are creating persistent C++ objects that must
be CORBA aware.  What the CORBA product forces you to do is inherit from their base
classes and link against their .so.  The subclass objects are persistently 'newed'
to create them in the data base.  This is done with the OODB and it's .so.  An extra
complication is that some of the members are types from the C++ Class Library.

If we try to 'protect' the CORBA base class includes with #pragma pointer_size here
and there, the objects are of a different size than the database schema thinks they
should be.  Its like we have to have 64 bit base classes with 32 bit subclasses
being stored in a 32 bit OODB.  The 64 bit portion of the base class is confusing 
to the OODB and if we make everything 32 bits so the OODB understands it, the CORBA
library is confused because it is 64 bits.

We have to inherit from base classes that are intrinsic to a 64 bit CORBA implementation
and persistently store the resultant classes in a 32 OODB.  The argument from the 
OODB vendor is that they support 32/64 bit heterogeneous environments and need to do
pointer swizzling on potentially multiple operating systems at once.  32 bits is the 
least common denominator.

-- 
The views/opinions expressed are my own and do not 
necessarily reflect the views of MCI Telecomminications, Inc.

Bill Kemp
MCI Telecommunication Fast Product Development
Colorado Springs, CO
(719)535-4171



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-06-25  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-06-19  4:00 Mixing 64 bit and 32 bit applications Bill Kemp
1996-06-24  4:00 ` Craig Neth
1996-06-25  4:00   ` Bill Kemp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox