Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* FORTRAN executables not transportable?
@ 1994-05-24  1:31 Jon Leong
  1994-05-24 16:20 ` John R. Reagan
  1994-05-24 21:43 ` FORTRAN executables not transportable? (Summary) jon
  0 siblings, 2 replies; 4+ messages in thread
From: Jon Leong @ 1994-05-24  1:31 UTC (permalink / raw)


In an attempt to take advantage of idle CPU cycles, I FTPed a FORTRAN 
executable (a.out) from one Alpha OSF/1 system to another but it would
not run.  The Alpha with the idle cycles does not have a F77 compiler. 
That is why I was trying to deal with executables.

The error message I got was: 

   375:a.out: /sbin/loader: Fatal Error: Main's RLD_VERSION is 3,
   the correct version should be 1

I looked through the "f77", "loader" and "ld" man pages but was unable
to find anything to fix this problem. 

Does this mean that FORTRAN executables are not transportable? 

I figured that, starting from an object file, if I could form the
executable on the "idle" Alpha, it would have the correct loader version
but so far I've had little success.  Whenever I try using:

                           ld prog.o

I get a bunch of error messages saying that it can't find the basic
FORTRAN functions such as "for_open", "for_exit", "sqrt", etc.
Surprisingly, this happens on both Alphas; even the one with f77. By the
way, both Alphas are running OSF/1 version 2.0.  The "idle" Alpha *DOES*
have the basic FORTRAN libraries loaded (whatever came with the
operating system CDs). 

It seems that the only way I can get an executable from an object file
is to use the command: 
                            f77 prog.o

But of course, the problem is that I don't have f77 on the Alpha that I
want to run the program on. 

Unfortunately, the College did not see fit to buy any of the docs (hard
copy or CD) for the Alphas and since I am primarily a VMS person, I'm
flying blind. 

Any help would be appreciated.

Thanks in advance.

Jon Leong                                          JON@QCVAXA.BITNET
VAX Systems Manager                                JONQC@CUNYVM.CUNY.EDU
Academic Computer Center
Queens College, NYC


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

* Re: FORTRAN executables not transportable?
  1994-05-24  1:31 FORTRAN executables not transportable? Jon Leong
@ 1994-05-24 16:20 ` John R. Reagan
  1994-05-24 18:22   ` Castor Fu
  1994-05-24 21:43 ` FORTRAN executables not transportable? (Summary) jon
  1 sibling, 1 reply; 4+ messages in thread
From: John R. Reagan @ 1994-05-24 16:20 UTC (permalink / raw)



In article <2rrht2$ijd@news.cuny.edu>, jon@qcvaxa.acc.qc.edu (Jon Leong) writes...
>In an attempt to take advantage of idle CPU cycles, I FTPed a FORTRAN 
>executable (a.out) from one Alpha OSF/1 system to another but it would
>not run.  The Alpha with the idle cycles does not have a F77 compiler. 
>That is why I was trying to deal with executables.
> 
>The error message I got was: 
> 
>   375:a.out: /sbin/loader: Fatal Error: Main's RLD_VERSION is 3,
>   the correct version should be 1
> 
>Does this mean that FORTRAN executables are not transportable? 

It isn't just Fortran, but anything linked with shared libraries.
OSF/1 is upwards compatable (ie, thinks built on older versions should
run on newer versions), but not the other way around.  It seems that the
a.out you copied was built on a newer version of OSF/1 than the idle machine
you are copying to.

>It seems that the only way I can get an executable from an object file
>is to use the command: 
>                            f77 prog.o
> 

You can use ld, but you'll have to specify the libraries that the f77
command would have done.  Go to the machine with f77 and use "-v"
on an f77 command.  You'll see how it invokes ld to convert the .o
into an a.out.  It should be something like:

/usr/lib/cmplrs/cc/ld -g0 -O4 -call_shared /usr/lib/cmplrs/cc/crt0.o \
/usr/lib/cmplrs/fort/for_main.o prog.o -nocount -lUfor -lfor -lFutil -lm \
-lots -lc

---
John Reagan
The Languages Group
Digital Equipment Corporation
reagan@hiyall.enet.dec.com
Disclaimer:  The opinions and statements expressed by me are not
             necessarily those of Digital Equipment Corporation.
---


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

* Re: FORTRAN executables not transportable?
  1994-05-24 16:20 ` John R. Reagan
@ 1994-05-24 18:22   ` Castor Fu
  0 siblings, 0 replies; 4+ messages in thread
From: Castor Fu @ 1994-05-24 18:22 UTC (permalink / raw)


In article <2rt9q8$qed@jac.zko.dec.com> reagan@hiyall.enet.dec.com (John R. Reagan) writes:


   It isn't just Fortran, but anything linked with shared libraries.
   OSF/1 is upwards compatable (ie, thinks built on older versions should
   run on newer versions), but not the other way around.  It seems that the
   a.out you copied was built on a newer version of OSF/1 than the idle machine
   you are copying to.

Another possibility would be to try

	f77 -non_shared -o prog sub1.o sub2.o sub3.o

This tells the linker not to use shared libraries.  While OSF/1 may
not be strictly downward compatible, there is a reasonable chance
that the relevant system calls have not changed much.

--
Castor Fu, (foo@leland.stanford.edu)


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

* RE: FORTRAN executables not transportable? (Summary)
  1994-05-24  1:31 FORTRAN executables not transportable? Jon Leong
  1994-05-24 16:20 ` John R. Reagan
@ 1994-05-24 21:43 ` jon
  1 sibling, 0 replies; 4+ messages in thread
From: jon @ 1994-05-24 21:43 UTC (permalink / raw)


Abbreviated version of my original post:
> In an attempt to take advantage of idle CPU cycles, I FTPed a FORTRAN
> executable (a.out) from one Alpha OSF/1 system to another but it would
> not run.  The Alpha with the idle cycles does not have a F77 compiler.
> That is why I was trying to deal with executables.
>
> The error message I got was:
>
>   375:a.out: /sbin/loader: Fatal Error: Main's RLD_VERSION is 3,
>   the correct version should be 1
>
> Does this mean that FORTRAN executables are not transportable?
>
> By the way, both Alphas are running OSF/1 version 2.0.

Apparently, I was mistaken about both Alphas having version 2.0 of the
operating system.  A few of the replies that I got pointed that out.
A double check of the "idle" Alpha showed that it was only running
version 1.2A.  This explained why the RLD_VERSIONs did not match up.

I received several replies which all told me to add the "-non_shared"
option to the compilation command.  Apparently, a default executable
uses the dynamically linked libraries whereas in my situation, I need to
have the library routines "built into" the executable.  Anyway, the
"-non_shared" option fixed it and I am able to run the executable on the
Alpha that doesn't have a FORTRAN compiler.

Thanks to all that replied.

Jon Leong
Queens College
City University of New York


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

end of thread, other threads:[~1994-05-24 21:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-05-24  1:31 FORTRAN executables not transportable? Jon Leong
1994-05-24 16:20 ` John R. Reagan
1994-05-24 18:22   ` Castor Fu
1994-05-24 21:43 ` FORTRAN executables not transportable? (Summary) jon

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