Problem with new release of Fortran compiler on RS/6000

Bob Shair shair at ux1.cso.uiuc.edu
Thu Feb 7 13:38:03 AEST 1991


wross at caen.engin.umich.edu (Wendy Ross) writes:

>Anyone else noticed a problem with newer Fortran compiler/library 
>when linking?  

I just had this come across my desk... it's probably not in quite 
the right format to send out on an external (non-IBM) forum like
this, but I don't have enough knowledge to fix it, and the need
for the information may well be urgent.
 
=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =

TITLE: 910116 XLF V1 ON AIX V3 (ICRA UPDATE 3003)


There exist some differences between the XL Fortrans on releases of AIX
prior to the ICRA update, and XL Fortran as available on the ICRA
update.   These differences can cause programs and/or libraries compiled
prior to the ICRA update to fail at runtime and/or linktime on a
RISC/6000 on which the ICRA update (3003) is installed.

If you have routines or programs which use any of the following
extensions to Fortran, you must take specific steps BEFORE installing
the ICRA update:

1. getenv
2. signal
3. system

It is best to perform the preemptive steps outlined here before
attempting to install ICRA:

1.  Login as root, or become the superuser.
2.  Create a directory.
3.  "cd" to the new directory.
4.  Extract the following members from the current (3002) XL Fortran
    library:  getenv.o, signal.o, system.o.  The command to do so is:
    "ar vx /usr/lib/libxlf.a getenv.o signal.o system.o"
5.  The output of the extraction should say:
    "x - getenv.o
     x - signal.o
     x - system.o"
6.   Back up the extracted library members using your favorite backup
     utility (tar, backup, dd...).

After installation of the ICRA update, you should restore the extracted
files to some directory on your path, and makefiles should be modified
to include these 3 routines.

There have been examples of C language code used to extend or supplement
XL Fortran which fail when recompiled on systems using the ICRA updates.
Here is an example of such code with the corrected code to the right:

/* 3002, not 3003 */       /* 3003 and 3002 */
#include <sys/types.h>       #include <sys/types.h>
long int loc(var)            long int loc(var)
long int var;                 int *var;
{                              {
     long int loc;                long int loc;
     loc = (long int)&var;       loc = (long int)var;
     return(loc);                 return(loc);
}                              }

---------- ---------- ---------- --------- ---------- ----------

-- 
Bob Shair                          shair at chgvmic1.iinus1.ibm.com
Scientific Computing Specialist    SHAIR at UIUCVMD (bitnet)
IBM Champaign



More information about the Comp.unix.aix mailing list