Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Porting from Compaq Alpha to HP-UX
@ 2000-01-31  5:00 Mike Holland
  2000-01-31  5:00 ` Rick Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Mike Holland @ 2000-01-31  5:00 UTC (permalink / raw)


I need to port a large-ish application (about a million lines of 'C' code)
from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It will be
particularly entertaining because the application exchanges messages with
programs running on Windows NT.

I'm doing my initial investigations, and would be very interested to hear of
any real-life stories, hints, tips, or other experiences you have had.

TIA,

Mike Holland

hollandm@logicaDOTcom








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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00 Porting from Compaq Alpha to HP-UX Mike Holland
  2000-01-31  5:00 ` Rick Jones
  2000-01-31  5:00 ` David Peter
@ 2000-01-31  5:00 ` Bob Koehler
  2000-01-31  5:00   ` Mike Holland
  2000-01-31  5:00   ` Bob Koehler
  2 siblings, 2 replies; 21+ messages in thread
From: Bob Koehler @ 2000-01-31  5:00 UTC (permalink / raw)


In article <873qtt$fds@romeo.logica.co.uk>, "Mike Holland" <hollandm@logicaDOTcom> writes:
> I need to port a large-ish application (about a million lines of 'C' code)
> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It will be
> particularly entertaining because the application exchanges messages with
> programs running on Windows NT.
> 

Alphas running Compaq's UNIX and all systems running WNT are running in
little endian mode.  HP-UX runs in big endian mode.  If you are
exchanging binary data you will have to byte and/or word swap between
the WNT and HP.

----------------------------------------------------------------------
Bob Koehler                     | Computer Sciences Corporation
Hubble Space Telescope Payload  | Federal Sector, Civil Group
 Flight Software Team           | please remove ".aspm" when replying



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00 ` Bob Koehler
@ 2000-01-31  5:00   ` Mike Holland
  2000-02-01  5:00     ` John Neumann
  2000-02-01  5:00     ` Rick Jones
  2000-01-31  5:00   ` Bob Koehler
  1 sibling, 2 replies; 21+ messages in thread
From: Mike Holland @ 2000-01-31  5:00 UTC (permalink / raw)


Indeed!    This is made worse by the fact that some messages between the
platforms are mapped onto 'C' unions, hence the end-swapping utility needs
knowledge of the meaning of the tag fields.

Ideally, I could do with a tool which processed 'C' type definitions (plus
additional info about the tags) and produced such an end-swapping program.
This surely must have been written by someone already!

Does anyone know of such a program?

Mike Holland


Bob Koehler wrote in message <2000Jan31.083911.1@eisner>...
>In article <873qtt$fds@romeo.logica.co.uk>, "Mike Holland"
<hollandm@logicaDOTcom> writes:
>> I need to port a large-ish application (about a million lines of 'C'
code)
>> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It will be
>> particularly entertaining because the application exchanges messages with
>> programs running on Windows NT.
>>
>
>Alphas running Compaq's UNIX and all systems running WNT are running in
>little endian mode.  HP-UX runs in big endian mode.  If you are
>exchanging binary data you will have to byte and/or word swap between
>the WNT and HP.
>
>----------------------------------------------------------------------
>Bob Koehler                     | Computer Sciences Corporation
>Hubble Space Telescope Payload  | Federal Sector, Civil Group
> Flight Software Team           | please remove ".aspm" when replying





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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00 Porting from Compaq Alpha to HP-UX Mike Holland
@ 2000-01-31  5:00 ` Rick Jones
  2000-01-31  5:00 ` David Peter
  2000-01-31  5:00 ` Bob Koehler
  2 siblings, 0 replies; 21+ messages in thread
From: Rick Jones @ 2000-01-31  5:00 UTC (permalink / raw)


In comp.sys.hp.hpux Mike Holland <hollandm@logicadotcom> wrote:
> I need to port a large-ish application (about a million lines of 'C'
> code) from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It
> will be particularly entertaining because the application exchanges
> messages with programs running on Windows NT.

have you already considered endian issues in those messages? iirc,
both alpha and x86 run little-endian, much of the rest of the world,
including PA-RISC runs big-endian.

rick jones
-- 
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, OR post, but please do NOT do BOTH...
my email address is raj in the cup.hp.com domain...



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00 Porting from Compaq Alpha to HP-UX Mike Holland
  2000-01-31  5:00 ` Rick Jones
@ 2000-01-31  5:00 ` David Peter
  2000-02-01  5:00   ` Rick Jones
  2000-01-31  5:00 ` Bob Koehler
  2 siblings, 1 reply; 21+ messages in thread
From: David Peter @ 2000-01-31  5:00 UTC (permalink / raw)


A couple of things spring immediately to mind with regard to CPU
architecture:

1. Alpha is 64 bit and PA-RISC is (usually) 32 bit;
2. Alpha is little-endian and PA-RISC is big-endian.

Mike Holland wrote:
> 
> I need to port a large-ish application (about a million lines of 'C' code)
> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It will be
> particularly entertaining because the application exchanges messages with
> programs running on Windows NT.
> 
> I'm doing my initial investigations, and would be very interested to hear of
> any real-life stories, hints, tips, or other experiences you have had.
> 
> TIA,
> 
> Mike Holland
> 
> hollandm@logicaDOTcom



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00 ` Bob Koehler
  2000-01-31  5:00   ` Mike Holland
@ 2000-01-31  5:00   ` Bob Koehler
  2000-02-01  5:00     ` Mike Holland
  1 sibling, 1 reply; 21+ messages in thread
From: Bob Koehler @ 2000-01-31  5:00 UTC (permalink / raw)


In article <873qtt$fds@romeo.logica.co.uk>, "Mike Holland" <hollandm@logicaDOTcom> writes:
> I need to port a large-ish application (about a million lines of 'C' code)
> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It will be
> particularly entertaining because the application exchanges messages with
> programs running on Windows NT.
> 
 
 Something I missed on the first followup.  On Compaq UNIX you can
 control whether structure and union fields are naturally aligned or
 packed.  On HP-UX you can't.  I've had trouble getting two programs
 which used the same .h file to declare a struct on HP-UX to agree
 how the data should be aligned.  So if you do read and writes of
 entire structs you may have to re-write it as field-by-field I/O.
 
----------------------------------------------------------------------
Bob Koehler                     | Computer Sciences Corporation
Hubble Space Telescope Payload  | Federal Sector, Civil Group
 Flight Software Team           | please remove ".aspm" when replying



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00   ` Mike Holland
  2000-02-01  5:00     ` John Neumann
@ 2000-02-01  5:00     ` Rick Jones
  1 sibling, 0 replies; 21+ messages in thread
From: Rick Jones @ 2000-02-01  5:00 UTC (permalink / raw)


In comp.sys.hp.hpux Mike Holland <hollandm@logicadotcom> wrote:
> Ideally, I could do with a tool which processed 'C' type definitions
> (plus additional info about the tags) and produced such an
> end-swapping program.  This surely must have been written by someone
> already!

I'm not sure about the unions/tags, but in general it sounds like
something XDR was trying to solve.

rick jones
-- 
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, OR post, but please do NOT do BOTH...
my email address is raj in the cup.hp.com domain...



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00 ` David Peter
@ 2000-02-01  5:00   ` Rick Jones
  2000-02-03  5:00     ` Aurel Balmosan
  0 siblings, 1 reply; 21+ messages in thread
From: Rick Jones @ 2000-02-01  5:00 UTC (permalink / raw)


In comp.sys.hp.hpux David Peter <davep@ctxuk.citrix.com> wrote:
> PA-RISC is (usually) 32 bit;

Of course, that is evolving rapidly :)

Any PA-8000 or later based system is capable of running a 64 bit OS if
the owner so decided. 

Any L, N, or V Class system is always running a 64 bit OS.

Any PA-8500 or later based B, C, or J running HP-UX 11 is always
running a 64 bit kernel.

rick jones
-- 
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, OR post, but please do NOT do BOTH...
my email address is raj in the cup.hp.com domain...



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00   ` Bob Koehler
@ 2000-02-01  5:00     ` Mike Holland
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Holland @ 2000-02-01  5:00 UTC (permalink / raw)


Thanks for that.   Actually, I think I'll be OK with my alignment since the
application has all its data explicitly padded so that it lies on natural
boundaries.

Where I'm expecting the real trouble is where bit-fields have been used:
the Alpha compiler puts the first bit-field it finds at the least
significant end of the word, whereas the HP-UX puts it at the most
significant end.  So any assumptions about the layout of bitfield go
horribly wrong!  It's expecially horrible where unions are involved.

Mike Holland


Bob Koehler wrote in message <2000Jan31.141639.1@eisner>...
>In article <873qtt$fds@romeo.logica.co.uk>, "Mike Holland"
<hollandm@logicaDOTcom> writes:
>> I need to port a large-ish application (about a million lines of 'C'
code)
>> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It will be
>> particularly entertaining because the application exchanges messages with
>> programs running on Windows NT.
>>
>
> Something I missed on the first followup.  On Compaq UNIX you can
> control whether structure and union fields are naturally aligned or
> packed.  On HP-UX you can't.  I've had trouble getting two programs
> which used the same .h file to declare a struct on HP-UX to agree
> how the data should be aligned.  So if you do read and writes of
> entire structs you may have to re-write it as field-by-field I/O.
>
>----------------------------------------------------------------------
>Bob Koehler                     | Computer Sciences Corporation
>Hubble Space Telescope Payload  | Federal Sector, Civil Group
> Flight Software Team           | please remove ".aspm" when replying





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

* Re: Porting from Compaq Alpha to HP-UX
  2000-01-31  5:00   ` Mike Holland
@ 2000-02-01  5:00     ` John Neumann
  2000-02-01  5:00     ` Rick Jones
  1 sibling, 0 replies; 21+ messages in thread
From: John Neumann @ 2000-02-01  5:00 UTC (permalink / raw)


Hi Mike - Sending binary data although usually much faster (not in all cases)
is a very limited interface due to the obvious.  Since you have the source code
and have some time, try writing a small interface program that will both encode
and decode the binary data structures into an ASCII stream type message.  This
way you can test the code on both machines without having to rewrite a lot of
the bit masking and/or field manipulations.  Start with as small amount of data
you can for parsing and encoding and then grow from there.

We have done similar parsers when trying to port code/data from DEC to SUN/HP
workstations in the past.  The parsers took much less time that trying to
rewrite large amount of algorithms, YMMV.

Good luck!
-John

neumann@titan.com

Mike Holland wrote:

> Indeed!    This is made worse by the fact that some messages between the
> platforms are mapped onto 'C' unions, hence the end-swapping utility needs
> knowledge of the meaning of the tag fields.
>
> Ideally, I could do with a tool which processed 'C' type definitions (plus
> additional info about the tags) and produced such an end-swapping program.
> This surely must have been written by someone already!
>
> Does anyone know of such a program?
>
> Mike Holland
>
> Bob Koehler wrote in message <2000Jan31.083911.1@eisner>...
> >In article <873qtt$fds@romeo.logica.co.uk>, "Mike Holland"
> <hollandm@logicaDOTcom> writes:
> >> I need to port a large-ish application (about a million lines of 'C'
> code)
> >> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX.  It will be
> >> particularly entertaining because the application exchanges messages with
> >> programs running on Windows NT.
> >>
> >
> >Alphas running Compaq's UNIX and all systems running WNT are running in
> >little endian mode.  HP-UX runs in big endian mode.  If you are
> >exchanging binary data you will have to byte and/or word swap between
> >the WNT and HP.
> >
> >----------------------------------------------------------------------
> >Bob Koehler                     | Computer Sciences Corporation
> >Hubble Space Telescope Payload  | Federal Sector, Civil Group
> > Flight Software Team           | please remove ".aspm" when replying




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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-01  5:00   ` Rick Jones
@ 2000-02-03  5:00     ` Aurel Balmosan
  2000-02-05  5:00       ` Shane Seymour
  2000-02-06  5:00       ` hbw
  0 siblings, 2 replies; 21+ messages in thread
From: Aurel Balmosan @ 2000-02-03  5:00 UTC (permalink / raw)



Rick Jones wrote:

> In comp.sys.hp.hpux David Peter <davep@ctxuk.citrix.com> wrote:
> > PA-RISC is (usually) 32 bit;
>
> Of course, that is evolving rapidly :)
>
> Any PA-8000 or later based system is capable of running a 64 bit OS if
> the owner so decided.
>
> Any L, N, or V Class system is always running a 64 bit OS.
>
> Any PA-8500 or later based B, C, or J running HP-UX 11 is always
> running a 64 bit kernel.

Hi everyone,

All your discussions are quite interesting but no one hit the actual
question: What must be done to port Tru64 software to HP-UX. That there
are differences in the binary representation should be expected by
everyone. Especially if this software works on other machines too (like
sun ...)

What what about the API differences between Tru64 and HP-UX? HP-UX is not
a real standard Unix as Tru64 is. It has some different include files and
other functions.What else is different?

Regards,

    Aurel Balmosan




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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-05  5:00       ` Shane Seymour
@ 2000-02-04  5:00         ` Computing Services
  2000-02-07  5:00           ` Bob Koehler
  2000-02-09  5:00         ` Aurel Balmosan
  1 sibling, 1 reply; 21+ messages in thread
From: Computing Services @ 2000-02-04  5:00 UTC (permalink / raw)


Too late.......

You are correct, UNIX is a nice heterogeneous mix of flavors.  I work on
both platforms, and have found that neither one is closer to the "true"
origins of UNIX.  HPUX has a lot of system V syntax, but also contains
some elements of Berkeley.  Digital UNIX also contains some elements of
VMS, but it was developed by Digital/Compaq after all.

Shane Seymour wrote:
> 
> > HP-UX is not a real standard Unix as Tru64 is.
> 
> Doh! Religious wars! I have to add that neither HPUX or Tru64 are standards
> (as much as either vendor might want to consider them) they are Unix
> operating systems. What is more important is to what versions of what
> standards they might claim compliance to. If they comply to a standard you
> can write code to standards based interfaces however people rarely do that
> and vendors always add extra functionality above a standard or might not
> implement optional parts of standards .....
> 
> Lets not start a HPUX/Tru64 cross posting war.
> 
> Just my 2 cents worth.....
> Shane



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-03  5:00     ` Aurel Balmosan
@ 2000-02-05  5:00       ` Shane Seymour
  2000-02-04  5:00         ` Computing Services
  2000-02-09  5:00         ` Aurel Balmosan
  2000-02-06  5:00       ` hbw
  1 sibling, 2 replies; 21+ messages in thread
From: Shane Seymour @ 2000-02-05  5:00 UTC (permalink / raw)


> HP-UX is not a real standard Unix as Tru64 is.

Doh! Religious wars! I have to add that neither HPUX or Tru64 are standards
(as much as either vendor might want to consider them) they are Unix
operating systems. What is more important is to what versions of what
standards they might claim compliance to. If they comply to a standard you
can write code to standards based interfaces however people rarely do that
and vendors always add extra functionality above a standard or might not
implement optional parts of standards .....

Lets not start a HPUX/Tru64 cross posting war.

Just my 2 cents worth.....
Shane





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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-03  5:00     ` Aurel Balmosan
  2000-02-05  5:00       ` Shane Seymour
@ 2000-02-06  5:00       ` hbw
  1 sibling, 0 replies; 21+ messages in thread
From: hbw @ 2000-02-06  5:00 UTC (permalink / raw)


Aurel Balmosan wrote:
> 
> Rick Jones wrote:
> 
> > In comp.sys.hp.hpux David Peter <davep@ctxuk.citrix.com> wrote:
> > > PA-RISC is (usually) 32 bit;
> >
> > Of course, that is evolving rapidly :)
> >
> > Any PA-8000 or later based system is capable of running a 64 bit OS if
> > the owner so decided.
> >
> > Any L, N, or V Class system is always running a 64 bit OS.
> >
> > Any PA-8500 or later based B, C, or J running HP-UX 11 is always
> > running a 64 bit kernel.
> 
> Hi everyone,
> 
> All your discussions are quite interesting but no one hit the actual
> question: What must be done to port Tru64 software to HP-UX. That there
> are differences in the binary representation should be expected by
> everyone. Especially if this software works on other machines too (like
> sun ...)
> 
> What what about the API differences between Tru64 and HP-UX? HP-UX is not
> a real standard Unix as Tru64 is. It has some different include files and
> other functions.What else is different?
> 
> Regards,
> 
>     Aurel Balmosan

it seems like one is little and the other is big edian (or however it's
spelled).

ANSI C isn't on hpux by default, I think that you have to buy some
additional lic to get ANSI C abilities.

I'm having a bare of a time getting gnu C working on my hpux 10.20
system.

I down loaded some *.depots from a edu sight, the first issue I had was
the *.depot wasn't a *.depot file but a *.depot.gz file -- just not
named accordingly.


-- 
I'm not even going to *______\b\b\b\b\b\bbother* comparing C to BASIC or
FORTRAN.
		-- L. Zolman, creator of BDS C
 
The Moon is Waxing Crescent (3% of Full)



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-04  5:00         ` Computing Services
@ 2000-02-07  5:00           ` Bob Koehler
  2000-02-08  5:00             ` Computing Services
  0 siblings, 1 reply; 21+ messages in thread
From: Bob Koehler @ 2000-02-07  5:00 UTC (permalink / raw)


In article <389B3409.45868DA6@boeing.com>, Computing Services <john.a.doe@boeing.com> writes:

>Digital UNIX also contains some elements of
> VMS, 
> 

Which?  Care to be specific?

----------------------------------------------------------------------
Bob Koehler                     | Computer Sciences Corporation
Hubble Space Telescope Payload  | Federal Sector, Civil Group
 Flight Software Team           | please remove ".aspm" when replying



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-07  5:00           ` Bob Koehler
@ 2000-02-08  5:00             ` Computing Services
  2000-02-08  5:00               ` Daniel S. Riley
                                 ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Computing Services @ 2000-02-08  5:00 UTC (permalink / raw)


Oh its not as much as I think you're assuming.  From what I see the
similarities are in the line of the security implemtation.  For
instance, not giving the users the chown command, is very VMS-like. 
There is nothing concrete, but the impression I get from it is that it
is a Digital UNIX variation of VMS.

Bob Koehler wrote:
> 
> In article <389B3409.45868DA6@boeing.com>, Computing Services <john.a.doe@boeing.com> writes:
> 
> >Digital UNIX also contains some elements of
> > VMS,
> >
> 
> Which?  Care to be specific?
> 
> ----------------------------------------------------------------------
> Bob Koehler                     | Computer Sciences Corporation
> Hubble Space Telescope Payload  | Federal Sector, Civil Group
>  Flight Software Team           | please remove ".aspm" when replying



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-08  5:00             ` Computing Services
  2000-02-08  5:00               ` Daniel S. Riley
@ 2000-02-08  5:00               ` Adam Price
  2000-02-09  5:00               ` Bob Koehler
  2 siblings, 0 replies; 21+ messages in thread
From: Adam Price @ 2000-02-08  5:00 UTC (permalink / raw)



Computing Services wrote in message <38A03B50.15DAFD18@boeing.com>...
>Oh its not as much as I think you're assuming.  From what I see the
>similarities are in the line of the security implemtation.  For
>instance, not giving the users the chown command, is very VMS-like.
>There is nothing concrete, but the impression I get from it is that it
>is a Digital UNIX variation of VMS.
>
Eh..
I know that all of the version of OSF/1, DIGITAL UNIX, and Tru64 I
ever admined had a chown command.
As far as I can see the only things that really were similar between
DIGITAL UNIX and VMS were the format of the binary errorlog, the
lmf license management stuff and some of the DECwindows Stuff.
But thats just my opinion and worth only what you pay for it.
Adam Price







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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-08  5:00             ` Computing Services
@ 2000-02-08  5:00               ` Daniel S. Riley
  2000-02-08  5:00               ` Adam Price
  2000-02-09  5:00               ` Bob Koehler
  2 siblings, 0 replies; 21+ messages in thread
From: Daniel S. Riley @ 2000-02-08  5:00 UTC (permalink / raw)


Computing Services <john.a.doe@boeing.com> writes:
> Oh its not as much as I think you're assuming.  From what I see the
> similarities are in the line of the security implemtation.  For
> instance, not giving the users the chown command, is very VMS-like. 

Not letting ordinary users give away their files is a BSD thing, I
believe introduced about the same time disk quotas were (think about
it).  In most respects except the boot sequence, Tru64 is BSD in its
roots, with the occasional SYSVism grafted on for SVID compatibility.

-- 
Dan Riley                                         dsr@mail.lns.cornell.edu
Wilson Lab, Cornell University      <URL:http://www.lns.cornell.edu/~dsr/>
    "History teaches us that days like this are best spent in bed"



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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-05  5:00       ` Shane Seymour
  2000-02-04  5:00         ` Computing Services
@ 2000-02-09  5:00         ` Aurel Balmosan
  2000-02-09  5:00           ` Shane Seymour
  1 sibling, 1 reply; 21+ messages in thread
From: Aurel Balmosan @ 2000-02-09  5:00 UTC (permalink / raw)
  To: Shane Seymour



Shane Seymour wrote:

> > HP-UX is not a real standard Unix as Tru64 is.
>
> Doh! Religious wars! I have to add that neither HPUX or Tru64 are standards
> (as much as either vendor might want to consider them) they are Unix
> operating systems. What is more important is to what versions of what
> standards they might claim compliance to. If they comply to a standard you
> can write code to standards based interfaces however people rarely do that
> and vendors always add extra functionality above a standard or might not
> implement optional parts of standards .....
>
> Lets not start a HPUX/Tru64 cross posting war.
>
> Just my 2 cents worth.....
> Shane

Man Shane,

what a shame, YOU just started it! You must be stupid. (I mean that)

To repeat: There are always differences between unix versions. (Sun, Dec,
different Sun versions, different Dec versions, FTX, SYS5 ). So what would we
encounter when we switch to HP-UX.

Bye,

    Aurel.




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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-09  5:00         ` Aurel Balmosan
@ 2000-02-09  5:00           ` Shane Seymour
  0 siblings, 0 replies; 21+ messages in thread
From: Shane Seymour @ 2000-02-09  5:00 UTC (permalink / raw)


> Man Shane,
>
> what a shame, YOU just started it! You must be stupid. (I mean that)

(deep breath and)

My most profuse and humble applogies Aurel I bask in the warmth of your
wrath. I must be stupid (I mean that) to have assumed that anyone reading
the post could have interpreted my posting to say that all unix operating
systems are they same. The only thing that quite a lot of unix operating
systems have in common is that at sometime the vendor has owned the name or
has licensed it and they purchased some of their code base from the same
third party. That off my chest ...

About the only advice that I can offer is my experience from doing ports
from HPUX to linux. Most of the code I ported was written by me for HPUX and
then transported to linux where I encountered a libc that was not as
forgiving as the HPUX one. HPUX will allow lots of NULL pointers being
passed into libc where (in this case) the gnu libc would not (in the end I
liked the gnu libc as it forced me to make code changes that improved the
code and make it more transportable).  My job was made a lot easier from the
fact that both HPUX and linux had X/Open compliant versions of curses,
making sure that I only used a standards based interface made the job of
porting all that much easier (one of the things stressing my previous post)
when I had a choice of classic HPUX curses or color curses. Making the code
64 bit capable on HPUX was done within one day of the linux changes because
of the effort that went into the first porting effort. Admittedly my porting
effort is probably not a good indicator (about 2-3 days of effort) as it was
only 10000 lines of C code.

The hard part will be if you have to write code that can compile and be
functionally equivalent between two or more operating systems. You may end
up having to have either lots of #ifdef's protecting OS dependant code to
handle differences. You will probably have to have make files specifically
targeting each OS as you are likely to require different flags to both the
compilers and the linkers on both platforms. On the plus side sockets code
may be easier since network ordering of address etc is big endian (I'm
pretty sure of that).

If you use things like memory mapped files you will have some restrictions
under HPUX since the PA-RISC cpu is has a virtually indexed cache the best
performance is when mmap'ed files are mapped into the same virtual address
space when used in more than one process. There are good reasons why to
never mmap to different virtual addresses on PA-RISC. HPUX with 64 bit 11
and 64 bit processes makes this restriction less of a restriction since the
address space is so much larger. Unlike quite a lot of other operating
systems the HPUX process address is split into 4 quadrants each of roughly
equal size and differing purposes. For example 32bit processes in a normal
a.out executable have 1Gb for Text, ~1Gb for process private data (the stack
subtracts from this), and 1.75 Gb for shared objects (shared memory, shared
mmap'ed files, shared libraries, etc) and .25Gb reserved architecturally.

Since Digital unix is 64 bit that means there must be some 64 bit data
types. Like HPUX pointers will be 64 bits. I don't know what size longs and
ints are on Dec equipment but in a HPUX 64 bit process they are 64 bits and
32 bits respectively (that may cause problems if Digital Unix has ints at 64
bits). You may be better off using supplied types such as uint64_t, int32_t.
etc instead of normal C builtin types to workaround possible typing
differences..

HPUX 11.0 is more sysv with bsd bits than HPUX 10.x which was more bsd with
sysv bits (although both have a sysv filesystem type layout). At 11.0 all of
the networking layer is streams based for the first time. You do have a
choice of bsd sockets, xti, and tli for transport interfaces on HPUX (dlpi
to if you want to use it).

A good place for information about what things are available is
http://devresource.hp.com the featured thing at the moment (just checked to
make sure the URL is correct) is a solaris to HPUX 11.0 porting guide. It
may not help but it may be useful to see it point out some of the
differences between HPUX and other operating system (even if its not the one
you want). The runtime architecture guides are available (from memory) from
this site as well if you want to delve into the underbelly of the evironment
your programs will be running in.

Waiting to be flamed
Shane





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

* Re: Porting from Compaq Alpha to HP-UX
  2000-02-08  5:00             ` Computing Services
  2000-02-08  5:00               ` Daniel S. Riley
  2000-02-08  5:00               ` Adam Price
@ 2000-02-09  5:00               ` Bob Koehler
  2 siblings, 0 replies; 21+ messages in thread
From: Bob Koehler @ 2000-02-09  5:00 UTC (permalink / raw)


In article <38A03B50.15DAFD18@boeing.com>, Computing Services <john.a.doe@boeing.com> writes:
> Oh its not as much as I think you're assuming.  From what I see the
> similarities are in the line of the security implemtation.  For
> instance, not giving the users the chown command, is very VMS-like. 
> There is nothing concrete, but the impression I get from it is that it
> is a Digital UNIX variation of VMS.
> 

I suspect some of the DU (Tru64) security people may be aware of the
same lessons some of the VMS people are, but that looks like about it.

For example, I'm not at all impressed by thier minimum password change 
time, looks like a cop out to cover not having a password history.  But
I've had other UNIX with no mechansim even as an option to install,
world writeable /usr/local, ...

----------------------------------------------------------------------
Bob Koehler                     | Computer Sciences Corporation
Hubble Space Telescope Payload  | Federal Sector, Civil Group
 Flight Software Team           | please remove ".aspm" when replying



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

end of thread, other threads:[~2000-02-09  5:00 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-31  5:00 Porting from Compaq Alpha to HP-UX Mike Holland
2000-01-31  5:00 ` Rick Jones
2000-01-31  5:00 ` David Peter
2000-02-01  5:00   ` Rick Jones
2000-02-03  5:00     ` Aurel Balmosan
2000-02-05  5:00       ` Shane Seymour
2000-02-04  5:00         ` Computing Services
2000-02-07  5:00           ` Bob Koehler
2000-02-08  5:00             ` Computing Services
2000-02-08  5:00               ` Daniel S. Riley
2000-02-08  5:00               ` Adam Price
2000-02-09  5:00               ` Bob Koehler
2000-02-09  5:00         ` Aurel Balmosan
2000-02-09  5:00           ` Shane Seymour
2000-02-06  5:00       ` hbw
2000-01-31  5:00 ` Bob Koehler
2000-01-31  5:00   ` Mike Holland
2000-02-01  5:00     ` John Neumann
2000-02-01  5:00     ` Rick Jones
2000-01-31  5:00   ` Bob Koehler
2000-02-01  5:00     ` Mike Holland

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