* Re: DEC / SGI binary files.
1997-10-31 5:00 ` Serge Pachkovsky
@ 1997-10-31 5:00 ` Anne-Gael Inisan
1997-11-03 5:00 ` Shankar Unni
1 sibling, 0 replies; 6+ messages in thread
From: Anne-Gael Inisan @ 1997-10-31 5:00 UTC (permalink / raw)
Serge Pachkovsky wrote:
> Anne-Gael Inisan (inisan@afmb.cnrs-mrs.fr) wrote:
> : Hello !
>
> : This program creates a binary file, and my problem is that those two binary
> : files (created one on SGI, the other on DEC) differ: I can't transfer the file
> : from a machine to the other. That's a pain for my customers who have
> : heterogenous networks.
> : I already assumed that the alpha is a 64 bits machine, the SGI 32. The two
> : binary files have the same number of bytes. I tried to 'swapbyte' one file
> : as well.
>
> : Can anyone explain me this ? Is there a solution ?
>
> Try compiling your DEC executable with -convert big_endian.
>
Unfortunately, it doesn't work. Thanks a lot anyway.
> Generally, you should *never* expect binary files to be compatible between
> different machines (and even between different compilers on the same OS) -
> unless you go to the (quite considerable) effort of designing your files
> to be portable in the first place.
>
> /Serge.P
Yes, should be. I'd better not loose too much time.
Thanks.
Anne-Gael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: DEC / SGI binary files.
1997-10-31 5:00 DEC / SGI binary files Anne-Gael Inisan
1997-10-31 5:00 ` Serge Pachkovsky
@ 1997-10-31 5:00 ` Dirk Bartz
1997-11-04 5:00 ` Michael Maxie
2 siblings, 0 replies; 6+ messages in thread
From: Dirk Bartz @ 1997-10-31 5:00 UTC (permalink / raw)
Anne-Gael Inisan wrote:
>
> Hello !
>
> I've got a compatibility problem. I have traditionally compiled my
> program
> on a SGI IRIX 6.2 (flag -64), and newly compiled the same code on a DEC
> alpha UNIX 4.0 (this is miraculous though).
> This program creates a binary file, and my problem is that those two
> binary
> files (created one on SGI, the other on DEC) differ: I can't transfer
> the file
> from a machine to the other. That's a pain for my customers who have
> heterogenous networks.
> I already assumed that the alpha is a 64 bits machine, the SGI 32. The
> two
> binary files have the same number of bytes. I tried to 'swapbyte' one
> file
> as well.
I'm not sure if I understand what you try to do.
If you assume that SGI code is binary compatible to DEC alpha code,
this assumption is the source of your problem. They are *not*.
If you change to another platform with different processors
(e.g. Sun Ultra, HP PA), programs are not binary compatible. You
need to compile them again (which already introduces some headaches).
Even same processors (actually processors of the same vendor) using
differens OS-versions introduce several problems.
Hope that helps,
dirk
======== 8< ======= 8< ======= 8< ======= 8< ======= 8< ======= 8<
========
Dirk Bartz University of Tuebingen
Phone: +49-7071/29-76361
Email: bartz@gris.uni-tuebingen.de Fax: +49-7071/29-5466
WWW: http://www.gris.uni-tuebingen.de/~bartz
^ permalink raw reply [flat|nested] 6+ messages in thread
* DEC / SGI binary files.
@ 1997-10-31 5:00 Anne-Gael Inisan
1997-10-31 5:00 ` Serge Pachkovsky
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Anne-Gael Inisan @ 1997-10-31 5:00 UTC (permalink / raw)
Hello !
I've got a compatibility problem. I have traditionally compiled my
program
on a SGI IRIX 6.2 (flag -64), and newly compiled the same code on a DEC
alpha UNIX 4.0 (this is miraculous though).
This program creates a binary file, and my problem is that those two
binary
files (created one on SGI, the other on DEC) differ: I can't transfer
the file
from a machine to the other. That's a pain for my customers who have
heterogenous networks.
I already assumed that the alpha is a 64 bits machine, the SGI 32. The
two
binary files have the same number of bytes. I tried to 'swapbyte' one
file
as well.
Can anyone explain me this ? Is there a solution ?
Thanks very much for you help,
Anne-Gael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: DEC / SGI binary files.
1997-10-31 5:00 DEC / SGI binary files Anne-Gael Inisan
@ 1997-10-31 5:00 ` Serge Pachkovsky
1997-10-31 5:00 ` Anne-Gael Inisan
1997-11-03 5:00 ` Shankar Unni
1997-10-31 5:00 ` Dirk Bartz
1997-11-04 5:00 ` Michael Maxie
2 siblings, 2 replies; 6+ messages in thread
From: Serge Pachkovsky @ 1997-10-31 5:00 UTC (permalink / raw)
Anne-Gael Inisan (inisan@afmb.cnrs-mrs.fr) wrote:
: Hello !
: This program creates a binary file, and my problem is that those two binary
: files (created one on SGI, the other on DEC) differ: I can't transfer the file
: from a machine to the other. That's a pain for my customers who have
: heterogenous networks.
: I already assumed that the alpha is a 64 bits machine, the SGI 32. The two
: binary files have the same number of bytes. I tried to 'swapbyte' one file
: as well.
: Can anyone explain me this ? Is there a solution ?
Try compiling your DEC executable with -convert big_endian.
Generally, you should *never* expect binary files to be compatible between
different machines (and even between different compilers on the same OS) -
unless you go to the (quite considerable) effort of designing your files
to be portable in the first place.
/Serge.P
--
Russian guy from the Zurich university...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: DEC / SGI binary files.
1997-10-31 5:00 ` Serge Pachkovsky
1997-10-31 5:00 ` Anne-Gael Inisan
@ 1997-11-03 5:00 ` Shankar Unni
1 sibling, 0 replies; 6+ messages in thread
From: Shankar Unni @ 1997-11-03 5:00 UTC (permalink / raw)
Serge Pachkovsky wrote:
> Anne-Gael Inisan (inisan@afmb.cnrs-mrs.fr) wrote:
> : This program creates a binary file, and my problem is that those two binary
> : files (created one on SGI, the other on DEC) differ:
I assume you mean binary data files created by your program..
> Try compiling your DEC executable with -convert big_endian.
>
> Generally, you should *never* expect binary files to be compatible between
> different machines (and even between different compilers on the same OS) -
> unless you go to the (quite considerable) effort of designing your files
> to be portable in the first place.
Even using "-convert big_endian" may not always help.
Binary data layouts vary between different architectures, even, for
instance, between Sparc and MIPS (both of which have very similar 32-bit
big-endian layout policies).
There is only one way to share binary data between heterogenous
machines: you have to use a common data format.
Typically, you'd format the data into some ASCII (or ISO) form. E.g.
you'd write out the number 10 as the ASCII characters "1" and "0". You'd
have to have routines to write out and read back structures
appropriately.
Another way would be to convert the data to some common external binary
representation (like XDR) - see the man pages for the XDR libraries for
details.
--
Shankar Unni Powertel Global, Inc.
(650) 259-1700 shankar@powertelglobal.com
(650) 259-1702 (fax) shankar@webnexus.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: DEC / SGI binary files.
1997-10-31 5:00 DEC / SGI binary files Anne-Gael Inisan
1997-10-31 5:00 ` Serge Pachkovsky
1997-10-31 5:00 ` Dirk Bartz
@ 1997-11-04 5:00 ` Michael Maxie
2 siblings, 0 replies; 6+ messages in thread
From: Michael Maxie @ 1997-11-04 5:00 UTC (permalink / raw)
Anne-Gael Inisan <inisan@afmb.cnrs-mrs.fr> writes:
> Hello !
>
> I've got a compatibility problem. I have traditionally compiled my
> program
> on a SGI IRIX 6.2 (flag -64), and newly compiled the same code on a DEC
> alpha UNIX 4.0 (this is miraculous though).
> This program creates a binary file, and my problem is that those two
> binary
> files (created one on SGI, the other on DEC) differ: I can't transfer
> the file
> from a machine to the other. That's a pain for my customers who have
> heterogenous networks.
> I already assumed that the alpha is a 64 bits machine, the SGI 32. The
> two
> binary files have the same number of bytes. I tried to 'swapbyte' one
> file
> as well.
>
> Can anyone explain me this ? Is there a solution ?
Are you writing floating point data?
>
> Thanks very much for you help,
>
> Anne-Gael.
>
--
Michael Maxie maxie@alf.dec.com
Software Development Tools Support 1-800-354-9000
Digital Equipment Corporation DTN: 8-343-0120
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1997-11-04 5:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-31 5:00 DEC / SGI binary files Anne-Gael Inisan
1997-10-31 5:00 ` Serge Pachkovsky
1997-10-31 5:00 ` Anne-Gael Inisan
1997-11-03 5:00 ` Shankar Unni
1997-10-31 5:00 ` Dirk Bartz
1997-11-04 5:00 ` Michael Maxie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox